Skip to content

Commit

Permalink
Add initial dash support
Browse files Browse the repository at this point in the history
  • Loading branch information
jbroberg committed Nov 7, 2016
1 parent f62c1e8 commit 2b9a865
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion example.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
<video id="video-container" class="video-js vjs-default-skin" preload="auto" crossOrigin="anonymous" width="100%" height="100%" data-setup="{}" controls playsinline webkit-playsinline>
<source src="https://cdn-au.metacdn.com/jumipqxo/1u2Jh28/20160823050905_file_id14719289501962016_08_08_08_22_16_er_MP4-HIGH-WEBM_VP9.webm" type="video/webm">
<source src="https://cdn-au.metacdn.com/jumipqxo/1lgi0Am/20160823050905_file_id14719289501962016_08_08_08_22_16_er_MP4-HIGH-MP4.mp4" type="video/mp4">
<!-- iOS devices need a local/relative source (same host/domain) due to CORS bug -->
<!--
<source src="http://cdn-au.metacdn.com/jumipqxo/24CqTuS/20160823050905_file_id14719289501962016_08_08_08_22_16_er_MP4-PLAYLIST_1478220740600.mpd" type="application/dash+xml"
-->
<!-- iOS devices need a local/relative source (same host/domain) due to CORS bug: https://bugs.webkit.org/show_bug.cgi?id=135379 -->
</video>

<!--
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,29 @@
"type" : "git",
"url" : "https://github.com/MetaCDN/videojs-vr"
},
"main": "src/js/videojs.vr.js",
"scripts": {
"build": "mkdir -p dist & npm run build-js & npm run build-css",
"build-js": "browserify ./src/js/player.js > ./dist/player.full.js",
"build-css": "browserify -g browserify-css ./src/js/player-skin.js -o ./dist/player-skin.js",
"serve": "npm run build & nodemon ./server.js",
"clean": "rm -rf dist & rm -rf node_modules"
},
"dependencies": {
"video.js": "^5.11.7",
"three": "^0.82.0",
"webvr-boilerplate": "MetaCDN/webvr-boilerplate",
"webvr-polyfill": "^0.9.20"
},
"devDependencies": {
"browserify": "13.0.0",
"browserify-css": "0.9.1",
"video.js": "^5.11.7",
"three": "^0.82.0",
"webvr-boilerplate": "MetaCDN/webvr-boilerplate",
"webvr-polyfill": "^0.9.20",
"dashjs": "^2.2.0",
"videojs-contrib-dash": "^2.5.1",
"express": "4.13.4",
"express-http-proxy": "0.6.0",
"cors": "2.7.1",
Expand Down
2 changes: 2 additions & 0 deletions src/js/player.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
var videojs = global.videojs = require('video.js');
require('dashjs');
require('videojs-contrib-dash');
global.THREE = require('three');
require('three/examples/js/controls/VRControls.js');
require('three/examples/js/effects/VREffect.js');
Expand Down

0 comments on commit 2b9a865

Please sign in to comment.