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