This plugin provides the dash
engine for
playback of DASH streams.
Load the latest plugin after the Flowplayer script:
<script src="//releases.flowplayer.org/6.0.5/flowplayer.min.js"></script>
<script src="//releases.flowplayer.org/dashjs/flowplayer.dashjs.min.js"></script>
Sources configuration:
clip: {
sources: [
{ type: "application/dash+xml", src: "//example.com/video.mpd" },
{ type: "application/x-mpegurl", src: "//example.com/video.m3u8" },
{ type: "video/webm", src: "//example.com/video.webm" },
{ type: "video/mp4", src: "//example.com/video.mp4" }
]
}
The plugin provides the following player option:
The plugin provides the dash
option on the
global
player and
clip levels.
option | type | description | html configurable |
---|---|---|---|
dash |
object |
Signals the browser which playback capabilites are expected of its MediaSource implementation. |
no |
The dash
configuration object accepts the following parameters:
option | default value | description |
---|---|---|
bufferOccupancyABR |
false |
Set to true if dash.js' new ABR logic should be applied. Caveat: not stable yet. |
type |
video/mp4 |
The video format the browser's MediaSource implementation should be able to play. |
codecs |
avc1.42c01e, mp4a.40.2 |
The codecs the browser's MediaSource implementation should be able to play. |
Caveat: codecs and even type feature detection and evaluation is broken in many browsers. Changing the configuration may have no or misleading effects. Not useful in production, only to a certain extent for debugging.
The DASH streams must be loaded from a server with a
cross domain policy
permitting GET
requests.
A fully documented demo can be found here.
- packs a compatibility tested version - current: RC3 v2.0.0 - of dash.js by the Dash Industry Forum
- engine is only loaded if the client supports MPEG-DASH, see also the
codecs
option - also available for Flowplayer version 5.x (demo) - not developed anymore, uses v1.6.0 of dash.js
Note: dash.js v2 is currently in development, no sample player available.
DASH is not a fixed standard yet, but a moving target. As the plugin is based on dash.js stream compatibility can be cross-checked in the latest dash.js sample player.
Caveat: WebM-DASH streams are extremely unlikely to work correctly with dash.js - or any other available client library we know about. - Hence historically the name of the plugin Git repository.
If MP4Box by GPAC is used to create the MPEG-DASH streams our current recommendation is:
-bs-switching 'merge'
or-bs-switching 'no'
should be used to make the streams work in Mac OS Safari and Windows Internet Explorer. These clients do not support the avc3 codec version resulting from the defaultinband
value.
Disclaimer: The above recommendation is based on
MP4Box - GPAC version 0.5.2-DEV-rev566-g4c06d0f-master
. Other versions may yield different results
with different consequences. They might also be affected by other members of a transcoding
toolchain.
Note: This section does currently not apply as dash.js v2 assets are not yet available from their CDN!
A quick way to find out whether the currently packed version of dash.js is causing a problem is to load the components separately using the latest development build or release from the dash.js CDN:
<script src="//releases.flowplayer.org/6.0.5/flowplayer.min.js"></script>
<!-- load dash.js latest release -->
<!-- <script src="//cdn.dashjs.org/v1.6.0/dash.all.js"></script> -->
<!-- or load dash.js latest dev build -->
<script src="//cdn.dashjs.org/latest/dash.all.js"></script>
<!-- load latest plugin standalone -->
<script src="//releases.flowplayer.org/dashjs/flowplayer.dashjs.js"></script>
Conversely, to find out whether there's a problem with the actual plugin component can be tested by exclusion with a simple page using bare dash.js, like:
<!DOCTYPE html>
<html>
<head>
<script src="//releases.flowplayer.org/dashjs/dash.all.js"></script>
<script>
window.onload = function () {
Dash.createAll();
};
</script>
</head>
<body>
<video class="dashjs-player" controls>
<source type="application/dash+xml" src="//example.com/testvideo.mpd">
</video>
</body>
</html>
- encrypted streams not yet supported
- Android: Until
this bug fix
has propagated onto devices, streams with High profile AAC audio (
mp4a.40.5
) may not play. MediaSource
video type and codecs feature detection via JavaScript is broken in many clients in a similar fashion as for SOURCE/VIDEO tag type attributes.