Constructor
new PreloadManager(assetUri, mimeTypenullable, startTimenullable, playerInterface)
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
assetUri | 
            
            string | ||
mimeType | 
            
            string | 
                
                
                    <nullable> | 
            
            
            |
startTime | 
            
            number | 
                
                
                    <nullable> | 
            
            
            |
playerInterface | 
            
            * | 
- Implements:
 - Source:
 
Members
createDrmEngine_ :function():!shaka.drm.DrmEngine
Type:
- function():!shaka.drm.DrmEngine
 
- Source:
 
latePhaseQueuedOperations_ :Array.<function()>
Type:
- Array.<function()>
 
- Source:
 
queuedOperations_ :Array.<function()>
Type:
- Array.<function()>
 
- Source:
 
segmentPrefetchById_ :Map.<number, shaka.media.SegmentPrefetch>
Type:
- Map.<number, shaka.media.SegmentPrefetch>
 
- Source:
 
Methods
filterForAVVariants_(manifest)
    Take a series of variants and ensure that they only contain one type of
variant. The different options are:
 1. Audio-Video
 2. Audio-Only
 3. Video-Only
A manifest can only contain a single type because once we initialize media
source to expect specific streams, it must always have content for those
streams. If we were to start with audio+video and switch to an audio-only
variant, media source would block waiting for video content.
    Parameters:
| Name | Type | Description | 
|---|---|---|
manifest | 
            
            shaka.extern.Manifest | 
- Source:
 
addQueuedOperation(latePhase, callback)
Parameters:
| Name | Type | Description | 
|---|---|---|
latePhase | 
            
            boolean | |
callback | 
            
            function() | 
- Source:
 
attachAbrManager(abrManagernullable, abrFactorynullable)
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
abrManager | 
            
            shaka.extern.AbrManager | 
                
                
                    <nullable> | 
            
            
            |
abrFactory | 
            
            shaka.extern.AbrManager.Factory | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
attachAdaptationSetCriteria(adaptationSetCriterianullable)
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
adaptationSetCriteria | 
            
            shaka.media.AdaptationSetCriteria | 
                
                
                    <nullable> | 
            
            
            
- Source:
 
