The DashAdapter module can be accessed using the MediaPlayer API getDashAdapter()
- Source
Methods
applyPatchToManifest(manifest, patch)
Takes a given patch and applies it to the provided manifest, assumes patch is valid for manifest
Name | Type | Description |
---|---|---|
manifest | object | |
patch | object |
- Source
areMediaInfosEqual(mInfoOne, mInfoTwo) → {boolean}
Compares two mediaInfo objects
Name | Type | Description |
---|---|---|
mInfoOne | MediaInfo | |
mInfoTwo | MediaInfo |
- Source
- Type:
- boolean
getAdaptationForType(periodIndex, type, streamInfo) → {null|object}
Returns the AdaptationSet for a given period index and a given mediaType.
Name | Type | Description |
---|---|---|
periodIndex | number | |
type | MediaType | |
streamInfo | object |
- Source
adaptation
- Type:
- null |
object
getAllMediaInfoForType(streamInfo, type, externalManifest) → {Array}
Returns all the mediaInfos for a given mediaType and the corresponding streamInfo.
Name | Type | Description |
---|---|---|
streamInfo | object | |
type | MediaType | |
externalManifest | object | Set to null or undefined if no external manifest is to be used |
- Source
mediaArr
- Type:
- Array
getAvailabilityStartTime(externalManifest) → {number}
Returns the availabilityStartTime as specified in the manifest
Name | Type | Description |
---|---|---|
externalManifest | object | Omit this value if no external manifest should be used |
- Source
availabilityStartTime
- Type:
- number
getBandwidthForRepresentation(representationId, periodIdx) → {number}
Returns the bandwidth for a given representation id and the corresponding period index
Name | Type | Description |
---|---|---|
representationId | number | |
periodIdx | number |
- Source
bandwidth
- Type:
- number
getCodec(adaptation, representationId, addResolutionInfo) → {String}
Returns the codec for a given adaptation set and a given representation id.
Name | Type | Description |
---|---|---|
adaptation | object | |
representationId | number | |
addResolutionInfo | boolean | Defines whether to include resolution information in the output |
- Source
codec
- Type:
- String
getContentSteering(manifest) → {object}
Returns the ContentSteering element of the MPD
Name | Type | Description |
---|---|---|
manifest | object |
- Source
contentSteering
- Type:
- object
getDuration(externalManifest) → {number}
Returns the duration of the MPD
Name | Type | Description |
---|---|---|
externalManifest | object | Omit this value if no external manifest should be used |
- Source
duration
- Type:
- number
getIndexForRepresentation(representationId, periodIdx) → {number}
Returns the index for a given representation id
Name | Type | Description |
---|---|---|
representationId | string | |
periodIdx | number |
- Source
index
- Type:
- number
getIsDynamic(externalManifest) → {boolean}
Returns a boolean indicating if the manifest is dynamic or not
Name | Type | Description |
---|---|---|
externalManifest | object | Omit this value if no external manifest should be used |
- Source
- Type:
- boolean
getIsMain(adaptation) → {boolean}
Checks if the role of the specified AdaptationSet is set to main
Name | Type | Description |
---|---|---|
adaptation | object |
- Source
- Type:
- boolean
getIsPatch(manifest) → {boolean}
Checks if the manifest is actually just a patch manifest
Name | Type | Description |
---|---|---|
manifest | object |
- Source
- Type:
- boolean
getIsTypeOf(adaptation, type) → {boolean}
Checks if the given AdaptationSet is from the given media type
Name | Type | Description |
---|---|---|
adaptation | object | |
type | string |
- Source
- Type:
- boolean
getLocation(manifest) → {String}
Returns the location element of the MPD
Name | Type | Description |
---|---|---|
manifest | object |
- Source
location
- Type:
- String
getManifestUpdatePeriod(manifest, latencyOfLastUpdate) → {NaN|number}
Returns the manifest update period used for dynamic manifests
Name | Type | Default | Description |
---|---|---|---|
manifest | object | ||
latencyOfLastUpdate | number | 0 |
- Source
manifestUpdatePeriod
- Type:
- NaN |
number
getMaxIndexForBufferType(bufferType, periodIdx) → {number}
This method returns the current max index based on what is defined in the MPD.
Name | Type | Description |
---|---|---|
bufferType | string | String 'audio' or 'video', |
periodIdx | number | Make sure this is the period index not id |
- Source
- Type:
- number
getMediaInfoForType(streamInfo, type) → {null|MediaInfo}
Returns a MediaInfo object for a given media type and the corresponding streamInfo.
Name | Type | Description |
---|---|---|
streamInfo | object | |
type | MediaType |
- Source
mediaInfo
- Type:
- null |
MediaInfo
getMpd(externalManifest) → {object}
Returns an MPD object
Name | Type | Description |
---|---|---|
externalManifest | object | Omit this value if no external manifest should be used |
- Source
MPD
- Type:
- object
getPatchLocation(manifest) → {Array.<PatchLocation>}
Returns the patch locations of the MPD if existing and if they are still valid
Name | Type | Description |
---|---|---|
manifest | object |
- Source
patch location
- Type:
- Array.<PatchLocation>
getPeriodById(id) → {object|null}
Returns the voPeriod object for a given id
Name | Type | Description |
---|---|---|
id | String |
- Source
- Type:
- object |
null
getProducerReferenceTimes(streamInfo, mediaInfo) → {object}
Returns the ProducerReferenceTimes as saved in the DashManifestModel if present
Name | Type | Description |
---|---|---|
streamInfo | object | |
mediaInfo | object |
- Source
producerReferenceTimes
- Type:
- object
getPublishTime(manifest) → {Date|null}
Returns the publish time from the manifest
Name | Type | Description |
---|---|---|
manifest | object |
- Source
publishTime
- Type:
- Date |
null
getRealAdaptation(streamInfo, mediaInfo) → {object}
Returns the AdaptationSet as saved in the DashManifestModel
Name | Type | Description |
---|---|---|
streamInfo | object | |
mediaInfo | object |
- Source
realAdaptation
- Type:
- object
getRealPeriodByIndex(index) → {object}
Returns the period as defined in the DashManifestModel for a given index
Name | Type | Description |
---|---|---|
index | number |
- Source
- Type:
- object
getRegularPeriods(externalManifest) → {Array}
Returns all periods of the MPD
Name | Type | Description |
---|---|---|
externalManifest | object | Omit this value if no external manifest should be used |
- Source
periods
- Type:
- Array
getSuggestedPresentationDelay() → {String}
Returns the suggestedPresentationDelay as specified in the manifest
- Source
suggestedPresentationDelay
- Type:
- String
getUTCTimingSources() → {Array}
Returns the UTC Timing Sources specified in the manifest
- Source
utcTimingSources
- Type:
- Array
getVoRepresentations(mediaInfo) → {Array}
Returns all voRepresentations for a given mediaInfo
Name | Type | Description |
---|---|---|
mediaInfo | object |
- Source
voReps
- Type:
- Array
isPatchValid(manifest, patch) → {boolean}
Checks if the supplied manifest is compatible for application of the supplied patch
Name | Type | Description |
---|---|---|
manifest | object | |
patch | object |
- Source
- Type:
- boolean