Module: DashAdapter

The DashAdapter module can be accessed using the MediaPlayer API getDashAdapter()

Source:

Methods


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
string

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

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

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 location of the MPD if one exists and it is still valid

Parameters:
Name Type Description
manifest object
Source:
Returns:

patch location

Type
String | null

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

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