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:

    
    

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

    
    
INFO

You can find a complete list of player events in the component API reference.

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