mirror of
https://github.com/videojs/video.js.git
synced 2024-12-29 02:57:21 +02:00
6a097c0236
Squashed commit of the following: commit2c5d4d523e
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 15:02:37 2014 -0700 update control text for liveDisplay component commit10f21cc2a0
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 12:23:20 2014 -0700 whitespace fix commit6a093d6798
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 12:21:42 2014 -0700 remove window scope of infinity commit2dd8284bd3
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 12:12:13 2014 -0700 update to fix infinity capitalization. only do css logic on valid duration. set any duration of less than zero to window.Infinity commitf940bef8b5
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 10:01:27 2014 -0700 update to less than zero on player durationChange commit554c003dac
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Mon Mar 31 17:26:13 2014 -0700 update exports, fix tests commit2fb10cb06a
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Mon Mar 31 13:39:00 2014 -0700 fix tests, remove update display list in LiveDisplay commitbc47c5ed67
Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Mon Mar 31 13:13:43 2014 -0700 Basic UI for Live
75 lines
2.5 KiB
JavaScript
75 lines
2.5 KiB
JavaScript
// 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",
|
|
"src/js/core-object.js",
|
|
"src/js/events.js",
|
|
"src/js/lib.js",
|
|
"src/js/util.js",
|
|
"src/js/component.js",
|
|
"src/js/button.js",
|
|
"src/js/slider.js",
|
|
"src/js/menu.js",
|
|
"src/js/player.js",
|
|
"src/js/control-bar/control-bar.js",
|
|
"src/js/control-bar/live-display.js",
|
|
"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",
|
|
"src/js/poster.js",
|
|
"src/js/loading-spinner.js",
|
|
"src/js/big-play-button.js",
|
|
"src/js/media/media.js",
|
|
"src/js/media/html5.js",
|
|
"src/js/media/flash.js",
|
|
"src/js/media/loader.js",
|
|
"src/js/tracks.js",
|
|
"src/js/json.js",
|
|
"src/js/setup.js",
|
|
"src/js/plugins.js"
|
|
];
|
|
|
|
// 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>')
|
|
}
|
|
}
|
|
|
|
|