attachManifest(manifestnon-null, parsernon-null, parserFactorynon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
manifest | 
            
            shaka.extern.Manifest | |
parser | 
            
            shaka.extern.ManifestParser | |
parserFactory | 
            
            shaka.extern.ManifestParser.Factory | 
- Source:
 
chooseInitialVariantAndPrefetchInner_() → {Promise}
    Performs a final filtering of the manifest, and chooses the initial
variant. Also prefetches segments.
- Source:
 
Returns:
- Type
 - Promise
 
configure(name, valueopt)
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
name | 
            
            string | ||
value | 
            
            * | 
                
                    <optional> | 
            
            
            
- Source:
 
destroy() → {Promise}
    Releases or stops all non-entrusted resources.
- Implements:
 - Source:
 
Returns:
- Type
 - Promise
 
dispatchEvent(eventnon-null) → {boolean}
Parameters:
| Name | Type | Description | 
|---|---|---|
event | 
            
            Event | 
- Source:
 
Returns:
- Type
 - boolean
 
getConfiguration() → {shaka.extern.PlayerConfiguration}
    Return a copy of the current configuration.
- Source:
 
Returns:
initializeDrmInner_() → {Promise}
    Initializes the DRM engine.
- Source:
 
Returns:
- Type
 - Promise
 
makeEvent_(namenon-null, dataopt) → {shaka.util.FakeEvent}
Parameters:
| Name | Type | Attributes | Description | 
|---|---|---|---|
name | 
            
            shaka.util.FakeEvent.EventName | ||
data | 
            
            Map.<string, Object> | 
                
                    <optional> | 
            
            
            
- Source:
 
Returns:
- Type
 - shaka.util.FakeEvent
 
makeStateChangeEvent_(nodeName)
    Makes a fires an event corresponding to entering a state of the loading
process.
    Parameters:
| Name | Type | Description | 
|---|---|---|
nodeName | 
            
            string | 
- Source:
 
markIsLoad()
    Makes it so that net requests launched from this load will no longer be
marked as "isPreload"
- Source:
 
parseManifestInner_() → {Promise}
    Pick and initialize a manifest parser, then have it download and parse the
manifest.
- Source:
 
Returns:
- Type
 - Promise
 
prefetchStream_(streamnon-null, isLive) → {Promise}
Parameters:
| Name | Type | Description | 
|---|---|---|
stream | 
            
            shaka.extern.Stream | |
isLive | 
            
            boolean | 
- Source:
 
Returns:
- Type
 - Promise
 
receiveAbrManager() → {shaka.extern.AbrManager}
    Gets the abr manager, if it exists. Also marks that the abr manager should
not be stopped if this manager is destroyed.
- Source:
 
Returns:
receiveDrmEngine() → {shaka.drm.DrmEngine}
    Gets the drm engine, if it exists. Also marks that the drm engine should
not be destroyed if this manager is destroyed.
- Source:
 
Returns:
- Type
 - shaka.drm.DrmEngine
 
receiveParser() → {shaka.extern.ManifestParser}
    Gets the parser, if it exists. Also marks that the parser should not be
stopped if this manager is destroyed.
- Source:
 
Returns:
receiveRegionTimeline() → {shaka.media.RegionTimeline}
    Gets the region timeline, if it exists. Also marks that the timeline should
not be released if this manager is destroyed.
- Source:
 
Returns:
receiveSegmentPrefetchesById() → {Map.<number, shaka.media.SegmentPrefetch>}
    Gets the SegmentPrefetch objects for the initial stream ids. Also marks
that those objects should not be aborted if this manager is destroyed.
- Source:
 
Returns:
- Type
 - Map.<number, shaka.media.SegmentPrefetch>
 
reconfigure(confignon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
config | 
            
            shaka.extern.PlayerConfiguration | 
- Source:
 
setEventHandoffTarget(eventHandoffTargetnon-null)
Parameters:
| Name | Type | Description | 
|---|---|---|
eventHandoffTarget | 
            
            shaka.util.FakeEventTarget | 
- Source:
 
setOffsetToStartTime(offset)
Parameters:
| Name | Type | Description | 
|---|---|---|
offset | 
            
            number | 
- Source:
 
start()
    Starts the process of loading the asset.
Success or failure will be measured through waitForFinish()
- Source:
 
stopQueuingLatePhaseQueuedOperations()
    Calls all late phase queued operations, and stops queueing them.
- Source:
 
throwIfDestroyed_()
    Throw if destroyed, to interrupt processes with a recognizable error.
- Source:
 
waitForFinish() → {Promise}
    Waits for the loading to be finished (or to fail with an error).
- Source:
 
Returns:
- Type
 - Promise
 
waitForManifest() → {Promise}
    Waits for the manifest to be loaded (or to fail with an error).
- Source:
 
Returns:
- Type
 - Promise
 
Type Definitions
PlayerInterface
Type:
- {config: !shaka.extern.PlayerConfiguration, manifestPlayerInterface: !shaka.extern.ManifestParser.PlayerInterface, regionTimeline: !shaka.media.RegionTimeline, qualityObserver: ?shaka.media.QualityObserver, createDrmEngine: function(): !shaka.drm.DrmEngine, networkingEngine: !shaka.net.NetworkingEngine, manifestFilterer: !shaka.media.ManifestFilterer, allowPrefetch: boolean, allowMakeAbrManager: boolean}
 
Properties:
| Name | Type | Attributes | Description | 
|---|---|---|---|
config | 
            
            
            shaka.extern.PlayerConfiguration | ||
manifestPlayerInterface | 
            
            
            shaka.extern.ManifestParser.PlayerInterface | ||
regionTimeline | 
            
            
            shaka.media.RegionTimeline | ||
qualityObserver | 
            
            
            shaka.media.QualityObserver | 
                
                
                    <nullable> | 
            
            
            |
createDrmEngine | 
            
            
            function | ||
networkingEngine | 
            
            
            shaka.net.NetworkingEngine | ||
manifestFilterer | 
            
            
            shaka.media.ManifestFilterer | ||
allowPrefetch | 
            
            
            boolean | ||
allowMakeAbrManager | 
            
            
            boolean | 
- Source: