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.
Refer to the Player component if you’re looking for props, methods, and events.
Install
Section titled InstallYou’ll need to install dash.js
if you’re using the provider locally (i.e., not
over a CDN):
Source
Section titled SourceYou can set a DASH source on the player like so:
Source Types
Section titled Source TypesThe 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" }
Loading
Section titled LoadingThe provider will default to loading dashjs
from JSDelivr. We load the default
bundle in development, and the minified version in production:
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.
Importing
Section titled ImportingYou can also load dashjs
by statically, or dynamically importing it and setting the library
property on the provider like so:
Load Events
Section titled Load EventsRegardless how you decide to load dashjs
(NPM/CDN), the provider will fire the following
events on the player while loading the library:
Configuring
Section titled ConfiguringYou can configure dashjs
using the config
property on the provider like so:
Instance
Section titled InstanceYou can obtain a reference to the dashjs
instance like so:
Events
Section titled EventsAll dashjs events can be listened to directly off the player component:
Callback | Type |
---|---|
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
| function |
Event Types
Section titled Event TypesAll DASH event types are prefixed with DASH
and end with Event
like so:
Element
Section titled ElementYou can obtain a reference to the underlying HTMLVideoElement
element like so:
Event Target
Section titled Event TargetThe HTMLVideoElement
can also be referenced on all media events like so: