Module: DashAdapter

Methods


getAdaptationForType(periodIndex, type, streamInfo)

Returns the AdaptationSet for a given period 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 the mediaInfo for a given mediaType

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

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.

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

getRealAdaptation(streamInfo, mediaInfo)

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