2013-02-23 06:26:58 +03:00
|
|
|
// This file is used to load the video.js source files into a page
|
|
|
|
// in the correct order based on dependencies.
|
|
|
|
// When you create a new source file you will need to add
|
|
|
|
// it to the list below to use it in sandbox/index.html and
|
|
|
|
// test/index.html
|
|
|
|
|
|
|
|
// You can use the projectRoot variable to adjust relative urls
|
|
|
|
// that this script loads. By default it's "../", which is what /sandbox
|
|
|
|
// and /test need. If you had sandbox/newDir/index.html, in index.html you
|
|
|
|
// would set projectRoot = "../../"
|
|
|
|
|
|
|
|
// We could use somehting like requireJS to load files, and at one point
|
|
|
|
// we used goog.require/provide to load dependencies, but that seems like
|
|
|
|
// overkill with the small number of files we actually have.
|
|
|
|
|
|
|
|
// ADD NEW SOURCE FILES HERE
|
|
|
|
var sourceFiles = [
|
|
|
|
"src/js/core.js",
|
2013-04-09 23:43:35 +03:00
|
|
|
"src/js/core-object.js",
|
2013-02-23 06:26:58 +03:00
|
|
|
"src/js/events.js",
|
|
|
|
"src/js/lib.js",
|
2014-12-03 00:22:34 +02:00
|
|
|
"src/js/xhr.js",
|
2013-12-03 04:03:32 +03:00
|
|
|
"src/js/util.js",
|
2015-02-14 01:18:07 +02:00
|
|
|
"src/js/event-emitter.js",
|
2013-02-23 06:26:58 +03:00
|
|
|
"src/js/component.js",
|
2013-04-09 23:43:35 +03:00
|
|
|
"src/js/button.js",
|
|
|
|
"src/js/slider.js",
|
|
|
|
"src/js/menu.js",
|
2014-05-13 03:08:48 +03:00
|
|
|
"src/js/media-error.js",
|
2014-05-16 00:46:28 +03:00
|
|
|
"src/js/fullscreen-api.js",
|
2013-02-23 06:26:58 +03:00
|
|
|
"src/js/player.js",
|
2013-05-03 05:03:29 +03:00
|
|
|
"src/js/control-bar/control-bar.js",
|
2014-04-02 03:19:28 +03:00
|
|
|
"src/js/control-bar/live-display.js",
|
2013-05-03 05:03:29 +03:00
|
|
|
"src/js/control-bar/play-toggle.js",
|
|
|
|
"src/js/control-bar/time-display.js",
|
|
|
|
"src/js/control-bar/fullscreen-toggle.js",
|
|
|
|
"src/js/control-bar/progress-control.js",
|
|
|
|
"src/js/control-bar/volume-control.js",
|
|
|
|
"src/js/control-bar/mute-toggle.js",
|
|
|
|
"src/js/control-bar/volume-menu-button.js",
|
2014-05-14 00:02:02 +03:00
|
|
|
"src/js/control-bar/playback-rate-menu-button.js",
|
2013-04-09 23:43:35 +03:00
|
|
|
"src/js/poster.js",
|
|
|
|
"src/js/loading-spinner.js",
|
|
|
|
"src/js/big-play-button.js",
|
2014-05-13 03:08:48 +03:00
|
|
|
"src/js/error-display.js",
|
2013-05-03 05:03:29 +03:00
|
|
|
"src/js/media/media.js",
|
|
|
|
"src/js/media/html5.js",
|
|
|
|
"src/js/media/flash.js",
|
2014-12-03 00:22:34 +02:00
|
|
|
"src/js/media/flash.rtmp.js",
|
2013-05-03 05:03:29 +03:00
|
|
|
"src/js/media/loader.js",
|
2015-02-14 01:18:07 +02:00
|
|
|
"src/js/tracks/text-track-enums.js",
|
|
|
|
"src/js/tracks/text-track.js",
|
|
|
|
"src/js/tracks/text-track-list.js",
|
|
|
|
"src/js/tracks/text-track-cue-list.js",
|
|
|
|
"src/js/tracks/text-track-controls.js",
|
|
|
|
"src/js/tracks/text-track-settings.js",
|
2013-02-23 06:26:58 +03:00
|
|
|
"src/js/json.js",
|
|
|
|
"src/js/setup.js",
|
2013-04-09 23:43:35 +03:00
|
|
|
"src/js/plugins.js"
|
2013-02-23 06:26:58 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
// Allow overriding the default project root
|
|
|
|
var projectRoot = projectRoot || '../';
|
|
|
|
|
|
|
|
function loadScripts(scriptsArr){
|
|
|
|
for (var i = 0; i < scriptsArr.length; i++) {
|
|
|
|
// Using document.write because that's the easiest way to avoid triggering
|
|
|
|
// asynchrnous script loading
|
|
|
|
document.write( "<script src='" + projectRoot + scriptsArr[i] + "'><\/script>" );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// We use this file in the grunt build script to load the same source file list
|
|
|
|
// and don't want to load the scripts there.
|
|
|
|
if (typeof blockSourceLoading === 'undefined') {
|
|
|
|
loadScripts(sourceFiles);
|
|
|
|
|
|
|
|
// Allow for making Flash first
|
|
|
|
if (window.location.href.indexOf("?flash") !== -1) {
|
|
|
|
// Using doc.write to load this script to, otherwise when it runs videojs
|
|
|
|
// is undefined
|
|
|
|
document.write('<script>videojs.options.techOrder = ["flash"];videojs.options.flash.swf = "../src/swf/video-js.swf";</script>')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|