Skip to content

Commit

Permalink
Update contrib integration to use the latest code
Browse files Browse the repository at this point in the history
Link to the new videojs-dash-contrib project in the readme
Add a build of the new source-handler integration from that project
Update the examples to use the new integration
  • Loading branch information
jrivera committed Jul 24, 2015
1 parent 72239d1 commit 8e8a2e6
Show file tree
Hide file tree
Showing 6 changed files with 357 additions and 117 deletions.
8 changes: 4 additions & 4 deletions contrib/videojs/README.md
@@ -1,9 +1,9 @@
# videojs-tech-dashjs
# videojs-contrib-dash

An integration of [Video.js](http://videojs.com) and [Dash.js](https://github.com/Dash-Industry-Forum/dash.js).
[videojs-contrib-dash](https://github.com/videojs/videojs-contrib-dash) is a source-handler providing an integration of [Video.js](http://videojs.com) and [Dash.js](https://github.com/Dash-Industry-Forum/dash.js).

For Video.js, this adds support for MPEG-DASH in browsers that support the Media Source Extensions.
For Video.js, this adds support for MPEG-DASH in browsers that support the [Media Source Extensions](https://en.wikipedia.org/wiki/Media_Source_Extensions#Browser_support).

For Dash.js, this gives access to all of the [Video.js plugins](https://github.com/videojs/video.js/wiki/Plugins), [custom skinnning](http://designer.videojs.com), and support for falling back to other video formats (HLS/MP4/Webm) through other technologies (HTML5/Flash/Youtube).

See the included example.html for a demo of how to use this project.
See the included example.html for a demo of how to use this project.
32 changes: 10 additions & 22 deletions contrib/videojs/example.html
Expand Up @@ -3,13 +3,15 @@
<head>

<!-- Loading Video.js CDN-hosted Scripts from videojs.com -->
<link href="http://vjs.zencdn.net/4.6/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.6/video.js"></script>
<script src="../../dist/dash.debug.js"></script>
<link href="http://vjs.zencdn.net/4.12/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.12/video.js"></script>
<script src="../../dist/dash.all.js"></script>

<!-- Load the videojs-contrib-dash stylesheet anywhere -->
<link href="videojs-dash.css" rel="stylesheet">

<!-- Load videojs-tech-dashjs after both other projects -->
<script src="videojs-tech-dashjs.js"></script>
<!-- Load the videojs-contrib-dash script *after* both other projects -->
<script src="videojs-dash.js"></script>

</head>
<body>
Expand All @@ -18,27 +20,13 @@ <h1>videojs-tech-dashjs demo</h1>

<!-- Standard video.js embed with a DASH source -->
<video id="vid1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="264">
<source src="http://54.201.151.65/livesim/tfdt_32/testpic_2s/Manifest.mpd" type='application/dash+xml'>
<source src="http://rdmedia.bbc.co.uk/dash/ondemand/testcard/1/client_manifest-events.mpd" type='application/dash+xml'>
</video>

<script>
// Initalize the video.js player after videojs-tech-dashjs has loaded
var myPlayer = videojs('vid1', {context:new Dash.di.DashContext()});
// Initalize the video.js player after videojs-contrib-dash has loaded
var myPlayer = videojs('vid1');
</script>

<!-- EXAMPLE-SPECIFIC CODE -->
<style>
#dash-not-supported { width: 618px; border: 1px solid #c00; padding: 10px; margin: 10px 0; background-color: rgba(200,0,0,0.5); }
</style>
<script>
if (!videojs.Dashjs.isSupported()) {
var notSupportedDiv = document.createElement('div');
notSupportedDiv.id = 'dash-not-supported';
notSupportedDiv.innerHTML = 'DASH (through Media Source Extensions) is not supported in your browser, you are currently viewing a fallback MP4 playing through Flash or HTML5 video. Try using the latest version of <a href="http://windows.microsoft.com/en-us/internet-explorer/download-ie">IE</a> or <a href="https://www.google.com/intl/en/chrome/browser/">Chrome</a>.';
document.body.insertBefore(notSupportedDiv, document.body.firstChild);
}
</script>
<!-- END EXAMPLE-SPECIFIC CODE -->

</body>
</html>
1 change: 1 addition & 0 deletions contrib/videojs/videojs-dash.css
@@ -0,0 +1 @@
.vjs-dashjs-hide-errors .vjs-error-display{display:none!important}

0 comments on commit 8e8a2e6

Please sign in to comment.