Looking for the old docs? Go here

Providers

DASH

This provider enables streaming media using Dynamic Adaptive Streaming over HTTP (DASH) protocol.

This provider is used to embed streamable video content into documents using the native <video> element, and supports streaming media using the Dynamic Adaptive Streaming over HTTP (DASH) protocol. The provider will use dash.js to add support for DASH as it’s not supported natively in any browser. It works anywhere Media Source Extensions (MSE) or Managed Media Source (MMS) is supported.

INFO

Refer to the Player component if you’re looking for props, methods, and events.

You’ll need to install dash.js if you’re using the provider locally (i.e., not over a CDN):

terminal
    
    

You can set a DASH source on the player like so:

    
    

The DASH source URL should include the .mpd file extension.

If the source URL does not contain a file extension, you must provide the application/dash+xml type hint.

The following are valid as they have a file extension or type hint:

  • src="https://example.com/dash.mpd"
  • src = { src: "https://example.com/dash", type: "application/dash+xml" }

The provider will default to loading dashjs from JSDelivr. We load the default bundle in development, and the minified version in production:

    
    
INFO

You can point library at any URL that re-exports dashjs@^4.0. This means you can use your own server or CDN if desired.

You can also load dashjs by statically, or dynamically importing it and setting the library property on the provider like so:

    
    

Regardless how you decide to load dashjs (NPM/CDN), the provider will fire the following events on the player while loading the library:

    
    

You can configure dashjs using the config property on the provider like so:

    
    

You can obtain a reference to the dashjs instance like so:

    
    

All dashjs events can be listened to directly off the player component:

    
    
CallbackType
onDashAdaptationSetRemovedNoCapabilities
function
onDashAstInFuture
function
onDashBaseUrlsUpdated
function
onDashBufferEmpty
function
onDashBufferLevelStateChanged
function
onDashBufferLevelUpdated
function
onDashBufferLoaded
function
onDashCanPlay
function
onDashCanPlayThrough
function
onDashCaptionContainerResize
function
onDashCaptionRendered
function
onDashConformanceViolation
function
onDashContentSteeringRequestCompleted
function
onDashCueEnter
function
onDashCueExit
function
onDashDvbFontDownloadAdded
function
onDashDvbFontDownloadComplete
function
onDashDvbFontDownloadFailed
function
onDashDynamicToStatic
function
onDashError
function
onDashEventModeOnReceive
function
onDashEventModeOnStart
function
onDashFragmentLoadingAbandoned
function
onDashFragmentLoadingCompleted
function
onDashFragmentLoadingProgress
function
onDashFragmentLoadingStarted
function
onDashInbandPrft
function
onDashInstance
function
onDashLibLoadError
function
onDashLibLoadStart
function
onDashLibLoaded
function
onDashLog
function
onDashManagedMediaSourceEndStreaming
function
onDashManagedMediaSourceStartStreaming
function
onDashManifestLoaded
function
onDashManifestLoadingFinished
function
onDashManifestLoadingStarted
function
onDashManifestValidityChanged
function
onDashMetricAdded
function
onDashMetricChanged
function
onDashMetricUpdated
function
onDashMetricsChanged
function
onDashPeriodSwitchCompleted
function
onDashPeriodSwitchStarted
function
onDashPlaybackEnded
function
onDashPlaybackError
function
onDashPlaybackLoadedData
function
onDashPlaybackMetadataLoaded
function
onDashPlaybackNotAllowed
function
onDashPlaybackPaused
function
onDashPlaybackPlaying
function
onDashPlaybackProgress
function
onDashPlaybackRateChanged
function
onDashPlaybackSeeked
function
onDashPlaybackSeeking
function
onDashPlaybackStalled
function
onDashPlaybackStarted
function
onDashPlaybackTimeUpdated
function
onDashPlaybackVolumeChanged
function
onDashPlaybackWaiting
function
onDashQualityChangeRendered
function
onDashQualityChangeRequested
function
onDashRepresentationSwitch
function
onDashStreamActivated
function
onDashStreamDeactivated
function
onDashStreamInitialized
function
onDashStreamInitializing
function
onDashStreamTeardownComplete
function
onDashStreamUpdated
function
onDashTextTrackAdded
function
onDashTextTracksAdded
function
onDashThroughputMeasurementStored
function
onDashTrackChangeRendered
function
onDashTtmlParsed
function
onDashTtmlToParse
function
onDashUnsupported
function

All DASH event types are prefixed with DASH and end with Event like so:

    
    

You can obtain a reference to the underlying HTMLVideoElement element like so:

    
    

The HTMLVideoElement can also be referenced on all media events like so:

    
    

Previous