1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-14 11:23:30 +02:00
video.js/build/source-loader.js

87 lines
2.9 KiB
JavaScript
Raw Normal View History

// 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/xhr.js",
2013-12-03 04:03:32 +03:00
"src/js/util.js",
"src/js/event-emitter.js",
"src/js/component.js",
"src/js/button.js",
"src/js/slider.js",
"src/js/menu.js",
Better error handling. closes #1197 Squashed commit of the following: commit 81d785980d3f3e4c1025f7b421f0ecb7320469f1 Author: Steve Heffernan <steve@zencoder.com> Date: Mon May 12 12:53:59 2014 -0700 Removed unneeded comments commit c7ad7322e49df9cb22665692dbfe615dfa44758f Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 9 14:29:31 2014 -0700 Addressed comments in #1191 Now clearing errors on loadstart events. Added some default error messages. commit a742239d0e799fa6a5fee056cc37b3c2e3ab4510 Author: Steve Heffernan <steve@zencoder.com> Date: Wed May 7 15:38:31 2014 -0700 Fixed the error display to hide by default commit 561c3f844956db6f532cae8ed81a86cc39b10db1 Author: Steve Heffernan <steve@zencoder.com> Date: Mon May 5 10:44:47 2014 -0700 Added support for displaying a message for the error. commit 22142078427ead85548c4755bf1943a0a07b22b4 Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 17:18:22 2014 -0700 Updated spinner to hide on all errors commit 95d7e7027467cf96b14db6692d93c7c7f41c5810 Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 15:37:44 2014 -0700 Exported ErrorDisplay commit 11ca9cdd8db4d1559f5d1908c4e67be32ca7a25e Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 15:35:46 2014 -0700 Updated flash tech to support new errors commit 56cbe66f4233e54f13550367590864102f5de0fe Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 13:06:49 2014 -0700 Started on better error handling and displaying in the UI when an error has occurred. commit 740014c57b264079cf4084965a9384b49a7c0f64 Author: Steve Heffernan <steve@zencoder.com> Date: Wed Apr 30 16:11:33 2014 -0700 Added better global log/error/warn functions. Added sinon.js for stubs in tests. Updated grunt version to satisfy peer dependency warning.
2014-05-13 03:08:48 +03:00
"src/js/media-error.js",
"src/js/fullscreen-api.js",
"src/js/player.js",
"src/js/control-bar/control-bar.js",
Basic UI for Live Squashed commit of the following: commit 2c5d4d523e2e1f3a1bcdafda292d6a0ebea7a200 Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 15:02:37 2014 -0700 update control text for liveDisplay component commit 10f21cc2a09b6823a73fae4cf1881490f9038d30 Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 12:23:20 2014 -0700 whitespace fix commit 6a093d67989479f63ed4ac6bdddd5d1a3d0b08bb Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 12:21:42 2014 -0700 remove window scope of infinity commit 2dd8284bd3c7b2c7692a78563c3cfe9558f25ab4 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 commit f940bef8b50156c5b8fcd969c9b5d39be9fe5589 Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Tue Apr 1 10:01:27 2014 -0700 update to less than zero on player durationChange commit 554c003dac640b7a658355cd46b6ab146cf50b24 Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Mon Mar 31 17:26:13 2014 -0700 update exports, fix tests commit 2fb10cb06a65c3f91342563bfa925d9a472ede33 Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Mon Mar 31 13:39:00 2014 -0700 fix tests, remove update display list in LiveDisplay commit bc47c5ed67e036c79067ebc6666b310fd0b68d04 Author: Tom Johnson <seniorflexdeveloper@gmail.com> Date: Mon Mar 31 13:13:43 2014 -0700 Basic UI for Live
2014-04-02 03:19:28 +03:00
"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/control-bar/playback-rate-menu-button.js",
"src/js/poster.js",
"src/js/loading-spinner.js",
"src/js/big-play-button.js",
Better error handling. closes #1197 Squashed commit of the following: commit 81d785980d3f3e4c1025f7b421f0ecb7320469f1 Author: Steve Heffernan <steve@zencoder.com> Date: Mon May 12 12:53:59 2014 -0700 Removed unneeded comments commit c7ad7322e49df9cb22665692dbfe615dfa44758f Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 9 14:29:31 2014 -0700 Addressed comments in #1191 Now clearing errors on loadstart events. Added some default error messages. commit a742239d0e799fa6a5fee056cc37b3c2e3ab4510 Author: Steve Heffernan <steve@zencoder.com> Date: Wed May 7 15:38:31 2014 -0700 Fixed the error display to hide by default commit 561c3f844956db6f532cae8ed81a86cc39b10db1 Author: Steve Heffernan <steve@zencoder.com> Date: Mon May 5 10:44:47 2014 -0700 Added support for displaying a message for the error. commit 22142078427ead85548c4755bf1943a0a07b22b4 Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 17:18:22 2014 -0700 Updated spinner to hide on all errors commit 95d7e7027467cf96b14db6692d93c7c7f41c5810 Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 15:37:44 2014 -0700 Exported ErrorDisplay commit 11ca9cdd8db4d1559f5d1908c4e67be32ca7a25e Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 15:35:46 2014 -0700 Updated flash tech to support new errors commit 56cbe66f4233e54f13550367590864102f5de0fe Author: Steve Heffernan <steve@zencoder.com> Date: Fri May 2 13:06:49 2014 -0700 Started on better error handling and displaying in the UI when an error has occurred. commit 740014c57b264079cf4084965a9384b49a7c0f64 Author: Steve Heffernan <steve@zencoder.com> Date: Wed Apr 30 16:11:33 2014 -0700 Added better global log/error/warn functions. Added sinon.js for stubs in tests. Updated grunt version to satisfy peer dependency warning.
2014-05-13 03:08:48 +03:00
"src/js/error-display.js",
"src/js/media/media.js",
"src/js/media/html5.js",
"src/js/media/flash.js",
"src/js/media/flash.rtmp.js",
"src/js/media/loader.js",
"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",
"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>')
}
}