Skip to content

Allowing simple embed using src attribute of video element, also updating readme file.

Vinay Rosenberg requested to merge github/fork/wilaw/development into development

Created by: wilaw

Extended the simple embed solution, which previously require a child element within the video element to specify the manifest, to also allow the src attribute to specify the manifest.

For example, you can now embed the player using only the following code in your web page:

<script src="pathtoyourcopyof/dash.all.js"></script>
...
<body onLoad="Dash.createAll()">
       <video class="dashjs-player" src="http://dash.edgesuite.net/envivio/dashpr/clear/Manifest.mpd" autoplay controls="true"/>
</body>

The code checks to see if the src contains the string ".mpd" before loading it. The autoplay settings are preserved. Added 2 new files to the samples section to illustrate these options and updated two other samples. This example shows 4 different ways of embedding the same video: http://mediapm.edgesuite.net/will/dash/temp/dashjs/1.4/auto-load-single-video-with-context-and-source.html

Also updated readme.md to include some simple instructions for non-developers who simply want to use the player without first creating the build environment.

Merge request reports