diff --git a/.gitignore b/.gitignore
index 2b029badf0..eb5ce80503 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,5 @@ test/*.map
node_modules
npm-debug.log
+sandbox/*
+!sandbox/*.example
diff --git a/.jshintrc b/.jshintrc
index 5acda60d6f..4835fca2bc 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -1,7 +1,4 @@
{
- // Hopefully people are smart enough not to use eval
- // But goog.base uses execScript so it throws an error.
- // When compiled goog.base is stripped out completely.
"evil" : true,
"validthis": true,
"browser" : true,
@@ -14,7 +11,7 @@
"trailing" : true,
"undef" : true,
"laxbreak" : true,
- "predef" : [ // Extra globals.
+ "predef" : [
"_V_",
"videojs",
"vjs",
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000000..e080af3d07
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,148 @@
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ concat: {
+ dist: {
+ src: [
+ 'src/js/goog.base.js',
+ 'src/js/core.js',
+ 'src/js/lib.js',
+ 'src/js/events.js',
+ 'src/js/component.js',
+ 'src/js/player.js',
+ 'src/js/media.js',
+ 'src/js/media.html5.js',
+ 'src/js/media.flash.js',
+ 'src/js/controls.js',
+ 'src/js/tracks.js',
+ 'src/js/setup.js',
+ 'src/js/json.js',
+ 'src/js/exports.js'
+ ],
+ dest: 'dist/video.js'
+ },
+ test: {
+ src: [
+ 'test/unit/phantom-logging.js',
+ 'test/unit/component.js',
+ 'test/unit/core.js',
+ 'test/unit/events.js',
+ 'test/unit/lib.js',
+ 'test/unit/media.html5.js',
+ 'test/unit/player.js',
+ 'test/unit/setup.js',
+ ],
+ dest: 'test/unit.js'
+ }
+ },
+ // Current forEach issue: https://github.com/gruntjs/grunt/issues/610
+ // npm install https://github.com/gruntjs/grunt-contrib-jshint/archive/7fd70e86c5a8d489095fa81589d95dccb8eb3a46.tar.gz
+ jshint: {
+ dist: {
+ src: ["dist/video.js"],
+ options: {
+ jshintrc: ".jshintrc"
+ }
+ }
+ },
+ qunit: {
+ all: ['test/unit.html']
+ },
+ watch: {
+ files: [ "src/**/*.js" ],
+ tasks: "dev"
+ }
+
+ });
+
+ // Default task.
+ // grunt.registerTask('default', 'lint:beforeconcat concat lint:afterconcat');
+ // // Default task(s).
+ // grunt.registerTask('default', ['uglify']);
+
+ grunt.loadNpmTasks("grunt-contrib-concat");
+ grunt.loadNpmTasks("grunt-contrib-jshint");
+ grunt.loadNpmTasks("grunt-contrib-qunit");
+ grunt.loadNpmTasks("grunt-contrib-watch");
+
+ grunt.registerTask( "dev", [ "compile" ] ); // "build:*:*", "jshint"
+ // compiled += grunt.file.read( filepath );
+
+ var exec = require('child_process').exec,
+ fs = require('fs'),
+ gzip = require('zlib').gzip;
+
+ grunt.registerMultiTask('build', 'Building Source', function(){
+ grunt.log.writeln(this.target)
+ if (this.target === 'latest') {
+ var files = this.data.files;
+ var dist = '';
+
+ // for (prop in this.file) {
+ // grunt.log.writeln(prop + ":" + this.file[prop])
+ // }
+
+ files.forEach(function(file){
+ dist += grunt.file.read('src/js/' + file)
+ });
+
+ grunt.file.write('dist/video.js', dist);
+ } else if (this.target === 'test') {
+ grunt.task.run('build:latest');
+ }
+
+ });
+
+ grunt.registerTask('compile', 'Minify JS files using Closure Compiler.', function() {
+ var done = this.async();
+
+ var command = 'java -jar build/compiler/compiler.jar';
+ command += ' --compilation_level ADVANCED_OPTIMIZATIONS';
+
+ var files = [
+ 'goog.base.js',
+ 'core.js',
+ 'lib.js',
+ 'events.js',
+ 'component.js',
+ 'player.js',
+ 'media.js',
+ 'media.html5.js',
+ 'media.flash.js',
+ 'controls.js',
+ 'tracks.js',
+ 'setup.js',
+ 'json.js',
+ 'exports.js'
+ ];
+
+ files.forEach(function(file){
+ command += ' --js=src/js/'+file;
+ });
+
+ command += ' --externs src/js/media.flash.externs.js';
+ // command += ' --formatting=pretty_print';
+ command += ' --js_output_file=test/video.compiled.js';
+ command += ' --create_source_map test/video.compiled.js.map --source_map_format=V3';
+ // command += ' --externs test/qunit-externs.js';
+ command += ' --output_wrapper "(function() {%output%})();//@ sourceMappingURL=video.compiled.js.map"';
+
+ exec(command, { maxBuffer: 500*1024 }, function(err, stdout, stderr){
+
+ if (err) {
+ grunt.warn(err);
+ done(false);
+ }
+
+ if (stdout) {
+ grunt.log.writeln(stdout);
+ }
+
+ grunt.log.writeln("done!")
+ done();
+ });
+ });
+
+};
diff --git a/design/Icon Design.png b/design/Icon Design.png
deleted file mode 100644
index ae1b79fe70..0000000000
Binary files a/design/Icon Design.png and /dev/null differ
diff --git a/design/loading.gif b/design/loading.gif
deleted file mode 100644
index 70b533298e..0000000000
Binary files a/design/loading.gif and /dev/null differ
diff --git a/design/skin.old.css b/design/skin.old.css
deleted file mode 100644
index 657ae32179..0000000000
--- a/design/skin.old.css
+++ /dev/null
@@ -1,190 +0,0 @@
-/* DEFAULT SKIN (override in another file)
-================================================================================
-Using all CSS to draw the controls. Images could be used if desired.
-Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
-so you can upgrade to newer versions easier. */
-
-.vjs-original-skin .vjs-controls {
- position: absolute; margin: 0; opacity: 0.85; color: #fff;
- display: block; /* Start hidden */
- left: 0; right: 0; /* 100% width of video-js-box */
- width: 100%;
- bottom: 0px; /* Distance from the bottom of the box/video. Keep 0. Use height to add more bottom margin. */
- height: 35px; /* Including any margin you want above or below control items */
- padding: 0; /* Controls are absolutely position, so no padding necessary */
- -webkit-transition: opacity 0.5s linear;
- -moz-transition: opacity 0.5s linear;
- -o-transition: opacity 0.5s linear;
- -ms-transition: opacity 0.5s linear;
- transition: opacity 0.5s linear;
-}
-
-.vjs-original-skin .vjs-control {
- position: absolute; /* Use top, bottom, left, and right to specifically position the control. */
- text-align: center; margin: 0; padding: 0;
- height: 25px; /* Default height of individual controls */
- top: 5px; /* Top margin to put space between video and controls when controls are below */
-
- /* CSS Background Gradients
- Using to give the aqua-ish look. */
- /* Default */ background-color: #0B151A;
- /* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 12px;
- /* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 12px;
-
- /* CSS Curved Corners */
- -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
-
- /* CSS Shadows */
- -webkit-box-shadow: 1px 1px 2px #000; -moz-box-shadow: 1px 1px 2px #000; box-shadow: 1px 1px 2px #000;
-}
-
-/* Placement of Control Items
- - Left side of pogress bar, use left & width
- - Rigth side of progress bar, use right & width
- - Expand with the video (like progress bar) use left & right
- (using div.x to make more specific than vjs-control style)
-*/
-.vjs-original-skin div.vjs-play-control { left: 5px; width: 25px; }
-.vjs-original-skin div.vjs-progress-control { left: 35px; right: 165px; } /* Using left & right so it expands with the width of the video */
-.vjs-original-skin div.vjs-time-control { width: 75px; right: 90px; } /* Time control and progress bar are combined to look like one */
-.vjs-original-skin div.vjs-volume-control { width: 50px; right: 35px; }
-.vjs-original-skin div.vjs-fullscreen-control { width: 25px; right: 5px; }
-
-/* Removing curved corners on progress control and time control to join them. */
-.vjs-original-skin div.vjs-progress-control {
- -webkit-border-top-right-radius: 0; -moz-border-radius-topright: 0; border-top-right-radius: 0;
- -webkit-border-bottom-right-radius: 0; -moz-border-radius-bottomright: 0; border-bottom-right-radius: 0;
-}
-.vjs-original-skin div.vjs-time-control {
- -webkit-border-top-left-radius: 0; -moz-border-radius-topleft: 0; border-top-left-radius: 0;
- -webkit-border-bottom-left-radius: 0; -moz-border-radius-bottomleft: 0; border-bottom-left-radius: 0;
-}
-
-/* Play/Pause
--------------------------------------------------------------------------------- */
-.vjs-original-skin .vjs-play-control { cursor: pointer !important; }
-/* Play Icon */
-.vjs-original-skin .vjs-play-control span { display: block; font-size: 0; line-height: 0; }
-.vjs-original-skin.vjs-paused .vjs-play-control span {
- width: 0; height: 0; margin: 8px 0 0 8px;
- /* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
- border-left: 10px solid #fff; /* Width & Color of play icon */
- /* Height of play icon is total top & bottom border widths. Color is transparent. */
- border-top: 5px solid rgba(0,0,0,0); border-bottom: 5px solid rgba(0,0,0,0);
-}
-.vjs-original-skin.vjs-playing .vjs-play-control span {
- width: 3px; height: 10px; margin: 8px auto 0;
- /* Drawing the pause bars with borders */
- border-top: 0px; border-left: 3px solid #fff; border-bottom: 0px; border-right: 3px solid #fff;
-}
-
-/* Progress
--------------------------------------------------------------------------------- */
-.vjs-original-skin .vjs-progress-holder { /* Box containing play and load progresses */
- position: relative; padding: 0; overflow:hidden; cursor: pointer !important;
- height: 9px; border: 1px solid #777;
- margin: 7px 1px 0 5px; /* Placement within the progress control item */
- -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
-}
-.vjs-original-skin .vjs-progress-holder div { /* Progress Bars */
- position: absolute; display: block; width: 0; height: 9px; margin: 0; padding: 0;
- left: 0; top: 0; /*Needed for IE6*/
- -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
-}
-.vjs-original-skin .vjs-play-progress {
- /* CSS Gradient */
- /* Default */ background: #fff;
- /* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#777));
- /* Firefox */ background: -moz-linear-gradient(top, #fff, #777);
-}
-.vjs-original-skin .vjs-load-progress {
- opacity: 0.8;
- /* CSS Gradient */
- /* Default */ background-color: #555;
- /* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#aaa));
- /* Firefox */ background: -moz-linear-gradient(top, #555, #aaa);
-}
-
-/* Time Display
--------------------------------------------------------------------------------- */
-.vjs-original-skin .vjs-time-control { font-size: 10px; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
-.vjs-original-skin .vjs-time-control span { line-height: 25px; /* Centering vertically */ }
-
-/* Volume
--------------------------------------------------------------------------------- */
-.vjs-original-skin .vjs-volume-control { cursor: pointer !important; }
-.vjs-original-skin .vjs-volume-control div { display: block; margin: 0 5px 0 5px; padding: 4px 0 0 0; }
-/* Drawing the volume icon using 6 span elements */
-.vjs-original-skin .vjs-volume-control div span { /* Individual volume bars */
- float: left; padding: 0; font-size: 0; line-height: 0;
- margin: 0 2px 0 0; /* Space between */
- width: 5px; height: 0px; /* Total height is height + bottom border */
- border-bottom: 18px solid #555; /* Default (off) color and height of visible portion */
-}
-.vjs-original-skin .vjs-volume-control div span.vjs-volume-level-on { border-color: #fff; /* Volume on bar color */ }
-/* Creating differnt bar heights through height (transparent) and bottom border (visible). */
-.vjs-original-skin .vjs-volume-control div span.vjs-vc-1 { border-bottom-width: 2px; height: 16px; }
-.vjs-original-skin .vjs-volume-control div span.vjs-vc-2 { border-bottom-width: 4px; height: 14px; }
-.vjs-original-skin .vjs-volume-control div span.vjs-vc-3 { border-bottom-width: 7px; height: 11px; }
-.vjs-original-skin .vjs-volume-control div span.vjs-vc-4 { border-bottom-width: 10px; height: 8px; }
-.vjs-original-skin .vjs-volume-control div span.vjs-vc-5 { border-bottom-width: 14px; height: 4px; }
-.vjs-original-skin .vjs-volume-control div span.vjs-vc-6 { margin-right: 0; }
-
-/* Fullscreen
--------------------------------------------------------------------------------- */
-.vjs-original-skin .vjs-fullscreen-control { cursor: pointer !important; }
-.vjs-original-skin .vjs-fullscreen-control div {
- padding: 0; text-align: left; vertical-align: top; cursor: pointer !important;
- margin: 5px 0 0 5px; /* Placement within the fullscreen control item */
- width: 20px; height: 20px;
-}
-/* Drawing the fullscreen icon using 4 span elements */
-.vjs-original-skin .vjs-fullscreen-control div span { float: left; margin: 0; padding: 0; font-size: 0; line-height: 0; width: 0; text-align: left; vertical-align: top; }
-.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-1 { /* Top-left triangle */
- margin-right: 3px; /* Space between top-left and top-right */
- margin-bottom: 3px; /* Space between top-left and bottom-left */
- border-top: 6px solid #fff; /* Height and color */
- border-right: 6px solid rgba(0,0,0,0); /* Width */
-}
-.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-2 { border-top: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
-.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-3 { clear: both; margin: 0 3px 0 0; border-bottom: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
-.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-4 { border-bottom: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
-/* Icon when video is in fullscreen mode */
-.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-1 { border: none; border-bottom: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
-.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-2 { border: none; border-bottom: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
-.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-3 { border: none; border-top: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
-.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-4 { border: none; border-top: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
-
-
-
-
-
-/* Big Play Button (at start)
----------------------------------------------------------*/
-.vjs-original-skin .vjs-big-play-button {
- display: block; /* Start hidden */ z-index: 2;
- position: absolute; top: 50%; left: 50%; width: 80px; height: 80px; margin: -43px 0 0 -43px; text-align: center; vertical-align: center; cursor: pointer !important;
- border: 3px solid #fff; opacity: 0.9;
- -webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px;
-
- /* CSS Background Gradients */
- /* Default */ background-color: #0B151A;
- /* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 40px;
- /* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 40px;
-
- /* CSS Shadows */
- -webkit-box-shadow: 4px 4px 8px #000; -moz-box-shadow: 4px 4px 8px #000; box-shadow: 4px 4px 8px #000;
-}
-
-.vjs-original-skin div.vjs-big-play-button:hover {
- -webkit-box-shadow: 0px 0px 80px #fff; -moz-box-shadow: 0px 0px 80px #fff; box-shadow: 0px 0px 80px #fff;
-}
-
-.vjs-original-skin div.vjs-big-play-button span {
- display: block; font-size: 0; line-height: 0;
- width: 0; height: 0; margin: 20px 0 0 23px;
- /* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
- border-left: 40px solid #fff; /* Width & Color of play icon */
- /* Height of play icon is total top & bottom border widths. Color is transparent. */
- border-top: 20px solid rgba(0,0,0,0); border-bottom: 20px solid rgba(0,0,0,0);
-}
\ No newline at end of file
diff --git a/dev.html.example b/dev.html.example
deleted file mode 100644
index 1d78f163b8..0000000000
--- a/dev.html.example
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
- HTML5 Video Player
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Video Playback Not Supported
-
-
-
-
-
-
diff --git a/package.json b/package.json
index 4e4f38f033..a36a671f98 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,33 @@
-{ "name": "Video.js"
-, "description": "An HTML5 and Flash video player with a common API and skin for both."
-, "version": "3.2.3"
-, "keywords": ["html5", "flash", "video", "player"]
-, "homepage": "http://videojs.com"
-, "author": "Steve Heffernan"
-, "scripts": { "test": "make test" }
-, "repository":
- { "type": "git"
- , "url": "https://github.com/zencoder/video-js.git"
- }
-, "devDependencies":
- { "jshint": "0.6.1"
- , "connect": "2.1.3"
- }
-}
\ No newline at end of file
+{
+ "name": "video.js",
+ "description": "An HTML5 and Flash video player with a common API and skin for both.",
+ "version": "3.2.3",
+ "keywords": [
+ "html5",
+ "flash",
+ "video",
+ "player"
+ ],
+ "homepage": "http://videojs.com",
+ "author": "Steve Heffernan",
+ "scripts": {
+ "test": "grunt qunit"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/zencoder/video-js.git"
+ },
+ "devDependencies": {
+ "grunt-cli": "~0.1.0",
+ "grunt": "0.4.0rc4",
+ "grunt-contrib-jshint": "~0.1.0",
+ "grunt-contrib-nodeunit": "~0.1.0",
+ "jshint": "0.6.1",
+ "connect": "2.1.3",
+ "grunt-contrib-uglify": "~0.1.0",
+ "grunt-closure-compiler": "0.0.13",
+ "grunt-contrib-watch": "~0.1.4",
+ "grunt-contrib-concat": "~0.1.1",
+ "grunt-contrib-qunit": "~0.1.0"
+ }
+}
diff --git a/sandbox/index.html.example b/sandbox/index.html.example
new file mode 100644
index 0000000000..b7be76f2ca
--- /dev/null
+++ b/sandbox/index.html.example
@@ -0,0 +1,53 @@
+
+
+
+
+ Video.js Sandbox
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ You can use /sandbox/ for writing and testing your own code. Nothing in /sandbox/ will get checked into the repo, except files that end in .example, so please don't edit or add those files. To get started make a copy of index.html.example and rename it to index.html.
+
+
+
+
+
+ Video Playback Not Supported
+
+
+
+
+
+
diff --git a/design/video-js.css b/src/css/video-js.css
similarity index 100%
rename from design/video-js.css
rename to src/css/video-js.css
diff --git a/src/css/video-js.fw.png b/src/css/video-js.fw.png
new file mode 100644
index 0000000000..2c7f208c21
Binary files /dev/null and b/src/css/video-js.fw.png differ
diff --git a/design/video-js.png b/src/css/video-js.png
similarity index 100%
rename from design/video-js.png
rename to src/css/video-js.png
diff --git a/src/component.js b/src/js/component.js
similarity index 100%
rename from src/component.js
rename to src/js/component.js
diff --git a/src/controls.js b/src/js/controls.js
similarity index 100%
rename from src/controls.js
rename to src/js/controls.js
diff --git a/src/core.js b/src/js/core.js
similarity index 100%
rename from src/core.js
rename to src/js/core.js
diff --git a/src/events.js b/src/js/events.js
similarity index 100%
rename from src/events.js
rename to src/js/events.js
diff --git a/src/exports.js b/src/js/exports.js
similarity index 100%
rename from src/exports.js
rename to src/js/exports.js
diff --git a/src/goog.base.js b/src/js/goog.base.js
similarity index 100%
rename from src/goog.base.js
rename to src/js/goog.base.js
diff --git a/src/json.js b/src/js/json.js
similarity index 100%
rename from src/json.js
rename to src/js/json.js
diff --git a/src/lib.js b/src/js/lib.js
similarity index 100%
rename from src/lib.js
rename to src/js/lib.js
diff --git a/src/media.flash.externs.js b/src/js/media.flash.externs.js
similarity index 100%
rename from src/media.flash.externs.js
rename to src/js/media.flash.externs.js
diff --git a/src/media.flash.js b/src/js/media.flash.js
similarity index 100%
rename from src/media.flash.js
rename to src/js/media.flash.js
diff --git a/src/media.html5.js b/src/js/media.html5.js
similarity index 100%
rename from src/media.html5.js
rename to src/js/media.html5.js
diff --git a/src/media.js b/src/js/media.js
similarity index 100%
rename from src/media.js
rename to src/js/media.js
diff --git a/src/player.js b/src/js/player.js
similarity index 100%
rename from src/player.js
rename to src/js/player.js
diff --git a/src/setup.js b/src/js/setup.js
similarity index 100%
rename from src/setup.js
rename to src/js/setup.js
diff --git a/src/tracks.js b/src/js/tracks.js
similarity index 100%
rename from src/tracks.js
rename to src/js/tracks.js
diff --git a/tech/flash/video-js.swf b/src/swf/video-js.swf
similarity index 100%
rename from tech/flash/video-js.swf
rename to src/swf/video-js.swf
diff --git a/tech/flash/swfobject.js b/tech/flash/swfobject.js
deleted file mode 100644
index 8eafe9dd83..0000000000
--- a/tech/flash/swfobject.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/* SWFObject v2.2
- is released under the MIT License
-*/
-var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad '}}aa.outerHTML='"+af+" ";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab 0 ? callback.apply(null, params) : callback.call();
- }
-
-
- /**
- * Stores submitted callbacks for each iframe being tracked and each
- * event for that iframe.
- *
- * @param eventName (String): Name of the event. Eg. api_onPlay
- * @param callback (Function): Function that should get executed when the
- * event is fired.
- * @param target_id (String) [Optional]: If handling more than one iframe then
- * it stores the different callbacks for different iframes based on the iframe's
- * id.
- */
- function storeCallback(eventName, callback, target_id) {
- if (target_id) {
- if (!eventCallbacks[target_id]) {
- eventCallbacks[target_id] = {};
- }
- eventCallbacks[target_id][eventName] = callback;
- }
- else {
- eventCallbacks[eventName] = callback;
- }
- }
-
- /**
- * Retrieves stored callbacks.
- */
- function getCallback(eventName, target_id) {
- if (target_id) {
- return eventCallbacks[target_id][eventName];
- }
- else {
- return eventCallbacks[eventName];
- }
- }
-
- function removeCallback(eventName, target_id) {
- if (target_id && eventCallbacks[target_id]) {
- if (!eventCallbacks[target_id][eventName]) {
- return false;
- }
- eventCallbacks[target_id][eventName] = null;
- }
- else {
- if (!eventCallbacks[eventName]) {
- return false;
- }
- eventCallbacks[eventName] = null;
- }
-
- return true;
- }
-
- /**
- * Returns a domain's root domain.
- * Eg. returns http://vimeo.com when http://vimeo.com/channels is sbumitted
- *
- * @param url (String): Url to test against.
- * @return url (String): Root domain of submitted url
- */
- function getDomainFromUrl(url) {
- if (url.substr(0, 2) === '//') {
- url = window.location.protocol + url;
- }
-
- var url_pieces = url.split('/'),
- domain_str = '';
-
- for(var i = 0, length = url_pieces.length; i < length; i++) {
- if(i<3) {domain_str += url_pieces[i];}
- else {break;}
- if(i<2) {domain_str += '/';}
- }
-
- return domain_str;
- }
-
- function isFunction(obj) {
- return !!(obj && obj.constructor && obj.call && obj.apply);
- }
-
- function isArray(obj) {
- return toString.call(obj) === '[object Array]';
- }
-
- // Give the init function the Froogaloop prototype for later instantiation
- Froogaloop.fn.init.prototype = Froogaloop.fn;
-
- // Listens for the message event.
- // W3C
- if (window.addEventListener) {
- window.addEventListener('message', onMessageReceived, false);
- }
- // IE
- else {
- window.attachEvent('onmessage', onMessageReceived);
- }
-
- // Expose froogaloop to the global object
- return (window.Froogaloop = window.$f = Froogaloop);
-
-})();
diff --git a/tech/youtube/youtube.html b/tech/youtube/youtube.html
deleted file mode 100644
index 33e5f73d57..0000000000
--- a/tech/youtube/youtube.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
- YouTube Test
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tech/youtube/youtube.js b/tech/youtube/youtube.js
deleted file mode 100644
index 8a4dfe070c..0000000000
--- a/tech/youtube/youtube.js
+++ /dev/null
@@ -1,369 +0,0 @@
-
-/* VideoJS-YouTube - YouTube iFrame Wrapper
-================================================================================ */
-_V_.youtube = _V_.PlaybackTech.extend({
-
- init: function(player, options){
- this.player = player;
-
- var source = options.source;
-
- // Extract the YouTube videoID from the source
- var videoId = this.getVideoId(source.src);
-
- // Which element to embed in
- var parentEl = options.parentEl;
-
- // Generate ID for iFrame
- var objId = player.el.id+"_youtube_api";
-
- // Create an iFrame for the YouTube player
- var iFrm = this.el = _V_.createElement("iframe", {
- id: objId + "_iframe",
- name: objId + "_iframe",
- className: "vjs-tech",
- scrolling: "no",
- marginWidth: 0,
- marginHeight: 0,
- frameBorder: 0,
- webkitAllowFullScreen: "",
- mozallowfullscreen: "",
- allowFullScreen: ""
- });
-
- // Store a global list of currently loading players
- _V_.youtube.loadingEls = _V_.youtube.loadingEls || [];
- _V_.youtube.loadingEls.push(parentEl);
-
- var playerOptions = player.options;
- var optionsParams = options.params || {};
-
- // Setup player parameters
- var params = {
- disablekb: 1,
- enablejsapi: 1,
- iv_load_policy: 3,
- modestbranding: 1,
- playerapiid: objId,
- wmode: "opaque", // Opaque is needed to overlay controls, but can affect playback performance (Flash only)
- rel: 0,
- showinfo: 0,
- showsearch: 0,
- controls: this.toBoolInt(optionsParams.ytcontrols || playerOptions.ytcontrols),
- autoplay: this.toBoolInt(optionsParams.autoplay || playerOptions.autoplay),
- loop: this.toBoolInt(optionsParams.loop || playerOptions.loop),
- hd: this.toBoolInt(optionsParams.hd || playerOptions.hd)
- };
-
- var p = (document.location.protocol == 'https:') ? 'https:' : 'http:';
-
- if (document.domain != 'localhost' && document.location.protocol != 'file:')
- params.origin = p + "//" + document.domain;
-
- this.player.apiArgs = {
- videoId: videoId,
- playerVars: params,
- events: {
- "onReady": _V_.youtube.onReady,
- "onStateChange": _V_.youtube.onStateChange,
- "onPlaybackQualityChange": _V_.youtube.onPlaybackQualityChange,
- "onError": _V_.youtube.onError
- }
- };
-
- _V_.addEvent(parentEl, "techready", _V_.proxy(this, function(){
- // YouTube JS API is ready, load the player
- iFrm.src = p + "//www.youtube.com/embed/" + videoId + "?" +
- this.makeQueryString(params);
- // Initialize the YouTube Player object. Only pass events as arguments,
- // since all of our other parameters went into the iFrame URL
- this.youtube = new YT.Player(iFrm, { events: this.player.apiArgs.events });
- }));
-
- // Add iFrame to player div
- _V_.insertFirst(iFrm, parentEl);
-
- _V_.youtube.updateVideoQuality(this.player, null);
-
- this.loadApi();
- },
-
- destroy: function(){
- this.el.parentNode.removeChild(this.el);
- this.youtube.destroy();
- delete this.youtube;
- },
-
- play: function(){ this.youtube.playVideo(); },
- pause: function(){ this.youtube.pauseVideo(); },
- paused: function(){
- var state = this.youtube.getPlayerState();
- return state !== YT.PlayerState.PLAYING &&
- state !== YT.PlayerState.BUFFERING;
- },
-
- src: function(src){
- delete this.player.error;
-
- // FIXME: Does this work or do we have to set the iFrame src again?
- var videoId = this.getVideoId(src);
- this.youtube.loadVideoById(videoId);
- },
- load: function(){ },
- poster: function(){
- var videoId = this.getVideoId(this.youtube.getVideoUrl());
- return "http://img.youtube.com/vi/" + videoId + "/0.jpg";
- },
-
- currentTime: function(){ return this.youtube.getCurrentTime() || 0; },
- setCurrentTime: function(seconds){
- this.youtube.seekTo(seconds, true);
- this.player.triggerEvent("timeupdate");
- },
-
- duration: function(){ return this.youtube.getDuration() || 0; },
- buffered: function(){
- var loadedBytes = this.youtube.getVideoBytesLoaded();
- var totalBytes = this.youtube.getVideoBytesTotal();
- if (!loadedBytes || !totalBytes) return 0;
-
- var duration = this.youtube.getDuration();
- var secondsBuffered = (loadedBytes / totalBytes) * duration;
- var secondsOffset = (this.youtube.getVideoStartBytes() / totalBytes) * duration;
- return _V_.createTimeRange(secondsOffset, secondsOffset + secondsBuffered);
- },
-
- volume: function(){
- if (isNaN(this.youtube.volumeVal))
- this.youtube.volumeVal = this.youtube.getVolume() / 100.0;
- return this.youtube.volumeVal;
- },
- setVolume: function(percentAsDecimal){
- if (percentAsDecimal != this.youtube.volumeVal) {
- this.youtube.volumeVal = percentAsDecimal;
- this.youtube.setVolume(percentAsDecimal * 100.0);
- this.player.triggerEvent("volumechange");
- }
- },
- muted: function(){ return this.youtube.isMuted(); },
- setMuted: function(muted){
- if (muted)
- this.youtube.mute();
- else
- this.youtube.unMute();
-
- // Volume changes do not show up in the API immediately, so we need
- // to wait for a moment
- var self = this;
- setTimeout(function() { self.player.triggerEvent("volumechange"); }, 50);
- },
-
- width: function(){ return this.el.offsetWidth; },
- height: function(){ return this.el.offsetHeight; },
-
- currentSrc: function(){ return this.youtube.getVideoUrl(); },
-
- preload: function(){ return false; },
- setPreload: function(val){ },
- autoplay: function(){ return !!this.player.apiArgs.playerVars.autoplay; },
- setAutoplay: function(val){ },
- loop: function(){ return !!this.player.apiArgs.playerVars.loop; },
- setLoop: function(val){
- this.player.apiArgs.playerVars.loop = (val ? 1 : 0);
- // We handle looping manually
- //this.youtube.setLoop(val);
- },
-
- supportsFullScreen: function(){ return false; },
- enterFullScreen: function(){ return false; },
-
- error: function(){ return this.player.error; },
- seeking: function(){ return false; },
- ended: function(){ return this.youtube.getPlayerState() === YT.PlayerState.ENDED; },
- videoWidth: function(){ return this.player.videoWidth; },
- videoHeight: function(){ return this.player.videoHeight; },
- controls: function(){ return this.player.options.controls; },
- defaultMuted: function(){ return false; },
-
- // Helpers ------------------------------------------------------------------
-
- makeQueryString: function(args) {
- var array = [];
- for (var key in args) {
- if (args.hasOwnProperty(key))
- array.push(encodeURIComponent(key) + "=" + encodeURIComponent(args[key]));
- }
- return array.join("&");
- },
-
- getVideoId: function(url) {
- return url.match(/v=([^&]+)/)[1];
- },
-
- toBoolInt: function(val) {
- return val ? 1 : 0;
- },
-
- loadApi: function() {
- // Check if the YouTube JS API has already been loaded
- var js, id = "youtube-jssdk", ref = document.getElementsByTagName("script")[0];
- if (_V_.el(id)) {
- window.onYouTubePlayerAPIReady();
- return;
- }
-
- // Asynchronously load the YouTube JS API
- var p = (document.location.protocol == "https:") ? "https:" : "http:";
- js = _V_.createElement("script", { id: id, async: true, src: p + "//www.youtube.com/player_api" });
- ref.parentNode.insertBefore(js, ref);
- }
-});
-
-// Event callbacks ------------------------------------------------------------
-
-_V_.youtube.onReady = function(e){
- var player = e.target.getIframe().parentNode.player;
-
- player.tech.triggerReady();
- player.triggerReady();
- player.triggerEvent("durationchange");
-
- _V_.youtube.hideOverlay(player);
-};
-
-_V_.youtube.onStateChange = function(e){
- var player = e.target.getIframe().parentNode.player;
-
- // Suppress any duplicate events from YouTube
- if (player.lastState === e.data)
- return;
-
- switch (e.data) {
- case -1: // Unstarted
- player.triggerEvent("durationchange");
- break;
- case YT.PlayerState.CUED:
- break;
- case YT.PlayerState.ENDED:
- player.triggerEvent("ended");
- _V_.youtube.hideOverlay(player);
-
- // YouTube looping doesn't seem to play well with VideoJS, so we need to
- // implement it manually here
- if (player.apiArgs.playerVars.loop) {
- player.tech.youtube.seekTo(0, true);
- player.tech.youtube.playVideo();
- } else {
- player.tech.youtube.stopVideo();
- }
- break;
- case YT.PlayerState.PLAYING:
- player.triggerEvent("timeupdate");
- player.triggerEvent("playing");
- player.triggerEvent("play");
- break;
- case YT.PlayerState.PAUSED:
- player.triggerEvent("pause");
- break;
- case YT.PlayerState.BUFFERING:
- player.triggerEvent("timeupdate");
- player.triggerEvent("waiting");
- // Hide the waiting spinner since YouTube has its own
- player.loadingSpinner.hide();
- break;
- }
-
- player.lastState = e.data;
-};
-
-_V_.youtube.onPlaybackQualityChange = function(e){
- var player = e.target.getIframe().parentNode.player;
- _V_.youtube.updateVideoQuality(player, e.data);
- player.triggerEvent("ratechange");
-};
-
-_V_.youtube.onError = function(e){
- var player = e.target.getIframe().parentNode.player;
- player.error = e.data;
- player.triggerEvent("error");
-};
-
-// Helpers --------------------------------------------------------------------
-
-_V_.youtube.hideOverlay = function(player) {
- // Hide the big play button and poster since YouTube provides these. Using
- // our own prevents the video from playing on the first click in mobile
- // devices
- player.bigPlayButton.hide();
- player.posterImage.hide();
-};
-
-_V_.youtube.updateVideoQuality = function(player, quality) {
- switch (quality) {
- case 'medium':
- player.videoWidth = 480;
- player.videoHeight = 360;
- break;
- case 'large':
- player.videoWidth = 640;
- player.videoHeight = 480;
- break;
- case 'hd720':
- player.videoWidth = 960;
- player.videoHeight = 720;
- break;
- case 'hd1080':
- player.videoWidth = 1440;
- player.videoHeight = 1080;
- break;
- case 'highres':
- player.videoWidth = 1920;
- player.videoHeight = 1080;
- break;
- case 'small':
- player.videoWidth = 320;
- player.videoHeight = 240;
- break;
- default:
- player.videoWidth = 0;
- player.videoHeight = 0;
- break;
- }
-};
-
-// Support testing ------------------------------------------------------------
-
-_V_.youtube.isSupported = function(){
- return true;
-};
-
-_V_.youtube.canPlaySource = function(srcObj){
- return srcObj.type == "video/youtube";
-};
-
-_V_.youtube.prototype.support = {
- formats: {
- "video/youtube": "YT"
- },
-
- // Optional events that we can manually mimic with timers
- progressEvents: false,
- timeupdateEvents: false,
-
- //fullscreen: true,
- // In iOS, if you move a video element in the DOM, it breaks video playback.
- movingElementInDOM: !_V_.isIOS(),
-
- fullscreenResize: true,
- parentResize: true
-};
-
-// YouTube JS API load callback -----------------------------------------------
-
-window.onYouTubePlayerAPIReady = function() {
- // Fire a techready event for each loading player
- var loadingEl;
- while ((loadingEl = _V_.youtube.loadingEls.shift())) {
- loadingEl.player.triggerEvent("techready");
- }
-};
diff --git a/test/unit/phantom-logging.js b/test/phantom-logging.js
similarity index 71%
rename from test/unit/phantom-logging.js
rename to test/phantom-logging.js
index 0f5fd9e4f5..9e1c517609 100644
--- a/test/unit/phantom-logging.js
+++ b/test/phantom-logging.js
@@ -8,14 +8,15 @@ QUnit.begin = function () {
QUnit.moduleDone = function (opts) {
if (opts.failed === 0) {
- console.log("\u2714 All tests passed in '" + opts.name + "' module")
+ console.log("\n\u2714 All tests passed in '" + opts.name + "' module")
} else {
- console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module")
+ console.log("\n\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module")
}
}
-QUnit.done = function (opts) {
+QUnit.done(function (opts) {
console.log("\n================================================")
console.log("Tests completed in " + opts.runtime + " milliseconds")
console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.")
-}
\ No newline at end of file
+ return false;
+});
diff --git a/test/unit.html b/test/unit.html
index 02ca6adea6..c181694ea0 100644
--- a/test/unit.html
+++ b/test/unit.html
@@ -8,24 +8,24 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/unit.js b/test/unit.js
new file mode 100644
index 0000000000..b69d90476a
--- /dev/null
+++ b/test/unit.js
@@ -0,0 +1,646 @@
+module("Component");
+
+test('should create an element', function(){
+ var comp = new vjs.Component({}, {});
+
+ ok(comp.el().nodeName);
+});
+
+test('should add a child component', function(){
+ var comp = new vjs.Component({});
+
+ var child = comp.addChild("component");
+
+ ok(comp.children().length === 1);
+ ok(comp.children()[0] === child);
+ ok(comp.el().childNodes[0] === child.el());
+ ok(comp.getChild('component') === child);
+ ok(comp.getChildById(child.id()) === child);
+});
+
+test('should init child coponents from options', function(){
+ var comp = new vjs.Component({}, {
+ children: {
+ 'component': true
+ }
+ });
+
+ ok(comp.children().length === 1);
+ ok(comp.el().childNodes.length === 1);
+});
+
+test('should dispose of component and children', function(){
+ var comp = new vjs.Component({});
+
+ // Add a child
+ var child = comp.addChild("Component");
+ ok(comp.children().length === 1);
+
+ // Add a listener
+ comp.on('click', function(){ return true; });
+ var data = vjs.getData(comp.el());
+ var id = comp.el()[vjs.expando];
+
+ comp.dispose();
+
+ ok(!comp.children(), 'component children were deleted');
+ ok(!comp.el(), 'component element was deleted');
+ ok(!child.children(), 'child children were deleted');
+ ok(!child.el(), 'child element was deleted');
+ ok(!vjs.cache[id], 'listener cache nulled')
+ ok(vjs.isEmpty(data), 'original listener cache object was emptied')
+});
+
+test('should add and remove event listeners to element', function(){
+ var comp = new vjs.Component({}, {});
+
+ // No need to make this async because we're triggering events inline.
+ // We're going to trigger the event after removing the listener,
+ // So if we get extra asserts that's a problem.
+ expect(2);
+
+ var testListener = function(){
+ ok(true, 'fired event once');
+ ok(this === comp, 'listener has the component as context');
+ };
+
+ comp.on('test-event', testListener);
+ comp.trigger('test-event');
+ comp.off('test-event', testListener);
+ comp.trigger('test-event');
+});
+
+test('should trigger a listener once using one()', function(){
+ var comp = new vjs.Component({}, {});
+
+ expect(1);
+
+ var testListener = function(){
+ ok(true, 'fired event once');
+ };
+
+ comp.one('test-event', testListener);
+ comp.trigger('test-event');
+ comp.trigger('test-event');
+});
+
+test('should trigger a listener when ready', function(){
+ expect(2);
+
+ var optionsReadyListener = function(){
+ ok(true, 'options listener fired')
+ };
+ var methodReadyListener = function(){
+ ok(true, 'ready method listener fired')
+ };
+
+ var comp = new vjs.Component({}, {}, optionsReadyListener);
+
+ comp.triggerReady();
+
+ comp.ready(methodReadyListener);
+
+ // First two listeners should only be fired once and then removed
+ comp.triggerReady();
+});
+
+test('should add and remove a CSS class', function(){
+ var comp = new vjs.Component({}, {});
+
+ comp.addClass('test-class');
+ ok(comp.el().className.indexOf('test-class') !== -1);
+ comp.removeClass('test-class');
+ ok(comp.el().className.indexOf('test-class') === -1);
+});
+
+test('should show and hide an element', function(){
+ var comp = new vjs.Component({}, {});
+
+ comp.hide();
+ ok(comp.el().style.display === 'none');
+ comp.show();
+ ok(comp.el().style.display === 'block');
+});
+
+test('should change the width and height of a component', function(){
+ var container = document.createElement('div');
+ var comp = new vjs.Component({}, {});
+ var el = comp.el();
+ var fixture = document.getElementById('qunit-fixture');
+
+ fixture.appendChild(container);
+ container.appendChild(el);
+ // Container of el needs dimensions or the component won't have dimensions
+ container.style.width = '1000px'
+ container.style.height = '1000px'
+
+ comp.width('50%');
+ comp.height('123px');
+
+ ok(comp.width() === 500, 'percent values working');
+ ok(vjs.getComputedStyleValue(el, 'width') === comp.width() + 'px', 'matches computed style');
+ ok(comp.height() === 123, 'px values working');
+
+ comp.width(321);
+ ok(comp.width() === 321, 'integer values working');
+});
+
+module("Core");
+
+test('should create a video tag and have access children in old IE', function(){
+ var fixture = document.getElementById('qunit-fixture');
+
+ fixture.innerHTML += " ";
+
+ vid = document.getElementById('test_vid_id');
+
+ ok(vid.childNodes.length === 1);
+ ok(vid.childNodes[0].getAttribute('type') === 'video/mp4');
+});
+
+test('should return a video player instance', function(){
+ var fixture = document.getElementById('qunit-fixture');
+ fixture.innerHTML += " ";
+
+ var player = videojs('test_vid_id');
+ ok(player, 'created player from tag');
+ ok(player.id() === 'test_vid_id');
+ ok(videojs.players['test_vid_id'] === player, 'added player to global reference')
+
+ var playerAgain = videojs('test_vid_id');
+ ok(player === playerAgain, 'did not create a second player from same tag');
+
+ var tag2 = document.getElementById('test_vid_id2');
+ var player2 = videojs(tag2);
+ ok(player2.id() === 'test_vid_id2', 'created player from element');
+});
+
+module("Events");
+
+test('should add and remove an event listener to an element', function(){
+ expect(1);
+
+ var el = document.createElement('div');
+ var listener = function(){
+ ok(true, 'Click Triggered');
+ };
+
+ vjs.on(el, 'click', listener);
+ vjs.trigger(el, 'click'); // 1 click
+ vjs.off(el, 'click', listener)
+ vjs.trigger(el, 'click'); // No click should happen.
+});
+
+test('should remove all listeners of a type', function(){
+ var el = document.createElement('div');
+ var clicks = 0;
+ var listener = function(){
+ clicks++;
+ };
+ var listener2 = function(){
+ clicks++;
+ };
+
+ vjs.on(el, 'click', listener);
+ vjs.on(el, 'click', listener2);
+ vjs.trigger(el, 'click'); // 2 clicks
+
+ ok(clicks === 2, 'both click listeners fired')
+
+ vjs.off(el, 'click')
+ vjs.trigger(el, 'click'); // No click should happen.
+
+ ok(clicks === 2, 'no click listeners fired')
+});
+
+test('should remove all listeners from an element', function(){
+ expect(2);
+
+ var el = document.createElement('div');
+ var listener = function(){
+ ok(true, 'Fake1 Triggered');
+ };
+ var listener2 = function(){
+ ok(true, 'Fake2 Triggered');
+ };
+
+ vjs.on(el, 'fake1', listener);
+ vjs.on(el, 'fake2', listener2);
+
+ vjs.trigger(el, 'fake1');
+ vjs.trigger(el, 'fake2');
+
+ vjs.off(el);
+
+ // No listener should happen.
+ vjs.trigger(el, 'fake1');
+ vjs.trigger(el, 'fake2');
+});
+
+test('should listen only once', function(){
+ expect(1);
+
+ var el = document.createElement('div');
+ var listener = function(){
+ ok(true, 'Click Triggered');
+ };
+
+ vjs.one(el, 'click', listener);
+ vjs.trigger(el, 'click'); // 1 click
+ vjs.trigger(el, 'click'); // No click should happen.
+});
+
+module("Lib");
+
+test('should create an element', function(){
+ var div = vjs.createEl();
+ var span = vjs.createEl('span', { "data-test": "asdf", innerHTML:'fdsa' })
+ ok(div.nodeName === 'DIV');
+ ok(span.nodeName === 'SPAN');
+ ok(span['data-test'] === 'asdf');
+ ok(span.innerHTML === "fdsa");
+});
+
+test('should make a string start with an uppercase letter', function(){
+ var foo = vjs.capitalize('bar')
+ ok(foo === 'Bar');
+});
+
+test('should loop through each property on an object', function(){
+ var asdf = {
+ a: 1,
+ b: 2,
+ 'c': 3
+ }
+
+ // Add 3 to each value
+ vjs.eachProp(asdf, function(key, value){
+ asdf[key] = value + 3;
+ });
+
+ deepEqual(asdf,{a:4,b:5,'c':6})
+});
+
+test('should add context to a function', function(){
+ var newContext = { test: 'obj'};
+ var asdf = function(){
+ ok(this === newContext);
+ }
+ var fdsa = vjs.bind(newContext, asdf);
+
+ fdsa();
+});
+
+test('should add and remove a class name on an element', function(){
+ var el = document.createElement('div');
+ vjs.addClass(el, 'test-class')
+ ok(el.className === 'test-class', 'class added');
+ vjs.addClass(el, 'test-class')
+ ok(el.className === 'test-class', 'same class not duplicated');
+ vjs.addClass(el, 'test-class2')
+ ok(el.className === 'test-class test-class2', 'added second class');
+ vjs.removeClass(el, 'test-class')
+ ok(el.className === 'test-class2', 'removed first class');
+});
+
+test('should get and remove data from an element', function(){
+ var el = document.createElement('div');
+ var data = vjs.getData(el);
+ var id = el[vjs.expando];
+
+ ok(typeof data === 'object', 'data object created');
+
+ // Add data
+ var testData = { asdf: 'fdsa' };
+ data.test = testData;
+ ok(vjs.getData(el).test === testData, 'data added');
+
+ // Remove all data
+ vjs.removeData(el);
+
+ ok(!vjs.cache[id], 'cached item nulled')
+ ok(el[vjs.expando] === null || el[vjs.expando] === undefined, 'element data id removed')
+});
+
+test('should read tag attributes from elements, including HTML5 in all browsers', function(){
+ var container = document.createElement('div');
+
+ var tags = ' ';
+ tags += '';
+ // Not putting source and track inside video element because
+ // oldIE needs the HTML5 shim to read tags inside HTML5 tags.
+ // Still may not work in oldIE.
+ tags += '';
+ tags += '';
+ container.innerHTML += tags;
+ document.getElementById('qunit-fixture').appendChild(container);
+
+ var vid1Vals = vjs.getAttributeValues(document.getElementById('vid1'));
+ var vid2Vals = vjs.getAttributeValues(document.getElementById('vid2'));
+ var sourceVals = vjs.getAttributeValues(document.getElementById('source'));
+ var trackVals = vjs.getAttributeValues(document.getElementById('track'));
+
+ deepEqual(vid1Vals, { 'autoplay': true, 'controls': true, 'data-test': "asdf", 'data-empty-string': "", 'id': "vid1", 'loop': true, 'muted': true, 'poster': "http://www2.videojs.com/img/video-js-html5-video-player.png", 'preload': "none", 'src': "http://google.com" });
+ deepEqual(vid2Vals, { 'id': "vid2" });
+ deepEqual(sourceVals, {'title': "test", 'media': "fdsa", 'type': "video/mp4", 'src': "http://google.com", 'id': "source" });
+ deepEqual(trackVals, { "default": true, /* IE no likey default key */ 'id': "track", 'kind': "captions", 'label': "testlabel", 'src': "http://google.com", 'srclang': "en", 'title': "test" });
+});
+
+test('should get the right style values for an element', function(){
+ var el = document.createElement('div');
+ var container = document.createElement('div');
+ var fixture = document.getElementById('qunit-fixture')
+
+ container.appendChild(el);
+ fixture.appendChild(container);
+
+ container.style.width = "1000px";
+ container.style.height = "1000px";
+
+ el.style.height = "100%";
+ el.style.width = "123px";
+
+ ok(vjs.getComputedStyleValue(el, 'height') === '1000px');
+ ok(vjs.getComputedStyleValue(el, 'width') === '123px');
+});
+
+test('should insert an element first in another', function(){
+ var el1 = document.createElement('div');
+ var el2 = document.createElement('div');
+ var parent = document.createElement('div');
+
+ vjs.insertFirst(el1, parent)
+ ok(parent.firstChild === el1, 'inserts first into empty parent');
+
+ vjs.insertFirst(el2, parent)
+ ok(parent.firstChild === el2, 'inserts first into parent with child');
+});
+
+test('should return the element with the ID', function(){
+ var el1 = document.createElement('div');
+ var el2 = document.createElement('div');
+ var fixture = document.getElementById('qunit-fixture');
+
+ fixture.appendChild(el1);
+ fixture.appendChild(el2);
+
+ el1.id = 'test_id1';
+ el2.id = 'test_id2';
+
+ ok(vjs.el("test_id1") === el1, 'found element for ID');
+ ok(vjs.el("#test_id2") === el2, 'found element for CSS ID');
+});
+
+test('should trim whitespace from a string', function(){
+ ok(vjs.trim(' asdf asdf asdf \t\n\r') === 'asdf asdf asdf');
+});
+
+test('should round a number', function(){
+ ok(vjs.round(1.01) === 1);
+ ok(vjs.round(1.5) === 2);
+ ok(vjs.round(1.55, 2) === 1.55);
+ ok(vjs.round(10.551, 2) === 10.55);
+});
+
+test('should format time as a string', function(){
+ ok(vjs.formatTime(1) === "0:01");
+ ok(vjs.formatTime(10) === "0:10");
+ ok(vjs.formatTime(60) === "1:00");
+ ok(vjs.formatTime(600) === "10:00");
+ ok(vjs.formatTime(3600) === "1:00:00");
+ ok(vjs.formatTime(36000) === "10:00:00");
+ ok(vjs.formatTime(360000) === "100:00:00");
+
+ // Using guide should provide extra leading zeros
+ ok(vjs.formatTime(1,1) === "0:01");
+ ok(vjs.formatTime(1,10) === "0:01");
+ ok(vjs.formatTime(1,60) === "0:01");
+ ok(vjs.formatTime(1,600) === "00:01");
+ ok(vjs.formatTime(1,3600) === "0:00:01");
+ // Don't do extra leading zeros for hours
+ ok(vjs.formatTime(1,36000) === "0:00:01");
+ ok(vjs.formatTime(1,360000) === "0:00:01");
+});
+
+test('should create a fake timerange', function(){
+ var tr = vjs.createTimeRange(0, 10);
+ ok(tr.start() === 0);
+ ok(tr.end() === 10);
+});
+
+test('should get an absolute URL', function(){
+ // Errors on compiled tests that don't use unit.html. Need a better solution.
+ // ok(vjs.getAbsoluteURL('unit.html') === window.location.href);
+ ok(vjs.getAbsoluteURL('http://asdf.com') === "http://asdf.com");
+ ok(vjs.getAbsoluteURL('https://asdf.com/index.html') === "https://asdf.com/index.html");
+});
+
+module("HTML5");
+
+module("Player");
+
+var PlayerTest = {
+ makeTag: function(){
+ var videoTag = document.createElement('video');
+ videoTag.id = 'example_1';
+ videoTag.className = 'video-js vjs-default-skin';
+ return videoTag;
+ },
+ makePlayer: function(playerOptions){
+ var videoTag = PlayerTest.makeTag();
+
+ var fixture = document.getElementById('qunit-fixture');
+ fixture.appendChild(videoTag);
+
+ return player = new vjs.Player(videoTag, playerOptions);
+ }
+};
+
+// Compiler doesn't like using 'this' in setup/teardown.
+// module("Player", {
+// /**
+// * @this {*}
+// */
+// setup: function(){
+// window.player1 = true; // using window works
+// },
+
+// /**
+// * @this {*}
+// */
+// teardown: function(){
+// // if (this.player && this.player.el() !== null) {
+// // this.player.dispose();
+// // this.player = null;
+// // }
+// }
+// });
+
+// Object.size = function(obj) {
+// var size = 0, key;
+// for (key in obj) {
+// console.log('key', key)
+// if (obj.hasOwnProperty(key)) size++;
+// }
+// return size;
+// };
+
+
+test('should create player instance that inherits from component and dispose it', function(){
+ var player = PlayerTest.makePlayer();
+
+ ok(player.el().nodeName === 'DIV');
+ ok(player.on, 'component function exists');
+
+ player.dispose();
+ ok(player.el() === null, 'element disposed');
+});
+
+test('should accept options from multiple sources and override in correct order', function(){
+ // For closure compiler to work, all reference to the prop have to be the same type
+ // As in options['attr'] or options.attr. Compiler will minimize each separately.
+ // Since we're using setAttribute which requires a string, we have to use the string
+ // version of the key for all version.
+
+ // Set a global option
+ vjs.options['attr'] = 1;
+
+ var tag0 = PlayerTest.makeTag();
+ var player0 = new vjs.Player(tag0);
+
+ ok(player0.options['attr'] === 1, 'global option was set')
+ player0.dispose();
+
+ // Set a tag level option
+ var tag1 = PlayerTest.makeTag();
+ tag1.setAttribute('attr', 'asdf'); // Attributes must be set as strings
+
+ var player1 = new vjs.Player(tag1);
+ ok(player1.options['attr'] === 'asdf', 'Tag options overrode global options');
+ player1.dispose();
+
+ // Set a tag level option
+ var tag2 = PlayerTest.makeTag();
+ tag2.setAttribute('attr', 'asdf');
+
+ var player2 = new vjs.Player(tag2, { 'attr': 'fdsa' });
+ ok(player2.options['attr'] === 'fdsa', 'Init options overrode tag and global options');
+ player2.dispose();
+});
+
+test('should get tag, source, and track settings', function(){
+ // Partially tested in lib->getAttributeValues
+
+ var fixture = document.getElementById('qunit-fixture');
+
+ var html = ''
+ html += '';
+ html += '';
+ html += '';
+ html += ' ';
+
+ fixture.innerHTML += html;
+
+ var tag = document.getElementById('example_1');
+ var player = new vjs.Player(tag);
+
+ ok(player.options['autoplay'] === true);
+ ok(player.options['preload'] === 'metadata'); // No extern. Use string.
+ ok(player.options['id'] === 'example_1');
+ ok(player.options['sources'].length === 2);
+ ok(player.options['sources'][0].src === 'http://google.com');
+ ok(player.options['sources'][0].type === 'video/mp4');
+ ok(player.options['sources'][1].type === 'video/webm');
+ ok(player.options['tracks'].length === 1);
+ ok(player.options['tracks'][0]['kind'] === 'captions'); // No extern
+ ok(player.options['tracks'][0]['default'] === true);
+
+ ok(player.el().className.indexOf('video-js') !== -1, 'transferred class from tag to player div');
+ ok(player.el().id === 'example_1', 'transferred id from tag to player div');
+
+ ok(tag.player === player, 'player referenceable on original tag');
+ ok(vjs.players[player.id()] === player, 'player referenceable from global list');
+ ok(tag.id !== player.id, 'tag ID no longer is the same as player ID');
+ ok(tag.className !== player.el().className, 'tag classname updated');
+
+ player.dispose();
+
+ ok(tag.player === null, 'tag player ref killed')
+ ok(!vjs.players['example_1'], 'global player ref killed')
+ ok(player.el() === null, 'player el killed')
+});
+
+test('should set the width and height of the player', function(){
+ var player = PlayerTest.makePlayer({ width: 123, height: '100%' });
+
+ ok(player.width() === 123)
+ ok(player.el().style.width === '123px')
+
+ var fixture = document.getElementById('qunit-fixture');
+ var container = document.createElement('div');
+ fixture.appendChild(container);
+
+ // Player container needs to have height in order to have height
+ // Don't want to mess with the fixture itself
+ container.appendChild(player.el());
+ container.style.height = "1000px";
+ ok(player.height() === 1000);
+
+ player.dispose();
+});
+
+test('should accept options from multiple sources and override in correct order', function(){
+ var tag = PlayerTest.makeTag();
+ var container = document.createElement('div');
+ var fixture = document.getElementById('qunit-fixture');
+
+ container.appendChild(tag);
+ fixture.appendChild(container);
+
+ var player = new vjs.Player(tag);
+ var el = player.el();
+
+ ok(el.parentNode === container, 'player placed at same level as tag')
+ // Tag may be placed inside the player element or it may be removed from the DOM
+ ok(tag.parentNode !== container, 'tag removed from original place')
+
+ player.dispose();
+});
+
+test('should load a media controller', function(){
+ var player = PlayerTest.makePlayer({
+ preload: 'none',
+ sources: [
+ { src: "http://google.com", type: 'video/mp4' },
+ { src: "http://google.com", type: 'video/webm' }
+ ]
+ });
+
+ ok(player.el().children[0].className.indexOf('vjs-tech') !== -1, 'media controller loaded')
+
+ player.dispose();
+});
+
+module("Setup");
+
+// Logging setup for phantom integration
+// adapted from Modernizr & Bootstrap
+
+QUnit.begin = function () {
+ console.log("Starting test suite")
+ console.log("================================================\n")
+}
+
+QUnit.moduleDone = function (opts) {
+ if (opts.failed === 0) {
+ console.log("\u2714 All tests passed in '" + opts.name + "' module")
+ } else {
+ console.log("\u2716 " + opts.failed + " tests failed in '" + opts.name + "' module")
+ }
+}
+
+QUnit.done = function (opts) {
+ console.log("\n================================================")
+ console.log("Tests completed in " + opts.runtime + " milliseconds")
+ console.log(opts.passed + " tests of " + opts.total + " passed, " + opts.failed + " failed.")
+}
\ No newline at end of file
diff --git a/test/video.compiled.js b/test/video.compiled.js
index a38b1cf47b..78a41f26f4 100644
--- a/test/video.compiled.js
+++ b/test/video.compiled.js
@@ -1,2014 +1,97 @@
-(function() {var e = void 0, g = !0, h = null, k = !1;
-function n(a) {
- return function() {
- return this[a]
- }
-}
-function q(a) {
- return function() {
- return a
- }
-}
-var r, t = this;
-t.Sc = g;
-function u(a, b) {
- var c = a.split("."), d = t;
- !(c[0] in d) && d.execScript && d.execScript("var " + c[0]);
- for(var f;c.length && (f = c.shift());) {
- !c.length && b !== e ? d[f] = b : d = d[f] ? d[f] : d[f] = {}
- }
-}
-function v(a, b) {
- function c() {
- }
- c.prototype = b.prototype;
- a.f = b.prototype;
- a.prototype = new c;
- a.prototype.constructor = a
-}
-;document.createElement("video");
-document.createElement("audio");
-var aa = vjs = function(a, b, c) {
- if("string" === typeof a) {
- 0 === a.indexOf("#") && (a = a.slice(1));
- if(vjs.Va[a]) {
- return vjs.Va[a]
- }
- a = vjs.j(a)
- }
- if(!a || !a.nodeName) {
- throw new TypeError("The element or ID supplied is not valid. (videojs)");
- }
- return a.a || new vjs.ea(a, b, c)
-};
-vjs.options = {techOrder:["html5", "flash"], html5:{}, flash:{jd:"http://vjs.zencdn.net/c/video-js.swf"}, width:300, height:150, defaultVolume:0, children:{mediaLoader:{}, posterImage:{}, textTrackDisplay:{}, loadingSpinner:{}, bigPlayButton:{}, controlBar:{}}};
-vjs.Va = {};
-vjs.d = function(a, b) {
- var c = document.createElement(a || "div"), d;
- for(d in b) {
- b.hasOwnProperty(d) && (c[d] = b[d])
- }
- return c
-};
-vjs.T = function(a) {
- return a.charAt(0).toUpperCase() + a.slice(1)
-};
-vjs.Oa = function(a, b) {
- if(a) {
- for(var c in a) {
- a.hasOwnProperty(c) && b.call(this, c, a[c])
- }
- }
-};
-vjs.s = function(a, b) {
- if(!b) {
- return a
- }
- for(var c in b) {
- b.hasOwnProperty(c) && (a[c] = b[c])
- }
- return a
-};
-vjs.bind = function(a, b, c) {
- function d() {
- return b.apply(a, arguments)
- }
- b.p || (b.p = vjs.p++);
- d.p = c ? c + "_" + b.p : b.p;
- return d
-};
-vjs.ya = {};
-vjs.p = 1;
-vjs.expando = "vdata" + (new Date).getTime();
-vjs.getData = function(a) {
- var b = a[vjs.expando];
- b || (b = a[vjs.expando] = vjs.p++, vjs.ya[b] = {});
- return vjs.ya[b]
-};
-vjs.Sb = function(a) {
- a = a[vjs.expando];
- return!(!a || vjs.sb(vjs.ya[a]))
-};
-vjs.Xb = function(a) {
- var b = a[vjs.expando];
- if(b) {
- delete vjs.ya[b];
- try {
- delete a[vjs.expando]
- }catch(c) {
- a.removeAttribute ? a.removeAttribute(vjs.expando) : a[vjs.expando] = h
- }
- }
-};
-vjs.sb = function(a) {
- for(var b in a) {
- if(a[b] !== h) {
- return k
- }
- }
- return g
-};
-vjs.u = function(a, b) {
- -1 == (" " + a.className + " ").indexOf(" " + b + " ") && (a.className = "" === a.className ? b : a.className + " " + b)
-};
-vjs.z = function(a, b) {
- if(-1 != a.className.indexOf(b)) {
- var c = a.className.split(" ");
- c.splice(c.indexOf(b), 1);
- a.className = c.join(" ")
- }
-};
-vjs.kc = document.createElement("video");
-vjs.Ja = navigator.userAgent;
-vjs.ic = !!navigator.userAgent.match(/iPad/i);
-vjs.hc = !!navigator.userAgent.match(/iPhone/i);
-vjs.jc = !!navigator.userAgent.match(/iPod/i);
-vjs.gc = vjs.ic || vjs.hc || vjs.jc;
-var ba = vjs, w;
-var x = navigator.userAgent.match(/OS (\d+)_/i);
-w = x && x[1] ? x[1] : e;
-ba.Tc = w;
-vjs.ec = !!navigator.userAgent.match(/Android.*AppleWebKit/i);
-var ca = vjs, y = navigator.userAgent.match(/Android (\d+)\./i);
-ca.dc = y && y[1] ? y[1] : h;
-vjs.fc = function() {
- return!!vjs.Ja.match("Firefox")
-};
-vjs.qb = function(a) {
- var b = {};
- if(a && a.attributes && 0 < a.attributes.length) {
- for(var c = a.attributes, d, f, l = c.length - 1;0 <= l;l--) {
- d = c[l].name;
- f = c[l].value;
- if("boolean" === typeof a[d] || -1 !== ",autoplay,controls,loop,muted,default,".indexOf("," + d + ",")) {
- f = f !== h ? g : k
- }
- b[d] = f
- }
- }
- return b
-};
-vjs.cd = function(a, b) {
- var c = "";
- document.defaultView && document.defaultView.getComputedStyle ? c = document.defaultView.getComputedStyle(a, "").getPropertyValue(b) : a.currentStyle && (b = b.replace(/\-(\w)/g, function(a, b) {
- return b.toUpperCase()
- }), c = a.currentStyle[b]);
- return c
-};
-vjs.rb = function(a, b) {
- b.firstChild ? b.insertBefore(a, b.firstChild) : b.appendChild(a)
-};
-vjs.Cb = {};
-vjs.j = function(a) {
- 0 === a.indexOf("#") && (a = a.slice(1));
- return document.getElementById(a)
-};
-vjs.pb = function(a, b) {
- b = b || a;
- var c = Math.floor(a % 60), d = Math.floor(a / 60 % 60), f = Math.floor(a / 3600), l = Math.floor(b / 60 % 60), j = Math.floor(b / 3600), f = 0 < f || 0 < j ? f + ":" : "";
- return f + (((f || 10 <= l) && 10 > d ? "0" + d : d) + ":") + (10 > c ? "0" + c : c)
-};
-vjs.mc = function() {
- document.body.focus();
- document.onselectstart = q(k)
-};
-vjs.Oc = function() {
- document.onselectstart = q(g)
-};
-vjs.trim = function(a) {
- return a.toString().replace(/^\s+/, "").replace(/\s+$/, "")
-};
-vjs.round = function(a, b) {
- b || (b = 0);
- return Math.round(a * Math.pow(10, b)) / Math.pow(10, b)
-};
-vjs.Jb = function(a) {
- return{length:1, start:q(0), end:function() {
- return a
- }}
-};
-vjs.get = function(a, b, c) {
- var d = 0 === a.indexOf("file:") || 0 === window.location.href.indexOf("file:") && -1 === a.indexOf("http");
- "undefined" === typeof XMLHttpRequest && (window.XMLHttpRequest = function() {
- try {
- return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")
- }catch(a) {
- }
- try {
- return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")
- }catch(b) {
- }
- try {
- return new window.ActiveXObject("Msxml2.XMLHTTP")
- }catch(c) {
- }
- throw Error("This browser does not support XMLHttpRequest.");
- });
- var f = new XMLHttpRequest;
- try {
- f.open("GET", a)
- }catch(l) {
- c(l)
- }
- f.onreadystatechange = function() {
- 4 === f.readyState && (200 === f.status || d && 0 === f.status ? b(f.responseText) : c && c())
- };
- try {
- f.send()
- }catch(j) {
- c && c(j)
- }
-};
-vjs.Jc = function(a) {
- var b = window.localStorage || k;
- if(b) {
- try {
- b.volume = a
- }catch(c) {
- 22 == c.code || 1014 == c.code ? vjs.log("LocalStorage Full (VideoJS)", c) : vjs.log("LocalStorage Error (VideoJS)", c)
- }
- }
-};
-vjs.Pb = function(a) {
- a.match(/^https?:\/\//) || (a = vjs.d("div", {innerHTML:'x '}).firstChild.href);
- return a
-};
-vjs.log = function() {
- vjs.log.history = vjs.log.history || [];
- vjs.log.history.push(arguments);
- window.console && window.console.log(Array.prototype.slice.call(arguments))
-};
-vjs.sc = "getBoundingClientRect" in document.documentElement ? function(a) {
- var b;
- try {
- b = a.getBoundingClientRect()
- }catch(c) {
- }
- if(!b) {
- return 0
- }
- a = document.body;
- return b.left + (window.pageXOffset || a.scrollLeft) - (document.documentElement.clientLeft || a.clientLeft || 0)
-} : function(a) {
- for(var b = a.offsetLeft;a = a.offsetParent;) {
- b += a.offsetLeft
- }
- return b
-};
-vjs.e = function(a, b, c) {
- var d = vjs.getData(a);
- d.q || (d.q = {});
- d.q[b] || (d.q[b] = []);
- c.p || (c.p = vjs.p++);
- d.q[b].push(c);
- d.N || (d.disabled = k, d.N = function(b) {
- if(!d.disabled) {
- b = vjs.Mb(b);
- var c = d.q[b.type];
- if(c) {
- for(var j = [], p = 0, m = c.length;p < m;p++) {
- j[p] = c[p]
- }
- c = 0;
- for(p = j.length;c < p;c++) {
- j[c].call(a, b)
- }
- }
- }
- });
- 1 == d.q[b].length && (document.addEventListener ? a.addEventListener(b, d.N, k) : document.attachEvent && a.attachEvent("on" + b, d.N))
-};
-vjs.o = function(a, b, c) {
- if(vjs.Sb(a)) {
- var d = vjs.getData(a);
- if(d.q) {
- if(b) {
- var f = d.q[b];
- if(f) {
- if(c) {
- if(c.p) {
- for(d = 0;d < f.length;d++) {
- f[d].p === c.p && f.splice(d--, 1)
- }
- }
- }else {
- d.q[b] = []
- }
- vjs.Hb(a, b)
- }
- }else {
- for(f in d.q) {
- b = f, d.q[b] = [], vjs.Hb(a, b)
- }
- }
- }
- }
-};
-vjs.Hb = function(a, b) {
- var c = vjs.getData(a);
- 0 === c.q[b].length && (delete c.q[b], document.removeEventListener ? a.removeEventListener(b, c.N, k) : document.detachEvent && a.detachEvent("on" + b, c.N));
- vjs.sb(c.q) && (delete c.q, delete c.N, delete c.disabled);
- vjs.sb(c) && vjs.Xb(a)
-};
-vjs.Mb = function(a) {
- function b() {
- return g
- }
- function c() {
- return k
- }
- if(!a || !a.tb) {
- var d = a || window.event, f;
- for(f in d) {
- a[f] = d[f]
- }
- a.target || (a.target = a.srcElement || document);
- a.relatedTarget = a.fromElement === a.target ? a.toElement : a.fromElement;
- a.preventDefault = function() {
- a.returnValue = k;
- a.Tb = b
- };
- a.Tb = c;
- a.stopPropagation = function() {
- a.cancelBubble = g;
- a.tb = b
- };
- a.tb = c;
- a.stopImmediatePropagation = function() {
- a.vc = b;
- a.stopPropagation()
- };
- a.vc = c;
- a.clientX != h && (d = document.documentElement, f = document.body, a.pageX = a.clientX + (d && d.scrollLeft || f && f.scrollLeft || 0) - (d && d.clientLeft || f && f.clientLeft || 0), a.pageY = a.clientY + (d && d.scrollTop || f && f.scrollTop || 0) - (d && d.clientTop || f && f.clientTop || 0));
- a.which = a.charCode || a.keyCode;
- a.button != h && (a.button = a.button & 1 ? 0 : a.button & 4 ? 1 : a.button & 2 ? 2 : 0)
- }
- return a
-};
-vjs.i = function(a, b) {
- var c = vjs.Sb(a) ? vjs.getData(a) : {}, d = a.parentNode || a.ownerDocument;
- "string" === typeof b && (b = {type:b, target:a});
- b = vjs.Mb(b);
- c.N && c.N.call(a, b);
- if(d && !b.tb()) {
- vjs.i(d, b)
- }else {
- if(!d && !b.Tb() && (c = vjs.getData(b.target), b.target[b.type])) {
- c.disabled = g;
- if("function" === typeof b.target[b.type]) {
- b.target[b.type]()
- }
- c.disabled = k
- }
- }
-};
-vjs.H = function(a, b, c) {
- vjs.e(a, b, function() {
- vjs.o(a, b, arguments.callee);
- c.apply(this, arguments)
- })
-};
-vjs.c = function(a, b, c) {
- this.a = a;
- b = this.options = vjs.s(this.options || {}, b);
- this.O = b.id || (b.j && b.j.id ? b.j.id : a.id + "_component_" + vjs.p++);
- this.zc = b.name || h;
- this.b = b.j ? b.j : this.d();
- this.C = [];
- this.kb = {};
- this.M = {};
- if((a = this.options) && a.children) {
- var d = this;
- vjs.Oa(a.children, function(a, b) {
- b !== k && !b.xc && (d[a] = d.R(a, b))
- })
- }
- this.P(c)
-};
-r = vjs.c.prototype;
-r.D = function() {
- if(this.C) {
- for(var a = this.C.length - 1;0 <= a;a--) {
- this.C[a].D()
- }
- }
- this.M = this.kb = this.C = h;
- this.o();
- this.b.parentNode && this.b.parentNode.removeChild(this.b);
- vjs.Xb(this.b);
- this.b = h
-};
-r.d = function(a, b) {
- return vjs.d(a, b)
-};
-r.j = n("b");
-r.id = n("O");
-r.name = n("zc");
-r.children = n("C");
-r.R = function(a, b) {
- var c, d, f;
- "string" === typeof a ? (d = a, b = b || {}, c = b.Yc || vjs.T(d), b.name = d, c = new window.videojs[c](this.a || this, b)) : c = a;
- d = c.name();
- f = c.id();
- this.C.push(c);
- f && (this.kb[f] = c);
- d && (this.M[d] = c);
- this.b.appendChild(c.j());
- return c
-};
-r.removeChild = function(a) {
- "string" === typeof a && (a = this.M[a]);
- if(a && this.C) {
- for(var b = k, c = this.C.length - 1;0 <= c;c--) {
- if(this.C[c] === a) {
- b = g;
- this.C.splice(c, 1);
- break
- }
- }
- b && (this.kb[a.id] = h, this.M[a.name] = h, (b = a.j()) && b.parentNode === this.b && this.b.removeChild(a.j()))
- }
-};
-r.v = q("");
-r.e = function(a, b) {
- vjs.e(this.b, a, vjs.bind(this, b));
- return this
-};
-r.o = function(a, b) {
- vjs.o(this.b, a, b);
- return this
-};
-r.H = function(a, b) {
- vjs.H(this.b, a, vjs.bind(this, b));
- return this
-};
-r.i = function(a, b) {
- vjs.i(this.b, a, b);
- return this
-};
-r.P = function(a) {
- a && (this.ia ? a.call(this) : (this.Ya === e && (this.Ya = []), this.Ya.push(a)));
- return this
-};
-function z(a) {
- a.ia = g;
- var b = a.Ya;
- if(b && 0 < b.length) {
- for(var c = 0, d = b.length;c < d;c++) {
- b[c].call(a)
- }
- a.Ya = [];
- a.i("ready")
- }
-}
-r.u = function(a) {
- vjs.u(this.b, a);
- return this
-};
-r.z = function(a) {
- vjs.z(this.b, a);
- return this
-};
-r.show = function() {
- this.b.style.display = "block";
- return this
-};
-r.w = function() {
- this.b.style.display = "none";
- return this
-};
-r.Pa = function() {
- this.z("vjs-fade-out");
- this.u("vjs-fade-in");
- return this
-};
-r.nb = function() {
- this.z("vjs-fade-in");
- this.u("vjs-fade-out");
- return this
-};
-r.Ub = function() {
- var a = this.b.style;
- a.display = "block";
- a.opacity = 1;
- a.Qc = "visible";
- return this
-};
-function A(a) {
- a = a.b.style;
- a.display = "";
- a.opacity = "";
- a.Qc = ""
-}
-r.width = function(a, b) {
- return B(this, "width", a, b)
-};
-r.height = function(a, b) {
- return B(this, "height", a, b)
-};
-r.pc = function(a, b) {
- return this.width(a, g).height(b)
-};
-function B(a, b, c, d) {
- if(c !== e) {
- return a.b.style[b] = -1 !== ("" + c).indexOf("%") || -1 !== ("" + c).indexOf("px") ? c : c + "px", d || a.i("resize"), a
- }
- if(!a.b) {
- return 0
- }
- c = a.b.style[b];
- d = c.indexOf("px");
- return-1 !== d ? parseInt(c.slice(0, d), 10) : parseInt(a.b["offset" + vjs.T(b)], 10)
-}
-;vjs.ea = function(a, b, c) {
- this.I = a;
- var d = {};
- vjs.s(d, vjs.options);
- vjs.s(d, da(a));
- vjs.s(d, b);
- this.n = {};
- vjs.c.call(this, this, d, c);
- this.e("ended", this.Bc);
- this.e("play", this.Ab);
- this.e("pause", this.zb);
- this.e("progress", this.Cc);
- this.e("durationchange", this.Ac);
- this.e("error", this.xb);
- vjs.Va[this.O] = this
-};
-v(vjs.ea, vjs.c);
-r = vjs.ea.prototype;
-r.D = function() {
- vjs.Va[this.O] = h;
- this.I && this.I.a && (this.I.a = h);
- this.b && this.b.a && (this.b.a = h);
- clearInterval(this.Xa);
- this.k && this.k.D();
- vjs.ea.f.D.call(this)
-};
-function da(a) {
- var b = {sources:[], tracks:[]};
- vjs.s(b, vjs.qb(a));
- if(a.hasChildNodes()) {
- for(var c, d = a.childNodes, f = 0, l = d.length;f < l;f++) {
- a = d[f], c = a.nodeName.toLowerCase(), "source" === c ? b.sources.push(vjs.qb(a)) : "track" === c && b.tracks.push(vjs.qb(a))
- }
- }
- return b
-}
-r.d = function() {
- var a = this.b = vjs.ea.f.d.call(this, "div"), b = this.I;
- b.removeAttribute("controls");
- b.removeAttribute("poster");
- b.removeAttribute("width");
- b.removeAttribute("height");
- if(b.hasChildNodes()) {
- for(var c = b.childNodes.length, d = 0, f = b.childNodes;d < c;d++) {
- ("source" == f[0].nodeName.toLowerCase() || "track" == f[0].nodeName.toLowerCase()) && b.removeChild(f[0])
- }
- }
- b.id = b.id || "vjs_video_" + vjs.p++;
- a.id = b.id;
- a.className = b.className;
- b.id += "_html5_api";
- b.className = "vjs-tech";
- b.a = a.a = this;
- this.u("vjs-paused");
- this.width(this.options.width, g);
- this.height(this.options.height, g);
- b.parentNode && b.parentNode.insertBefore(a, b);
- vjs.rb(b, a);
- return a
-};
-function C(a, b, c) {
- a.k ? D(a) : "Html5" !== b && a.I && (a.b.removeChild(a.I), a.I = h);
- a.V = b;
- a.ia = k;
- var d = vjs.s({source:c, Dc:a.b}, a.options[b.toLowerCase()]);
- c && (c.src == a.n.src && 0 < a.n.currentTime && (d.startTime = a.n.currentTime), a.n.src = c.src);
- a.k = new window.videojs[b](a, d);
- a.k.P(function() {
- z(this.a);
- if(!this.G.Wb) {
- var a = this.a;
- a.vb = g;
- a.Xa = setInterval(vjs.bind(a, function() {
- this.n.hb < this.buffered().end(0) ? this.i("progress") : 1 == E(this) && (clearInterval(this.Xa), this.i("progress"))
- }), 500);
- a.k.H("progress", function() {
- this.G.Wb = g;
- var a = this.a;
- a.vb = k;
- clearInterval(a.Xa)
- })
- }
- this.G.bc || (a = this.a, a.wb = g, a.e("play", a.cc), a.e("pause", a.$a), a.k.H("timeupdate", function() {
- this.G.bc = g;
- F(this.a)
- }))
- })
-}
-function D(a) {
- a.k.D();
- a.vb && (a.vb = k, clearInterval(a.Xa));
- a.wb && F(a);
- a.k = k
-}
-function F(a) {
- a.wb = k;
- a.$a();
- a.o("play", a.cc);
- a.o("pause", a.$a)
-}
-r.cc = function() {
- this.Kb && this.$a();
- this.Kb = setInterval(vjs.bind(this, function() {
- this.i("timeupdate")
- }), 250)
-};
-r.$a = function() {
- clearInterval(this.Kb)
-};
-r.Bc = function() {
- this.options.loop && (this.currentTime(0), this.play())
-};
-r.Ab = function() {
- vjs.z(this.b, "vjs-paused");
- vjs.u(this.b, "vjs-playing")
-};
-r.zb = function() {
- vjs.z(this.b, "vjs-playing");
- vjs.u(this.b, "vjs-paused")
-};
-r.Cc = function() {
- 1 == E(this) && this.i("loadedalldata")
-};
-r.Ac = function() {
- this.duration(G(this, "duration"))
-};
-r.xb = function(a) {
- vjs.log("Video Error", a)
-};
-function H(a, b, c) {
- if(a.k.ia) {
- try {
- a.k[b](c)
- }catch(d) {
- vjs.log(d)
- }
- }else {
- a.k.P(function() {
- this[b](c)
- })
- }
-}
-function G(a, b) {
- if(a.k.ia) {
- try {
- return a.k[b]()
- }catch(c) {
- if(a.k[b] === e) {
- vjs.log("Video.js: " + b + " method not defined for " + a.V + " playback technology.", c)
- }else {
- if("TypeError" == c.name) {
- throw vjs.log("Video.js: " + b + " unavailable on " + a.V + " playback technology element.", c), a.k.ia = k, c;
- }
- vjs.log(c)
- }
- }
- }
-}
-r.play = function() {
- H(this, "play");
- return this
-};
-r.pause = function() {
- H(this, "pause");
- return this
-};
-r.paused = function() {
- return G(this, "paused") === k ? k : g
-};
-r.currentTime = function(a) {
- return a !== e ? (this.n.gd = a, H(this, "setCurrentTime", a), this.wb && this.i("timeupdate"), this) : this.n.currentTime = G(this, "currentTime") || 0
-};
-r.duration = function(a) {
- return a !== e ? (this.n.duration = parseFloat(a), this) : this.n.duration
-};
-r.buffered = function() {
- var a = G(this, "buffered"), b = this.n.hb = this.n.hb || 0;
- a && (0 < a.length && a.end(0) !== b) && (b = a.end(0), this.n.hb = b);
- return vjs.Jb(b)
-};
-function E(a) {
- return a.duration() ? a.buffered().end(0) / a.duration() : 0
-}
-r.volume = function(a) {
- if(a !== e) {
- return a = Math.max(0, Math.min(1, parseFloat(a))), this.n.volume = a, H(this, "setVolume", a), vjs.Jc(a), this
- }
- a = parseFloat(G(this, "volume"));
- return isNaN(a) ? 1 : a
-};
-r.muted = function(a) {
- return a !== e ? (H(this, "setMuted", a), this) : G(this, "muted") || k
-};
-r.ab = function() {
- return G(this, "supportsFullScreen") || k
-};
-r.Za = function() {
- var a = vjs.Cb.Za;
- this.U = g;
- a ? (vjs.e(document, a.ha, vjs.bind(this, function() {
- this.U = document[a.U];
- this.U === k && vjs.o(document, a.ha, arguments.callee);
- this.i("fullscreenchange")
- })), this.k.G.Ob === k && this.options.flash.iFrameMode !== g && (this.pause(), D(this), vjs.e(document, a.ha, vjs.bind(this, function() {
- vjs.o(document, a.ha, arguments.callee);
- C(this, this.V, {src:this.n.src})
- }))), this.b[a.Fc]()) : this.k.ab() ? (this.i("fullscreenchange"), H(this, "enterFullScreen")) : (this.i("fullscreenchange"), this.uc = g, this.qc = document.documentElement.style.overflow, vjs.e(document, "keydown", vjs.bind(this, this.Nb)), document.documentElement.style.overflow = "hidden", vjs.u(document.body, "vjs-full-window"), vjs.u(this.b, "vjs-fullscreen"), this.i("enterFullWindow"));
- return this
-};
-function I(a) {
- var b = vjs.Cb.Za;
- a.U = k;
- b ? (a.k.G.Ob === k && a.options.flash.iFrameMode !== g && (a.pause(), D(a), vjs.e(document, b.ha, vjs.bind(a, function() {
- vjs.o(document, b.ha, arguments.callee);
- C(this, this.V, {src:this.n.src})
- }))), document[b.nc]()) : (a.k.ab() ? H(a, "exitFullScreen") : J(a), a.i("fullscreenchange"))
-}
-r.Nb = function(a) {
- 27 === a.keyCode && (this.U === g ? I(this) : J(this))
-};
-function J(a) {
- a.uc = k;
- vjs.o(document, "keydown", a.Nb);
- document.documentElement.style.overflow = a.qc;
- vjs.z(document.body, "vjs-full-window");
- vjs.z(a.b, "vjs-fullscreen");
- a.i("exitFullWindow")
-}
-r.src = function(a) {
- if(a instanceof Array) {
- var b;
- a: {
- b = a;
- for(var c = 0, d = this.options.techOrder;c < d.length;c++) {
- var f = vjs.T(d[c]), l = window.videojs[f];
- if(l.isSupported()) {
- for(var j = 0, p = b;j < p.length;j++) {
- var m = p[j];
- if(l.canPlaySource(m)) {
- b = {source:m, k:f};
- break a
- }
- }
- }
- }
- b = k
- }
- b ? (a = b.source, b = b.k, b == this.V ? this.src(a) : C(this, b, a)) : this.b.appendChild(vjs.d("p", {innerHTML:'Sorry, no compatible source and playback technology were found for this video. Try using another browser like Google Chrome or download the latest Adobe Flash Player .'}))
- }else {
- a instanceof Object ? window.videojs[this.V].canPlaySource(a) ? this.src(a.src) : this.src([a]) : (this.n.src = a, this.ia ? (H(this, "src", a), "auto" == this.options.preload && this.load(), this.options.autoplay && this.play()) : this.P(function() {
- this.src(a)
- }))
- }
- return this
-};
-r.load = function() {
- H(this, "load");
- return this
-};
-r.currentSrc = function() {
- return G(this, "currentSrc") || this.n.src || ""
-};
-r.Wa = function(a) {
- return a !== e ? (H(this, "setPreload", a), this.options.preload = a, this) : G(this, "preload")
-};
-r.autoplay = function(a) {
- return a !== e ? (H(this, "setAutoplay", a), this.options.autoplay = a, this) : G(this, "autoplay")
-};
-r.loop = function(a) {
- return a !== e ? (H(this, "setLoop", a), this.options.loop = a, this) : G(this, "loop")
-};
-r.controls = function() {
- return this.options.controls
-};
-r.poster = function() {
- return G(this, "poster")
-};
-r.error = function() {
- return G(this, "error")
-};
-var K, L, M, N;
-if(document.Wc !== e) {
- K = "requestFullscreen", L = "exitFullscreen", M = "fullscreenchange", N = "fullScreen"
-}else {
- for(var O = ["moz", "webkit"], P = O.length - 1;0 <= P;P--) {
- var Q = O[P];
- if(("moz" != Q || document.mozFullScreenEnabled) && document[Q + "CancelFullScreen"] !== e) {
- K = Q + "RequestFullScreen", L = Q + "CancelFullScreen", M = Q + "fullscreenchange", N = "webkit" == Q ? Q + "IsFullScreen" : Q + "FullScreen"
- }
- }
-}
-K && (vjs.Cb.Za = {Fc:K, nc:L, ha:M, U:N});
-vjs.Db = function(a, b, c) {
- vjs.c.call(this, a, b, c);
- if(!a.options.sources || 0 === a.options.sources.length) {
- b = 0;
- for(c = a.options.techOrder;b < c.length;b++) {
- var d = vjs.T(c[b]), f = window.videojs[d];
- if(f && f.isSupported()) {
- C(a, d);
- break
- }
- }
- }else {
- a.src(a.options.sources)
- }
-};
-v(vjs.Db, vjs.c);
-vjs.J = function(a, b, c) {
- vjs.c.call(this, a, b, c)
-};
-v(vjs.J, vjs.c);
-vjs.J.prototype.m = function() {
- this.a.options.controls && (this.a.paused() ? this.a.play() : this.a.pause())
-};
-vjs.media = {};
-vjs.media.bb = "play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
-function ea() {
- var a = vjs.media.bb[i];
- return function() {
- throw Error('The "' + a + "\" method is not available on the playback technology's API");
- }
-}
-for(var i = vjs.media.bb.length - 1;0 <= i;i--) {
- vjs.J.prototype[vjs.media.bb[i]] = ea()
-}
-;vjs.h = function(a, b, c) {
- vjs.J.call(this, a, b, c);
- (b = b.source) && this.b.currentSrc == b.src ? a.i("loadstart") : b && (this.b.src = b.src);
- a.P(function() {
- this.options.autoplay && this.paused() && (this.I.poster = h, this.play())
- });
- this.e("click", this.m);
- for(a = vjs.h.Z.length - 1;0 <= a;a--) {
- vjs.e(this.b, vjs.h.Z[a], vjs.bind(this.a, this.Lb))
- }
- z(this)
-};
-v(vjs.h, vjs.J);
-r = vjs.h.prototype;
-r.D = function() {
- for(var a = vjs.h.Z.length - 1;0 <= a;a--) {
- vjs.o(this.b, vjs.h.Z[a], vjs.bind(this.a, this.Lb))
- }
- vjs.h.f.D.call(this)
-};
-r.d = function() {
- var a = this.a, b = a.I;
- if(!b || this.G.yc === k) {
- b && a.j().removeChild(b), b = vjs.createElement("video", {id:b.id || a.id + "_html5_api", className:b.className || "vjs-tech"}), vjs.rb(b, a.j)
- }
- for(var c = ["autoplay", "preload", "loop", "muted"], d = c.length - 1;0 <= d;d--) {
- var f = c[d];
- a.options[f] !== h && (b[f] = a.options[f])
- }
- return b
-};
-r.Lb = function(a) {
- this.i(a);
- a.stopPropagation()
-};
-r.play = function() {
- this.b.play()
-};
-r.pause = function() {
- this.b.pause()
-};
-r.paused = function() {
- return this.b.paused
-};
-r.currentTime = function() {
- return this.b.currentTime
-};
-r.Ic = function(a) {
- try {
- this.b.currentTime = a
- }catch(b) {
- vjs.log(b, "Video is not ready. (Video.js)")
- }
-};
-r.duration = function() {
- return this.b.duration || 0
-};
-r.buffered = function() {
- return this.b.buffered
-};
-r.volume = function() {
- return this.b.volume
-};
-r.Nc = function(a) {
- this.b.volume = a
-};
-r.muted = function() {
- return this.b.muted
-};
-r.Lc = function(a) {
- this.b.muted = a
-};
-r.width = function() {
- return this.b.offsetWidth
-};
-r.height = function() {
- return this.b.offsetHeight
-};
-r.ab = function() {
- return"function" == typeof this.b.webkitEnterFullScreen && !navigator.userAgent.match("Chrome") && !navigator.userAgent.match("Mac OS X 10.5") ? g : k
-};
-r.src = function(a) {
- this.b.src = a
-};
-r.load = function() {
- this.b.load()
-};
-r.currentSrc = function() {
- return this.b.currentSrc
-};
-r.Wa = function() {
- return this.b.Wa
-};
-r.Mc = function(a) {
- this.b.Wa = a
-};
-r.autoplay = function() {
- return this.b.autoplay
-};
-r.Hc = function(a) {
- this.b.autoplay = a
-};
-r.loop = function() {
- return this.b.loop
-};
-r.Kc = function(a) {
- this.b.loop = a
-};
-r.error = function() {
- return this.b.error
-};
-r.controls = function() {
- return this.a.options.controls
-};
-vjs.h.isSupported = function() {
- return!!document.createElement("video").canPlayType
-};
-vjs.h.ib = function(a) {
- return!!document.createElement("video").canPlayType(a.type)
-};
-vjs.h.Z = "loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
-vjs.h.prototype.G = {ad:vjs.kc.webkitEnterFullScreen ? !vjs.Ja.match("Chrome") && !vjs.Ja.match("Mac OS X 10.5") ? g : k : k, yc:!vjs.gc};
-vjs.ec && 3 > vjs.dc && (document.createElement("video").constructor.prototype.canPlayType = function(a) {
- return a && -1 != a.toLowerCase().indexOf("video/mp4") ? "maybe" : ""
-});
-vjs.g = function(a, b, c) {
- vjs.J.call(this, a, b, c);
- c = b.source;
- var d = b.Dc, f = this.b = vjs.d("div", {id:a.id() + "_temp_flash"}), l = a.id() + "_flash_api";
- a = a.options;
- var j = vjs.s({readyFunction:"videojs.Flash.onReady", eventProxyFunction:"videojs.Flash.onEvent", errorEventProxyFunction:"videojs.Flash.onError", autoplay:a.autoplay, preload:a.Wa, loop:a.loop, muted:a.muted}, b.flashVars), p = vjs.s({wmode:"opaque", bgcolor:"#000000"}, b.params), m = vjs.s({id:l, name:l, "class":"vjs-tech"}, b.attributes);
- c && (j.src = encodeURIComponent(vjs.Pb(c.src)));
- vjs.rb(f, d);
- b.startTime && this.P(function() {
- this.load();
- this.play();
- this.currentTime(b.startTime)
- });
- if(b.ed === g && !vjs.fc) {
- var s = vjs.d("iframe", {id:l + "_iframe", name:l + "_iframe", className:"vjs-tech", scrolling:"no", marginWidth:0, marginHeight:0, frameBorder:0});
- j.readyFunction = "ready";
- j.eventProxyFunction = "events";
- j.errorEventProxyFunction = "errors";
- vjs.e(s, "load", vjs.bind(this, function() {
- var a, c = s.contentWindow;
- a = s.contentDocument ? s.contentDocument : s.contentWindow.document;
- a.write(vjs.g.Qb(b.swf, j, p, m));
- c.a = this.a;
- c.P = vjs.bind(this.a, function(b) {
- b = a.getElementById(b);
- var c = this.k;
- c.j = b;
- vjs.e(b, "click", c.bind(c.m));
- vjs.g.jb(c)
- });
- c.$c = vjs.bind(this.a, function(a, b) {
- this && "flash" === this.V && this.i(b)
- });
- c.Zc = vjs.bind(this.a, function(a, b) {
- vjs.log("Flash Error", b)
- })
- }));
- f.parentNode.replaceChild(s, f)
- }else {
- vjs.g.rc(b.swf, f, j, p, m)
- }
-};
-v(vjs.g, vjs.J);
-r = vjs.g.prototype;
-r.D = function() {
- vjs.g.f.D.call(this)
-};
-r.play = function() {
- this.b.vjs_play()
-};
-r.pause = function() {
- this.b.vjs_pause()
-};
-r.src = function(a) {
- a = vjs.Pb(a);
- this.b.vjs_src(a);
- if(this.a.autoplay()) {
- var b = this;
- setTimeout(function() {
- b.play()
- }, 0)
- }
-};
-r.load = function() {
- this.b.vjs_load()
-};
-r.poster = function() {
- this.b.vjs_getProperty("poster")
-};
-r.buffered = function() {
- return vjs.Jb(this.b.vjs_getProperty("buffered"))
-};
-r.ab = q(k);
-var R = vjs.g.prototype, S = "preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "), T = "error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");
-function fa() {
- var a = S[i], b = a.charAt(0).toUpperCase() + a.slice(1);
- R["set" + b] = function(b) {
- return this.b.vjs_setProperty(a, b)
- }
-}
-function U(a) {
- R[a] = function() {
- return this.b.vjs_getProperty(a)
- }
-}
-for(i = 0;i < S.length;i++) {
- U(S[i]), fa()
-}
-for(i = 0;i < T.length;i++) {
- U(T[i])
-}
-vjs.g.isSupported = function() {
- return 10 <= vjs.g.version()[0]
-};
-vjs.g.ib = function(a) {
- if(a.type in vjs.g.prototype.G.tc) {
- return"maybe"
- }
-};
-vjs.g.prototype.G = {tc:{"video/flv":"FLV", "video/x-flv":"FLV", "video/mp4":"MP4", "video/m4v":"MP4"}, Wb:k, bc:k, Ob:k, hd:!vjs.Ja.match("Firefox")};
-vjs.g.onReady = function(a) {
- a = vjs.j(a);
- var b = a.a || a.parentNode.a, c = b.k;
- a.a = b;
- c.b = a;
- c.e("click", c.m);
- vjs.g.jb(c)
-};
-vjs.g.jb = function(a) {
- a.j().vjs_getProperty ? z(a) : setTimeout(function() {
- vjs.g.jb(a)
- }, 50)
-};
-vjs.g.onEvent = function(a, b) {
- vjs.j(a).a.i(b)
-};
-vjs.g.onError = function(a, b) {
- vjs.j(a).a.i("error");
- vjs.log("Flash Error", b, a)
-};
-vjs.g.version = function() {
- var a = "0,0,0";
- try {
- a = (new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]
- }catch(b) {
- try {
- navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && (a = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1])
- }catch(c) {
- }
- }
- return a.split(",")
-};
-vjs.g.rc = function(a, b, c, d, f) {
- a = vjs.g.Qb(a, c, d, f);
- a = vjs.d("div", {innerHTML:a}).childNodes[0];
- c = b.parentNode;
- b.parentNode.replaceChild(a, b);
- var l = c.childNodes[0];
- setTimeout(function() {
- l.style.display = "block"
- }, 1E3)
-};
-vjs.g.Qb = function(a, b, c, d) {
- var f = "", l = "", j = "";
- b && vjs.Oa(b, function(a, b) {
- f += a + "=" + b + "&"
- });
- c = vjs.s({movie:a, flashvars:f, allowScriptAccess:"always", allowNetworking:"all"}, c);
- vjs.Oa(c, function(a, b) {
- l += ' '
- });
- d = vjs.s({data:a, width:"100%", height:"100%"}, d);
- vjs.Oa(d, function(a, b) {
- j += a + '="' + b + '" '
- });
- return'" + l + " "
-};
-vjs.Y = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.Y, vjs.c);
-vjs.Y.prototype.v = function() {
- return"vjs-control " + vjs.Y.f.v.call(this)
-};
-vjs.Q = function(a, b) {
- vjs.c.call(this, a, b);
- a.H("play", vjs.bind(this, function() {
- this.Pa();
- this.a.e("mouseover", vjs.bind(this, this.Pa));
- this.a.e("mouseout", vjs.bind(this, this.nb))
- }))
-};
-v(vjs.Q, vjs.c);
-r = vjs.Q.prototype;
-r.options = {xc:"play", children:{playToggle:{}, fullscreenToggle:{}, currentTimeDisplay:{}, timeDivider:{}, durationDisplay:{}, remainingTimeDisplay:{}, progressControl:{}, volumeControl:{}, muteToggle:{}}};
-r.d = function() {
- return vjs.d("div", {className:"vjs-control-bar"})
-};
-r.Pa = function() {
- vjs.Q.f.Pa.call(this);
- this.a.i("controlsvisible")
-};
-r.nb = function() {
- vjs.Q.f.nb.call(this);
- this.a.i("controlshidden")
-};
-r.Ub = function() {
- this.b.style.opacity = "1"
-};
-vjs.l = function(a, b) {
- vjs.Y.call(this, a, b);
- this.e("click", this.m);
- this.e("focus", this.Sa);
- this.e("blur", this.Ra)
-};
-v(vjs.l, vjs.Y);
-r = vjs.l.prototype;
-r.d = function(a, b) {
- b = vjs.s({className:this.v(), innerHTML:'' + (this.S || "Need Text") + "
", Gc:"button", tabIndex:0}, b);
- return vjs.l.f.d.call(this, a, b)
-};
-r.m = function() {
-};
-r.Sa = function() {
- vjs.e(document, "keyup", vjs.bind(this, this.Ba))
-};
-r.Ba = function(a) {
- if(32 == a.which || 13 == a.which) {
- a.preventDefault(), this.m()
- }
-};
-r.Ra = function() {
- vjs.o(document, "keyup", vjs.bind(this, this.Ba))
-};
-vjs.da = function(a, b) {
- vjs.l.call(this, a, b)
-};
-v(vjs.da, vjs.l);
-vjs.da.prototype.S = "Play";
-vjs.da.prototype.v = function() {
- return"vjs-play-button " + vjs.da.f.v.call(this)
-};
-vjs.da.prototype.m = function() {
- this.a.play()
-};
-vjs.ca = function(a, b) {
- vjs.l.call(this, a, b)
-};
-v(vjs.ca, vjs.l);
-vjs.ca.prototype.S = "Play";
-vjs.ca.prototype.v = function() {
- return"vjs-pause-button " + vjs.ca.f.v.call(this)
-};
-vjs.ca.prototype.m = function() {
- this.a.pause()
-};
-vjs.Fa = function(a, b) {
- vjs.l.call(this, a, b);
- a.e("play", vjs.bind(this, this.Ab));
- a.e("pause", vjs.bind(this, this.zb))
-};
-v(vjs.Fa, vjs.l);
-r = vjs.Fa.prototype;
-r.S = "Play";
-r.v = function() {
- return"vjs-play-control " + vjs.Fa.f.v.call(this)
-};
-r.m = function() {
- this.a.paused() ? this.a.play() : this.a.pause()
-};
-r.Ab = function() {
- vjs.z(this.b, "vjs-paused");
- vjs.u(this.b, "vjs-playing")
-};
-r.zb = function() {
- vjs.z(this.b, "vjs-playing");
- vjs.u(this.b, "vjs-paused")
-};
-vjs.$ = function(a, b) {
- vjs.l.call(this, a, b)
-};
-v(vjs.$, vjs.l);
-vjs.$.prototype.S = "Fullscreen";
-vjs.$.prototype.v = function() {
- return"vjs-fullscreen-control " + vjs.$.f.v.call(this)
-};
-vjs.$.prototype.m = function() {
- this.a.U ? I(this.a) : this.a.Za()
-};
-vjs.X = function(a, b) {
- vjs.l.call(this, a, b);
- a.e("play", vjs.bind(this, this.w));
- a.e("ended", vjs.bind(this, this.show))
-};
-v(vjs.X, vjs.l);
-vjs.X.prototype.d = function() {
- return vjs.X.f.d.call(this, "div", {className:"vjs-big-play-button", innerHTML:" "})
-};
-vjs.X.prototype.m = function() {
- this.a.currentTime() && this.a.currentTime(0);
- this.a.play()
-};
-vjs.ra = function(a, b) {
- vjs.c.call(this, a, b);
- a.e("canplay", vjs.bind(this, this.w));
- a.e("canplaythrough", vjs.bind(this, this.w));
- a.e("playing", vjs.bind(this, this.w));
- a.e("seeked", vjs.bind(this, this.w));
- a.e("seeking", vjs.bind(this, this.show));
- a.e("seeked", vjs.bind(this, this.w));
- a.e("error", vjs.bind(this, this.show));
- a.e("waiting", vjs.bind(this, this.show))
-};
-v(vjs.ra, vjs.c);
-vjs.ra.prototype.d = function() {
- var a, b;
- "string" == typeof this.a.j().style.WebkitBorderRadius || "string" == typeof this.a.j().style.MozBorderRadius || "string" == typeof this.a.j().style.Uc || "string" == typeof this.a.j().style.Vc ? (a = "vjs-loading-spinner", b = '
') : (a = "vjs-loading-spinner-fallback", b = "");
- return vjs.ra.f.d.call(this, "div", {className:a, innerHTML:b})
-};
-vjs.oa = function(a, b) {
- vjs.c.call(this, a, b);
- a.e("timeupdate", vjs.bind(this, this.Da))
-};
-v(vjs.oa, vjs.c);
-vjs.oa.prototype.d = function() {
- var a = vjs.oa.f.d.call(this, "div", {className:"vjs-current-time vjs-time-controls vjs-control"});
- this.content = vjs.d("div", {className:"vjs-current-time-display", innerHTML:"0:00"});
- a.appendChild(vjs.d("div").appendChild(this.content));
- return a
-};
-vjs.oa.prototype.Da = function() {
- var a = this.a.Yb ? this.a.n.currentTime : this.a.currentTime();
- this.content.innerHTML = vjs.pb(a, this.a.duration())
-};
-vjs.pa = function(a, b) {
- vjs.c.call(this, a, b);
- a.e("timeupdate", vjs.bind(this, this.Da))
-};
-v(vjs.pa, vjs.c);
-vjs.pa.prototype.d = function() {
- var a = vjs.pa.f.d.call(this, "div", {className:"vjs-duration vjs-time-controls vjs-control"});
- this.content = vjs.d("div", {className:"vjs-duration-display", innerHTML:"0:00"});
- a.appendChild(vjs.d("div").appendChild(this.content));
- return a
-};
-vjs.pa.prototype.Da = function() {
- this.a.duration() && (this.content.innerHTML = vjs.pb(this.a.duration()))
-};
-vjs.Ia = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.Ia, vjs.c);
-vjs.Ia.prototype.d = function() {
- return vjs.Ia.f.d.call(this, "div", {className:"vjs-time-divider", innerHTML:"/
"})
-};
-vjs.va = function(a, b) {
- vjs.c.call(this, a, b);
- a.e("timeupdate", vjs.bind(this, this.Da))
-};
-v(vjs.va, vjs.c);
-vjs.va.prototype.d = function() {
- var a = vjs.va.f.d.call(this, "div", {className:"vjs-remaining-time vjs-time-controls vjs-control"});
- this.content = vjs.d("div", {className:"vjs-remaining-time-display", innerHTML:"-0:00"});
- a.appendChild(vjs.d("div").appendChild(this.content));
- return a
-};
-vjs.va.prototype.Da = function() {
- this.a.duration() && (this.content.innerHTML = "-" + vjs.pb(this.a.duration() - this.a.currentTime()))
-};
-vjs.K = function(a, b) {
- vjs.c.call(this, a, b);
- this.lc = this.M[this.options.barName];
- this.handle = this.M[this.options.handleName];
- a.e(this.Vb, vjs.bind(this, this.update));
- this.e("mousedown", this.yb);
- this.e("focus", this.Sa);
- this.e("blur", this.Ra);
- this.a.e("controlsvisible", vjs.bind(this, this.update));
- a.P(vjs.bind(this, this.update))
-};
-v(vjs.K, vjs.c);
-r = vjs.K.prototype;
-r.d = function(a, b) {
- b = vjs.s({Gc:"slider", "aria-valuenow":0, "aria-valuemin":0, "aria-valuemax":100, tabIndex:0}, b);
- return vjs.K.f.d.call(this, a, b)
-};
-r.yb = function(a) {
- a.preventDefault();
- vjs.mc();
- vjs.e(document, "mousemove", vjs.bind(this, this.Ta));
- vjs.e(document, "mouseup", vjs.bind(this, this.Ua));
- this.Ta(a)
-};
-r.Ua = function() {
- vjs.Oc();
- vjs.o(document, "mousemove", this.Ta, k);
- vjs.o(document, "mouseup", this.Ua, k);
- this.update()
-};
-r.update = function() {
- var a, b = this.Rb(), c = this.handle, d = this.lc;
- isNaN(b) && (b = 0);
- a = b;
- if(c) {
- a = this.b.offsetWidth;
- var f = c.j().offsetWidth;
- a = f ? f / a : 0;
- b *= 1 - a;
- a = b + a / 2;
- c.j().style.left = vjs.round(100 * b, 2) + "%"
- }
- d.j().style.width = vjs.round(100 * a, 2) + "%"
-};
-function V(a, b) {
- var c = a.b, d = vjs.sc(c), c = c.offsetWidth, f = a.handle;
- f && (f = f.j().offsetWidth, d += f / 2, c -= f);
- return Math.max(0, Math.min(1, (b.pageX - d) / c))
-}
-r.Sa = function() {
- vjs.e(document, "keyup", vjs.bind(this, this.Ba))
-};
-r.Ba = function(a) {
- 37 == a.which ? (a.preventDefault(), this.$b()) : 39 == a.which && (a.preventDefault(), this.ac())
-};
-r.Ra = function() {
- vjs.o(document, "keyup", vjs.bind(this, this.Ba))
-};
-vjs.ua = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.ua, vjs.c);
-vjs.ua.prototype.options = {children:{seekBar:{}}};
-vjs.ua.prototype.d = function() {
- return vjs.ua.f.d.call(this, "div", {className:"vjs-progress-control vjs-control"})
-};
-vjs.fa = function(a, b) {
- vjs.K.call(this, a, b)
-};
-v(vjs.fa, vjs.K);
-r = vjs.fa.prototype;
-r.options = {children:{loadProgressBar:{}, playProgressBar:{}, seekHandle:{}}, barName:"playProgressBar", handleName:"seekHandle"};
-r.Vb = "timeupdate";
-r.d = function() {
- return vjs.fa.f.d.call(this, "div", {className:"vjs-progress-holder"})
-};
-r.Rb = function() {
- return this.a.currentTime() / this.a.duration()
-};
-r.yb = function(a) {
- vjs.fa.f.yb.call(this, a);
- this.a.Yb = g;
- this.Pc = !this.a.paused();
- this.a.pause()
-};
-r.Ta = function(a) {
- a = V(this, a) * this.a.duration();
- a == this.a.duration() && (a -= 0.1);
- this.a.currentTime(a)
-};
-r.Ua = function(a) {
- vjs.fa.f.Ua.call(this, a);
- this.a.Yb = k;
- this.Pc && this.a.play()
-};
-r.ac = function() {
- this.a.currentTime(this.a.currentTime() + 1)
-};
-r.$b = function() {
- this.a.currentTime(this.a.currentTime() - 1)
-};
-vjs.qa = function(a, b) {
- vjs.c.call(this, a, b);
- a.e("progress", vjs.bind(this, this.update))
-};
-v(vjs.qa, vjs.c);
-vjs.qa.prototype.d = function() {
- return vjs.qa.f.d.call(this, "div", {className:"vjs-load-progress", innerHTML:'Loaded: 0% '})
-};
-vjs.qa.prototype.update = function() {
- this.b.style && (this.b.style.width = vjs.round(100 * E(this.a), 2) + "%")
-};
-vjs.Ea = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.Ea, vjs.c);
-vjs.Ea.prototype.d = function() {
- return vjs.Ea.f.d.call(this, "div", {className:"vjs-play-progress", innerHTML:'Progress: 0% '})
-};
-vjs.Ga = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.Ga, vjs.c);
-vjs.Ga.prototype.d = function() {
- return vjs.Ga.f.d.call(this, "div", {className:"vjs-seek-handle", innerHTML:'00:00 '})
-};
-vjs.xa = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.xa, vjs.c);
-vjs.xa.prototype.options = {children:{volumeBar:{}}};
-vjs.xa.prototype.d = function() {
- return vjs.xa.f.d.call(this, "div", {className:"vjs-volume-control vjs-control"})
-};
-vjs.Ka = function(a, b) {
- vjs.K.call(this, a, b)
-};
-v(vjs.Ka, vjs.K);
-r = vjs.Ka.prototype;
-r.options = {children:{volumeLevel:{}, volumeHandle:{}}, barName:"volumeLevel", handleName:"volumeHandle"};
-r.Vb = "volumechange";
-r.d = function() {
- return vjs.Ka.f.d.call(this, "div", {className:"vjs-volume-bar"})
-};
-r.Ta = function(a) {
- this.a.volume(V(this, a))
-};
-r.Rb = function() {
- return this.a.volume()
-};
-r.ac = function() {
- this.a.volume(this.a.volume() + 0.1)
-};
-r.$b = function() {
- this.a.volume(this.a.volume() - 0.1)
-};
-vjs.Ma = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.Ma, vjs.c);
-vjs.Ma.prototype.d = function() {
- return vjs.Ma.f.d.call(this, "div", {className:"vjs-volume-level", innerHTML:' '})
-};
-vjs.La = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.La, vjs.c);
-vjs.La.prototype.d = function() {
- return vjs.La.f.d.call(this, "div", {className:"vjs-volume-handle", innerHTML:' '})
-};
-vjs.ba = function(a, b) {
- vjs.l.call(this, a, b);
- a.e("volumechange", vjs.bind(this, this.update))
-};
-v(vjs.ba, vjs.l);
-vjs.ba.prototype.d = function() {
- return vjs.ba.f.d.call(this, "div", {className:"vjs-mute-control vjs-control", innerHTML:'Mute
'})
-};
-vjs.ba.prototype.m = function() {
- this.a.muted(this.a.muted() ? k : g)
-};
-vjs.ba.prototype.update = function() {
- var a = this.a.volume(), b = 3;
- 0 === a || this.a.muted() ? b = 0 : 0.33 > a ? b = 1 : 0.67 > a && (b = 2);
- for(a = 0;4 > a;a++) {
- vjs.z(this.b, "vjs-vol-" + a)
- }
- vjs.u(this.b, "vjs-vol-" + b)
-};
-vjs.ta = function(a, b) {
- vjs.l.call(this, a, b);
- this.a.options.poster || this.w();
- a.e("play", vjs.bind(this, this.w))
-};
-v(vjs.ta, vjs.l);
-vjs.ta.prototype.d = function() {
- var a = vjs.d("img", {className:"vjs-poster", tabIndex:-1});
- this.a.options.poster && (a.src = this.a.options.poster);
- return a
-};
-vjs.ta.prototype.m = function() {
- this.a.play()
-};
-vjs.aa = function(a, b) {
- vjs.c.call(this, a, b)
-};
-v(vjs.aa, vjs.c);
-function W(a, b) {
- a.R(b);
- b.e("click", vjs.bind(a, function() {
- A(this)
- }))
-}
-vjs.aa.prototype.d = function() {
- return vjs.aa.f.d.call(this, "ul", {className:"vjs-menu"})
-};
-vjs.B = function(a, b) {
- vjs.l.call(this, a, b);
- b.selected && this.u("vjs-selected")
-};
-v(vjs.B, vjs.l);
-vjs.B.prototype.d = function(a, b) {
- return vjs.B.f.d.call(this, "li", vjs.s({className:"vjs-menu-item", innerHTML:this.options.label}, b))
-};
-vjs.B.prototype.m = function() {
- this.selected(g)
-};
-vjs.B.prototype.selected = function(a) {
- a ? this.u("vjs-selected") : this.z("vjs-selected")
-};
-function X(a) {
- a.Ca = a.Ca || [];
- return a.Ca
-}
-function Y(a, b, c) {
- for(var d = a.Ca, f = 0, l = d.length, j, p;f < l;f++) {
- j = d[f], j.id() === b ? (j.show(), p = j) : c && (j.A() == c && 0 < j.mode()) && j.disable()
- }
- (b = p ? p.A() : c ? c : k) && a.i(b + "trackchange")
-}
-vjs.t = function(a, b) {
- vjs.c.call(this, a, b);
- this.O = b.id || "vjs_" + b.kind + "_" + b.language + "_" + vjs.p++;
- this.Zb = b.src;
- this.oc = b["default"] || b.dflt;
- this.kd = b.title;
- this.fd = b.srclang;
- this.wc = b.label;
- this.ga = [];
- this.Eb = [];
- this.ka = this.la = 0
-};
-v(vjs.t, vjs.c);
-r = vjs.t.prototype;
-r.A = n("r");
-r.src = n("Zb");
-r.mb = n("oc");
-r.label = n("wc");
-r.readyState = n("la");
-r.mode = n("ka");
-r.d = function() {
- return vjs.t.f.d.call(this, "div", {className:"vjs-" + this.r + " vjs-text-track"})
-};
-r.show = function() {
- Z(this);
- this.ka = 2;
- vjs.t.f.show.call(this)
-};
-r.w = function() {
- Z(this);
- this.ka = 1;
- vjs.t.f.w.call(this)
-};
-r.disable = function() {
- 2 == this.ka && this.w();
- this.a.o("timeupdate", vjs.bind(this, this.update, this.O));
- this.a.o("ended", vjs.bind(this, this.reset, this.O));
- this.reset();
- this.a.M.textTrackDisplay.removeChild(this);
- this.ka = 0
-};
-function Z(a) {
- 0 === a.la && a.load();
- 0 === a.ka && (a.a.e("timeupdate", vjs.bind(a, a.update, a.O)), a.a.e("ended", vjs.bind(a, a.reset, a.O)), ("captions" === a.r || "subtitles" === a.r) && a.a.M.textTrackDisplay.R(a))
-}
-r.load = function() {
- 0 === this.la && (this.la = 1, vjs.get(this.Zb, vjs.bind(this, this.Ec), vjs.bind(this, this.xb)))
-};
-r.xb = function(a) {
- this.error = a;
- this.la = 3;
- this.i("error")
-};
-r.Ec = function(a) {
- var b, c;
- a = a.split("\n");
- for(var d = "", f = 1, l = a.length;f < l;f++) {
- if(d = vjs.trim(a[f])) {
- -1 == d.indexOf("--\x3e") ? (b = d, d = vjs.trim(a[++f])) : b = this.ga.length;
- b = {id:b, index:this.ga.length};
- c = d.split(" --\x3e ");
- b.startTime = ga(c[0]);
- b.za = ga(c[1]);
- for(c = [];a[++f] && (d = vjs.trim(a[f]));) {
- c.push(d)
- }
- b.text = c.join(" ");
- this.ga.push(b)
- }
- }
- this.la = 2;
- this.i("loaded")
-};
-function ga(a) {
- var b = a.split(":");
- a = 0;
- var c, d, f;
- 3 == b.length ? (c = b[0], d = b[1], b = b[2]) : (c = 0, d = b[0], b = b[1]);
- b = b.split(/\s+/);
- b = b.splice(0, 1)[0];
- b = b.split(/\.|,/);
- f = parseFloat(b[1]);
- b = b[0];
- a += 3600 * parseFloat(c);
- a += 60 * parseFloat(d);
- a += parseFloat(b);
- f && (a += f / 1E3);
- return a
-}
-r.update = function() {
- if(0 < this.ga.length) {
- var a = this.a.currentTime();
- if(this.Bb === e || a < this.Bb || this.Qa <= a) {
- var b = this.ga, c = this.a.duration(), d = 0, f = k, l = [], j, p, m, s;
- a >= this.Qa || this.Qa === e ? s = this.ob !== e ? this.ob : 0 : (f = g, s = this.ub !== e ? this.ub : b.length - 1);
- for(;;) {
- m = b[s];
- if(m.za <= a) {
- d = Math.max(d, m.za), m.Na && (m.Na = k)
- }else {
- if(a < m.startTime) {
- if(c = Math.min(c, m.startTime), m.Na && (m.Na = k), !f) {
- break
- }
- }else {
- f ? (l.splice(0, 0, m), p === e && (p = s), j = s) : (l.push(m), j === e && (j = s), p = s), c = Math.min(c, m.za), d = Math.max(d, m.startTime), m.Na = g
- }
- }
- if(f) {
- if(0 === s) {
- break
- }else {
- s--
- }
- }else {
- if(s === b.length - 1) {
- break
- }else {
- s++
- }
- }
- }
- this.Eb = l;
- this.Qa = c;
- this.Bb = d;
- this.ob = j;
- this.ub = p;
- a = this.Eb;
- b = "";
- c = 0;
- for(d = a.length;c < d;c++) {
- b += '' + a[c].text + " "
- }
- this.b.innerHTML = b;
- this.i("cuechange")
- }
- }
-};
-r.reset = function() {
- this.Qa = 0;
- this.Bb = this.a.duration();
- this.ub = this.ob = 0
-};
-vjs.cb = function(a, b) {
- vjs.t.call(this, a, b)
-};
-v(vjs.cb, vjs.t);
-vjs.cb.prototype.r = "captions";
-vjs.gb = function(a, b) {
- vjs.t.call(this, a, b)
-};
-v(vjs.gb, vjs.t);
-vjs.gb.prototype.r = "subtitles";
-vjs.fb = function(a, b) {
- vjs.t.call(this, a, b)
-};
-v(vjs.fb, vjs.t);
-vjs.fb.prototype.r = "chapters";
-vjs.Ha = function(a, b, c) {
- vjs.c.call(this, a, b, c);
- if(a.options.tracks && 0 < a.options.tracks.length) {
- b = this.a;
- a = a.options.tracks;
- var d;
- for(c = 0;c < a.length;c++) {
- d = a[c];
- var f = b, l = d.kind, j = d.label, p = d.language, m = d;
- d = f.Ca = f.Ca || [];
- m = m || {};
- m.kind = l;
- m.label = j;
- m.language = p;
- l = vjs.T(l || "subtitles");
- f = new window.videojs[l + "Track"](f, m);
- d.push(f)
- }
- }
-};
-v(vjs.Ha, vjs.c);
-vjs.Ha.prototype.d = function() {
- return vjs.Ha.f.d.call(this, "div", {className:"vjs-text-track-display"})
-};
-vjs.L = function(a, b) {
- var c = this.W = b.track;
- b.label = c.label();
- b.selected = c.mb();
- vjs.B.call(this, a, b);
- this.a.e(c.A() + "trackchange", vjs.bind(this, this.update))
-};
-v(vjs.L, vjs.B);
-vjs.L.prototype.m = function() {
- vjs.L.f.m.call(this);
- Y(this.a, this.W.id(), this.W.A())
-};
-vjs.L.prototype.update = function() {
- 2 == this.W.mode() ? this.selected(g) : this.selected(k)
-};
-vjs.sa = function(a, b) {
- b.track = {A:function() {
- return b.kind
- }, a:a, label:q("Off"), mb:q(k), mode:q(k)};
- vjs.L.call(this, a, b)
-};
-v(vjs.sa, vjs.L);
-vjs.sa.prototype.m = function() {
- vjs.sa.f.m.call(this);
- Y(this.a, this.W.id(), this.W.A())
-};
-vjs.sa.prototype.update = function() {
- for(var a = X(this.a), b = 0, c = a.length, d, f = g;b < c;b++) {
- d = a[b], d.A() == this.W.A() && 2 == d.mode() && (f = k)
- }
- f ? this.selected(g) : this.selected(k)
-};
-vjs.F = function(a, b) {
- vjs.l.call(this, a, b);
- this.ja = this.lb();
- 0 === this.Aa.length && this.w()
-};
-v(vjs.F, vjs.l);
-r = vjs.F.prototype;
-r.lb = function() {
- var a = new vjs.aa(this.a);
- a.j().appendChild(vjs.d("li", {className:"vjs-menu-title", innerHTML:vjs.T(this.r)}));
- W(a, new vjs.sa(this.a, {kind:this.r}));
- this.Aa = this.Ib();
- for(var b = 0;b < this.Aa.length;b++) {
- W(a, this.Aa[b])
- }
- this.R(a);
- return a
-};
-r.Ib = function() {
- for(var a = [], b, c = 0;c < X(this.a).length;c++) {
- b = X(this.a)[c], b.A() === this.r && a.push(new vjs.L(this.a, {track:b}))
- }
- return a
-};
-r.v = function() {
- return this.className + " vjs-menu-button " + vjs.F.f.v.call(this)
-};
-r.Sa = function() {
- this.ja.Ub();
- vjs.H(this.ja.b.childNodes[this.ja.b.childNodes.length - 1], "blur", vjs.bind(this, function() {
- A(this.ja)
- }))
-};
-r.Ra = function() {
-};
-r.m = function() {
- this.H("mouseout", vjs.bind(this, function() {
- A(this.ja);
- this.b.blur()
- }))
-};
-vjs.ma = function(a, b) {
- vjs.F.call(this, a, b)
-};
-v(vjs.ma, vjs.F);
-vjs.ma.prototype.r = "captions";
-vjs.ma.prototype.S = "Captions";
-vjs.ma.prototype.className = "vjs-captions-button";
-vjs.wa = function(a, b) {
- vjs.F.call(this, a, b)
-};
-v(vjs.wa, vjs.F);
-vjs.wa.prototype.r = "subtitles";
-vjs.wa.prototype.S = "Subtitles";
-vjs.wa.prototype.className = "vjs-subtitles-button";
-vjs.eb = function(a, b) {
- vjs.F.call(this, a, b)
-};
-v(vjs.eb, vjs.F);
-r = vjs.eb.prototype;
-r.r = "chapters";
-r.S = "Chapters";
-r.className = "vjs-chapters-button";
-r.Ib = function() {
- for(var a = [], b, c = 0;c < X(this.a).length;c++) {
- b = X(this.a)[c], b.A() === this.r && a.push(new vjs.L(this.a, {track:b}))
- }
- return a
-};
-r.lb = function() {
- for(var a = X(this.a), b = 0, c = a.length, d, f, l = this.Aa = [];b < c;b++) {
- if(d = a[b], d.A() == this.r && d.mb()) {
- if(2 > d.readyState()) {
- this.Xc = d;
- d.e("loaded", vjs.bind(this, this.lb));
- return
- }
- f = d;
- break
- }
- }
- a = this.ja = new vjs.aa(this.a);
- a.b.appendChild(vjs.d("li", {className:"vjs-menu-title", innerHTML:vjs.T(this.r)}));
- if(f) {
- d = f.ga;
- for(var j, b = 0, c = d.length;b < c;b++) {
- j = d[b], j = new vjs.na(this.a, {track:f, cue:j}), l.push(j), a.R(j)
- }
- }
- this.R(a);
- 0 < this.Aa.length && this.show();
- return a
-};
-vjs.na = function(a, b) {
- var c = this.W = b.track, d = this.cue = b.cue, f = a.currentTime();
- b.label = d.text;
- b.selected = d.startTime <= f && f < d.za;
- vjs.B.call(this, a, b);
- c.e("cuechange", vjs.bind(this, this.update))
-};
-v(vjs.na, vjs.B);
-vjs.na.prototype.m = function() {
- vjs.na.f.m.call(this);
- this.a.currentTime(this.cue.startTime);
- this.update(this.cue.startTime)
-};
-vjs.na.prototype.update = function() {
- var a = this.cue, b = this.a.currentTime();
- a.startTime <= b && b < a.za ? this.selected(g) : this.selected(k)
-};
-vjs.s(vjs.Q.prototype.options.children, {subtitlesButton:{}, captionsButton:{}, chaptersButton:{}});
-vjs.Fb = function() {
- var a, b, c = document.getElementsByTagName("video");
- if(c && 0 < c.length) {
- for(var d = 0, f = c.length;d < f;d++) {
- if((b = c[d]) && b.getAttribute) {
- b.a === e && (a = b.getAttribute("data-setup"), a !== h && (a = vjs.JSON.parse(a || "{}"), aa(b, a)))
- }else {
- vjs.Gb();
- break
- }
- }
- }else {
- vjs.Rc || vjs.Gb()
- }
-};
-vjs.Gb = function() {
- setTimeout(vjs.Fb, 1)
-};
-vjs.H(window, "load", function() {
- vjs.Rc = g
-});
-vjs.Fb();
-if(JSON && "function" === JSON.parse) {
- vjs.JSON = JSON
-}else {
- vjs.JSON = {};
- var $ = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
- vjs.JSON.parse = function(a, b) {
- function c(a, d) {
- var j, p, m = a[d];
- if(m && "object" === typeof m) {
- for(j in m) {
- Object.prototype.hasOwnProperty.call(m, j) && (p = c(m, j), p !== e ? m[j] = p : delete m[j])
- }
- }
- return b.call(a, d, m)
- }
- var d;
- a = String(a);
- $.lastIndex = 0;
- $.test(a) && (a = a.replace($, function(a) {
- return"\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
- }));
- if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
- return d = eval("(" + a + ")"), "function" === typeof b ? c({"":d}, "") : d
- }
- throw new SyntaxError("JSON.parse");
- }
-}
-;u("videojs", vjs);
-u("_V_", vjs);
-u("videojs.options", vjs.options);
-u("videojs.cache", vjs.ya);
-u("videojs.Component", vjs.c);
-vjs.c.prototype.dispose = vjs.c.prototype.D;
-vjs.c.prototype.createEl = vjs.c.prototype.d;
-vjs.c.prototype.getEl = vjs.c.prototype.dd;
-vjs.c.prototype.addChild = vjs.c.prototype.R;
-vjs.c.prototype.getChildren = vjs.c.prototype.bd;
-vjs.c.prototype.on = vjs.c.prototype.e;
-vjs.c.prototype.off = vjs.c.prototype.o;
-vjs.c.prototype.one = vjs.c.prototype.H;
-vjs.c.prototype.trigger = vjs.c.prototype.i;
-vjs.c.prototype.show = vjs.c.prototype.show;
-vjs.c.prototype.hide = vjs.c.prototype.w;
-vjs.c.prototype.width = vjs.c.prototype.width;
-vjs.c.prototype.height = vjs.c.prototype.height;
-vjs.c.prototype.dimensions = vjs.c.prototype.pc;
-u("videojs.Player", vjs.ea);
-u("videojs.MediaLoader", vjs.Db);
-u("videojs.PosterImage", vjs.ta);
-u("videojs.LoadingSpinner", vjs.ra);
-u("videojs.BigPlayButton", vjs.X);
-u("videojs.ControlBar", vjs.Q);
-u("videojs.TextTrackDisplay", vjs.Ha);
-u("videojs.Control", vjs.Y);
-u("videojs.ControlBar", vjs.Q);
-u("videojs.Button", vjs.l);
-u("videojs.PlayButton", vjs.da);
-u("videojs.PauseButton", vjs.ca);
-u("videojs.PlayToggle", vjs.Fa);
-u("videojs.FullscreenToggle", vjs.$);
-u("videojs.BigPlayButton", vjs.X);
-u("videojs.LoadingSpinner", vjs.ra);
-u("videojs.CurrentTimeDisplay", vjs.oa);
-u("videojs.DurationDisplay", vjs.pa);
-u("videojs.TimeDivider", vjs.Ia);
-u("videojs.RemainingTimeDisplay", vjs.va);
-u("videojs.Slider", vjs.K);
-u("videojs.ProgressControl", vjs.ua);
-u("videojs.SeekBar", vjs.fa);
-u("videojs.LoadProgressBar", vjs.qa);
-u("videojs.PlayProgressBar", vjs.Ea);
-u("videojs.SeekHandle", vjs.Ga);
-u("videojs.VolumeControl", vjs.xa);
-u("videojs.VolumeBar", vjs.Ka);
-u("videojs.VolumeLevel", vjs.Ma);
-u("videojs.VolumeHandle", vjs.La);
-u("videojs.MuteToggle", vjs.ba);
-u("videojs.PosterImage", vjs.ta);
-u("videojs.Menu", vjs.aa);
-u("videojs.MenuItem", vjs.B);
-u("videojs.SubtitlesButton", vjs.wa);
-u("videojs.CaptionsButton", vjs.ma);
-u("videojs.ChaptersButton", vjs.eb);
-u("videojs.MediaTechController", vjs.J);
-u("videojs.Html5", vjs.h);
-vjs.h.Events = vjs.h.Z;
-vjs.h.isSupported = vjs.h.isSupported;
-vjs.h.canPlaySource = vjs.h.ib;
-vjs.h.prototype.setCurrentTime = vjs.h.prototype.Ic;
-vjs.h.prototype.setVolume = vjs.h.prototype.Nc;
-vjs.h.prototype.setMuted = vjs.h.prototype.Lc;
-vjs.h.prototype.setPreload = vjs.h.prototype.Mc;
-vjs.h.prototype.setAutoplay = vjs.h.prototype.Hc;
-vjs.h.prototype.setLoop = vjs.h.prototype.Kc;
-u("videojs.Flash", vjs.g);
-vjs.g.Events = vjs.g.Z;
-vjs.g.isSupported = vjs.g.isSupported;
-vjs.g.canPlaySource = vjs.g.ib;
-vjs.g.onReady = vjs.g.onReady;
-u("videojs.TextTrack", vjs.t);
-vjs.t.prototype.label = vjs.t.prototype.label;
-u("videojs.CaptionsTrack", vjs.cb);
-u("videojs.SubtitlesTrack", vjs.gb);
-u("videojs.ChaptersTrack", vjs.fb);
-})();//@ sourceMappingURL=video.compiled.js.map
+(function() {var e=void 0,g=!0,h=null,k=!1;function n(a){return function(){return this[a]}}function q(a){return function(){return a}}var r,t=this;t.Sc=g;function u(a,b){var c=a.split("."),d=t;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==e?d[f]=b:d=d[f]?d[f]:d[f]={}}function v(a,b){function c(){}c.prototype=b.prototype;a.f=b.prototype;a.prototype=new c;a.prototype.constructor=a};document.createElement("video");document.createElement("audio");var aa=vjs=function(a,b,c){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(vjs.Va[a])return vjs.Va[a];a=vjs.j(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.a||new vjs.ea(a,b,c)};
+vjs.options={techOrder:["html5","flash"],html5:{},flash:{jd:"http://vjs.zencdn.net/c/video-js.swf"},width:300,height:150,defaultVolume:0,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{}}};vjs.Va={};vjs.d=function(a,b){var c=document.createElement(a||"div"),d;for(d in b)b.hasOwnProperty(d)&&(c[d]=b[d]);return c};vjs.T=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};vjs.Oa=function(a,b){if(a)for(var c in a)a.hasOwnProperty(c)&&b.call(this,c,a[c])};vjs.s=function(a,b){if(!b)return a;for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a};vjs.bind=function(a,b,c){function d(){return b.apply(a,arguments)}b.p||(b.p=vjs.p++);d.p=c?c+"_"+b.p:b.p;return d};vjs.ya={};vjs.p=1;
+vjs.expando="vdata"+(new Date).getTime();vjs.getData=function(a){var b=a[vjs.expando];b||(b=a[vjs.expando]=vjs.p++,vjs.ya[b]={});return vjs.ya[b]};vjs.Sb=function(a){a=a[vjs.expando];return!(!a||vjs.sb(vjs.ya[a]))};vjs.Xb=function(a){var b=a[vjs.expando];if(b){delete vjs.ya[b];try{delete a[vjs.expando]}catch(c){a.removeAttribute?a.removeAttribute(vjs.expando):a[vjs.expando]=h}}};vjs.sb=function(a){for(var b in a)if(a[b]!==h)return k;return g};
+vjs.u=function(a,b){-1==(" "+a.className+" ").indexOf(" "+b+" ")&&(a.className=""===a.className?b:a.className+" "+b)};vjs.z=function(a,b){if(-1!=a.className.indexOf(b)){var c=a.className.split(" ");c.splice(c.indexOf(b),1);a.className=c.join(" ")}};vjs.kc=document.createElement("video");vjs.Ja=navigator.userAgent;vjs.ic=!!navigator.userAgent.match(/iPad/i);vjs.hc=!!navigator.userAgent.match(/iPhone/i);vjs.jc=!!navigator.userAgent.match(/iPod/i);vjs.gc=vjs.ic||vjs.hc||vjs.jc;var ba=vjs,w;var x=navigator.userAgent.match(/OS (\d+)_/i);
+w=x&&x[1]?x[1]:e;ba.Tc=w;vjs.ec=!!navigator.userAgent.match(/Android.*AppleWebKit/i);var ca=vjs,y=navigator.userAgent.match(/Android (\d+)\./i);ca.dc=y&&y[1]?y[1]:h;vjs.fc=function(){return!!vjs.Ja.match("Firefox")};vjs.qb=function(a){var b={};if(a&&a.attributes&&0d?"0"+d:d)+":")+(10>c?"0"+c:c)};vjs.mc=function(){document.body.focus();document.onselectstart=q(k)};vjs.Oc=function(){document.onselectstart=q(g)};vjs.trim=function(a){return a.toString().replace(/^\s+/,"").replace(/\s+$/,"")};vjs.round=function(a,b){b||(b=0);return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};
+vjs.Jb=function(a){return{length:1,start:q(0),end:function(){return a}}};
+vjs.get=function(a,b,c){var d=0===a.indexOf("file:")||0===window.location.href.indexOf("file:")&&-1===a.indexOf("http");"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(c){}throw Error("This browser does not support XMLHttpRequest.");});var f=new XMLHttpRequest;try{f.open("GET",a)}catch(l){c(l)}f.onreadystatechange=
+function(){4===f.readyState&&(200===f.status||d&&0===f.status?b(f.responseText):c&&c())};try{f.send()}catch(j){c&&c(j)}};vjs.Jc=function(a){var b=window.localStorage||k;if(b)try{b.volume=a}catch(c){22==c.code||1014==c.code?vjs.log("LocalStorage Full (VideoJS)",c):vjs.log("LocalStorage Error (VideoJS)",c)}};vjs.Pb=function(a){a.match(/^https?:\/\//)||(a=vjs.d("div",{innerHTML:'x '}).firstChild.href);return a};
+vjs.log=function(){vjs.log.history=vjs.log.history||[];vjs.log.history.push(arguments);window.console&&window.console.log(Array.prototype.slice.call(arguments))};vjs.sc="getBoundingClientRect"in document.documentElement?function(a){var b;try{b=a.getBoundingClientRect()}catch(c){}if(!b)return 0;a=document.body;return b.left+(window.pageXOffset||a.scrollLeft)-(document.documentElement.clientLeft||a.clientLeft||0)}:function(a){for(var b=a.offsetLeft;a=a.offsetParent;)b+=a.offsetLeft;return b};vjs.e=function(a,b,c){var d=vjs.getData(a);d.q||(d.q={});d.q[b]||(d.q[b]=[]);c.p||(c.p=vjs.p++);d.q[b].push(c);d.N||(d.disabled=k,d.N=function(b){if(!d.disabled){b=vjs.Mb(b);var c=d.q[b.type];if(c){for(var j=[],p=0,m=c.length;pGoogle Chrome or download the latest Adobe Flash Player .'}))}else a instanceof
+Object?window.videojs[this.V].canPlaySource(a)?this.src(a.src):this.src([a]):(this.n.src=a,this.ia?(H(this,"src",a),"auto"==this.options.preload&&this.load(),this.options.autoplay&&this.play()):this.P(function(){this.src(a)}));return this};r.load=function(){H(this,"load");return this};r.currentSrc=function(){return G(this,"currentSrc")||this.n.src||""};r.Wa=function(a){return a!==e?(H(this,"setPreload",a),this.options.preload=a,this):G(this,"preload")};
+r.autoplay=function(a){return a!==e?(H(this,"setAutoplay",a),this.options.autoplay=a,this):G(this,"autoplay")};r.loop=function(a){return a!==e?(H(this,"setLoop",a),this.options.loop=a,this):G(this,"loop")};r.controls=function(){return this.options.controls};r.poster=function(){return G(this,"poster")};r.error=function(){return G(this,"error")};var K,L,M,N;
+if(document.Wc!==e)K="requestFullscreen",L="exitFullscreen",M="fullscreenchange",N="fullScreen";else for(var O=["moz","webkit"],P=O.length-1;0<=P;P--){var Q=O[P];if(("moz"!=Q||document.mozFullScreenEnabled)&&document[Q+"CancelFullScreen"]!==e)K=Q+"RequestFullScreen",L=Q+"CancelFullScreen",M=Q+"fullscreenchange",N="webkit"==Q?Q+"IsFullScreen":Q+"FullScreen"}K&&(vjs.Cb.Za={Fc:K,nc:L,ha:M,U:N});
+vjs.Db=function(a,b,c){vjs.c.call(this,a,b,c);if(!a.options.sources||0===a.options.sources.length){b=0;for(c=a.options.techOrder;bvjs.dc&&(document.createElement("video").constructor.prototype.canPlayType=function(a){return a&&-1!=a.toLowerCase().indexOf("video/mp4")?"maybe":""});vjs.g=function(a,b,c){vjs.J.call(this,a,b,c);c=b.source;var d=b.Dc,f=this.b=vjs.d("div",{id:a.id()+"_temp_flash"}),l=a.id()+"_flash_api";a=a.options;var j=vjs.s({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:a.autoplay,preload:a.Wa,loop:a.loop,muted:a.muted},b.flashVars),p=vjs.s({wmode:"opaque",bgcolor:"#000000"},b.params),m=vjs.s({id:l,name:l,"class":"vjs-tech"},b.attributes);c&&(j.src=encodeURIComponent(vjs.Pb(c.src)));
+vjs.rb(f,d);b.startTime&&this.P(function(){this.load();this.play();this.currentTime(b.startTime)});if(b.ed===g&&!vjs.fc){var s=vjs.d("iframe",{id:l+"_iframe",name:l+"_iframe",className:"vjs-tech",scrolling:"no",marginWidth:0,marginHeight:0,frameBorder:0});j.readyFunction="ready";j.eventProxyFunction="events";j.errorEventProxyFunction="errors";vjs.e(s,"load",vjs.bind(this,function(){var a,c=s.contentWindow;a=s.contentDocument?s.contentDocument:s.contentWindow.document;a.write(vjs.g.Qb(b.swf,j,p,m));
+c.a=this.a;c.P=vjs.bind(this.a,function(b){b=a.getElementById(b);var c=this.k;c.j=b;vjs.e(b,"click",c.bind(c.m));vjs.g.jb(c)});c.$c=vjs.bind(this.a,function(a,b){this&&"flash"===this.V&&this.i(b)});c.Zc=vjs.bind(this.a,function(a,b){vjs.log("Flash Error",b)})}));f.parentNode.replaceChild(s,f)}else vjs.g.rc(b.swf,f,j,p,m)};v(vjs.g,vjs.J);r=vjs.g.prototype;r.D=function(){vjs.g.f.D.call(this)};r.play=function(){this.b.vjs_play()};r.pause=function(){this.b.vjs_pause()};
+r.src=function(a){a=vjs.Pb(a);this.b.vjs_src(a);if(this.a.autoplay()){var b=this;setTimeout(function(){b.play()},0)}};r.load=function(){this.b.vjs_load()};r.poster=function(){this.b.vjs_getProperty("poster")};r.buffered=function(){return vjs.Jb(this.b.vjs_getProperty("buffered"))};r.ab=q(k);var R=vjs.g.prototype,S="preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),T="error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");
+function fa(){var a=S[i],b=a.charAt(0).toUpperCase()+a.slice(1);R["set"+b]=function(b){return this.b.vjs_setProperty(a,b)}}function U(a){R[a]=function(){return this.b.vjs_getProperty(a)}}for(i=0;i '});d=vjs.s({data:a,width:"100%",height:"100%"},d);vjs.Oa(d,function(a,b){j+=a+'="'+b+'" '});return'"+l+" "};vjs.Y=function(a,b){vjs.c.call(this,a,b)};v(vjs.Y,vjs.c);vjs.Y.prototype.v=function(){return"vjs-control "+vjs.Y.f.v.call(this)};vjs.Q=function(a,b){vjs.c.call(this,a,b);a.H("play",vjs.bind(this,function(){this.Pa();this.a.e("mouseover",vjs.bind(this,this.Pa));this.a.e("mouseout",vjs.bind(this,this.nb))}))};v(vjs.Q,vjs.c);r=vjs.Q.prototype;
+r.options={xc:"play",children:{playToggle:{},fullscreenToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},progressControl:{},volumeControl:{},muteToggle:{}}};r.d=function(){return vjs.d("div",{className:"vjs-control-bar"})};r.Pa=function(){vjs.Q.f.Pa.call(this);this.a.i("controlsvisible")};r.nb=function(){vjs.Q.f.nb.call(this);this.a.i("controlshidden")};r.Ub=function(){this.b.style.opacity="1"};
+vjs.l=function(a,b){vjs.Y.call(this,a,b);this.e("click",this.m);this.e("focus",this.Sa);this.e("blur",this.Ra)};v(vjs.l,vjs.Y);r=vjs.l.prototype;r.d=function(a,b){b=vjs.s({className:this.v(),innerHTML:''+(this.S||"Need Text")+"
",Gc:"button",tabIndex:0},b);return vjs.l.f.d.call(this,a,b)};r.m=function(){};r.Sa=function(){vjs.e(document,"keyup",vjs.bind(this,this.Ba))};r.Ba=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.m()};
+r.Ra=function(){vjs.o(document,"keyup",vjs.bind(this,this.Ba))};vjs.da=function(a,b){vjs.l.call(this,a,b)};v(vjs.da,vjs.l);vjs.da.prototype.S="Play";vjs.da.prototype.v=function(){return"vjs-play-button "+vjs.da.f.v.call(this)};vjs.da.prototype.m=function(){this.a.play()};vjs.ca=function(a,b){vjs.l.call(this,a,b)};v(vjs.ca,vjs.l);vjs.ca.prototype.S="Play";vjs.ca.prototype.v=function(){return"vjs-pause-button "+vjs.ca.f.v.call(this)};vjs.ca.prototype.m=function(){this.a.pause()};
+vjs.Fa=function(a,b){vjs.l.call(this,a,b);a.e("play",vjs.bind(this,this.Ab));a.e("pause",vjs.bind(this,this.zb))};v(vjs.Fa,vjs.l);r=vjs.Fa.prototype;r.S="Play";r.v=function(){return"vjs-play-control "+vjs.Fa.f.v.call(this)};r.m=function(){this.a.paused()?this.a.play():this.a.pause()};r.Ab=function(){vjs.z(this.b,"vjs-paused");vjs.u(this.b,"vjs-playing")};r.zb=function(){vjs.z(this.b,"vjs-playing");vjs.u(this.b,"vjs-paused")};vjs.$=function(a,b){vjs.l.call(this,a,b)};v(vjs.$,vjs.l);
+vjs.$.prototype.S="Fullscreen";vjs.$.prototype.v=function(){return"vjs-fullscreen-control "+vjs.$.f.v.call(this)};vjs.$.prototype.m=function(){this.a.U?I(this.a):this.a.Za()};vjs.X=function(a,b){vjs.l.call(this,a,b);a.e("play",vjs.bind(this,this.w));a.e("ended",vjs.bind(this,this.show))};v(vjs.X,vjs.l);vjs.X.prototype.d=function(){return vjs.X.f.d.call(this,"div",{className:"vjs-big-play-button",innerHTML:" "})};
+vjs.X.prototype.m=function(){this.a.currentTime()&&this.a.currentTime(0);this.a.play()};vjs.ra=function(a,b){vjs.c.call(this,a,b);a.e("canplay",vjs.bind(this,this.w));a.e("canplaythrough",vjs.bind(this,this.w));a.e("playing",vjs.bind(this,this.w));a.e("seeked",vjs.bind(this,this.w));a.e("seeking",vjs.bind(this,this.show));a.e("seeked",vjs.bind(this,this.w));a.e("error",vjs.bind(this,this.show));a.e("waiting",vjs.bind(this,this.show))};v(vjs.ra,vjs.c);
+vjs.ra.prototype.d=function(){var a,b;"string"==typeof this.a.j().style.WebkitBorderRadius||"string"==typeof this.a.j().style.MozBorderRadius||"string"==typeof this.a.j().style.Uc||"string"==typeof this.a.j().style.Vc?(a="vjs-loading-spinner",b='
'):(a="vjs-loading-spinner-fallback",b="");return vjs.ra.f.d.call(this,
+"div",{className:a,innerHTML:b})};vjs.oa=function(a,b){vjs.c.call(this,a,b);a.e("timeupdate",vjs.bind(this,this.Da))};v(vjs.oa,vjs.c);vjs.oa.prototype.d=function(){var a=vjs.oa.f.d.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.content=vjs.d("div",{className:"vjs-current-time-display",innerHTML:"0:00"});a.appendChild(vjs.d("div").appendChild(this.content));return a};
+vjs.oa.prototype.Da=function(){var a=this.a.Yb?this.a.n.currentTime:this.a.currentTime();this.content.innerHTML=vjs.pb(a,this.a.duration())};vjs.pa=function(a,b){vjs.c.call(this,a,b);a.e("timeupdate",vjs.bind(this,this.Da))};v(vjs.pa,vjs.c);vjs.pa.prototype.d=function(){var a=vjs.pa.f.d.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.content=vjs.d("div",{className:"vjs-duration-display",innerHTML:"0:00"});a.appendChild(vjs.d("div").appendChild(this.content));return a};
+vjs.pa.prototype.Da=function(){this.a.duration()&&(this.content.innerHTML=vjs.pb(this.a.duration()))};vjs.Ia=function(a,b){vjs.c.call(this,a,b)};v(vjs.Ia,vjs.c);vjs.Ia.prototype.d=function(){return vjs.Ia.f.d.call(this,"div",{className:"vjs-time-divider",innerHTML:"/
"})};vjs.va=function(a,b){vjs.c.call(this,a,b);a.e("timeupdate",vjs.bind(this,this.Da))};v(vjs.va,vjs.c);
+vjs.va.prototype.d=function(){var a=vjs.va.f.d.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.content=vjs.d("div",{className:"vjs-remaining-time-display",innerHTML:"-0:00"});a.appendChild(vjs.d("div").appendChild(this.content));return a};vjs.va.prototype.Da=function(){this.a.duration()&&(this.content.innerHTML="-"+vjs.pb(this.a.duration()-this.a.currentTime()))};
+vjs.K=function(a,b){vjs.c.call(this,a,b);this.lc=this.M[this.options.barName];this.handle=this.M[this.options.handleName];a.e(this.Vb,vjs.bind(this,this.update));this.e("mousedown",this.yb);this.e("focus",this.Sa);this.e("blur",this.Ra);this.a.e("controlsvisible",vjs.bind(this,this.update));a.P(vjs.bind(this,this.update))};v(vjs.K,vjs.c);r=vjs.K.prototype;r.d=function(a,b){b=vjs.s({Gc:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},b);return vjs.K.f.d.call(this,a,b)};
+r.yb=function(a){a.preventDefault();vjs.mc();vjs.e(document,"mousemove",vjs.bind(this,this.Ta));vjs.e(document,"mouseup",vjs.bind(this,this.Ua));this.Ta(a)};r.Ua=function(){vjs.Oc();vjs.o(document,"mousemove",this.Ta,k);vjs.o(document,"mouseup",this.Ua,k);this.update()};
+r.update=function(){var a,b=this.Rb(),c=this.handle,d=this.lc;isNaN(b)&&(b=0);a=b;if(c){a=this.b.offsetWidth;var f=c.j().offsetWidth;a=f?f/a:0;b*=1-a;a=b+a/2;c.j().style.left=vjs.round(100*b,2)+"%"}d.j().style.width=vjs.round(100*a,2)+"%"};function V(a,b){var c=a.b,d=vjs.sc(c),c=c.offsetWidth,f=a.handle;f&&(f=f.j().offsetWidth,d+=f/2,c-=f);return Math.max(0,Math.min(1,(b.pageX-d)/c))}r.Sa=function(){vjs.e(document,"keyup",vjs.bind(this,this.Ba))};
+r.Ba=function(a){37==a.which?(a.preventDefault(),this.$b()):39==a.which&&(a.preventDefault(),this.ac())};r.Ra=function(){vjs.o(document,"keyup",vjs.bind(this,this.Ba))};vjs.ua=function(a,b){vjs.c.call(this,a,b)};v(vjs.ua,vjs.c);vjs.ua.prototype.options={children:{seekBar:{}}};vjs.ua.prototype.d=function(){return vjs.ua.f.d.call(this,"div",{className:"vjs-progress-control vjs-control"})};vjs.fa=function(a,b){vjs.K.call(this,a,b)};v(vjs.fa,vjs.K);r=vjs.fa.prototype;
+r.options={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};r.Vb="timeupdate";r.d=function(){return vjs.fa.f.d.call(this,"div",{className:"vjs-progress-holder"})};r.Rb=function(){return this.a.currentTime()/this.a.duration()};r.yb=function(a){vjs.fa.f.yb.call(this,a);this.a.Yb=g;this.Pc=!this.a.paused();this.a.pause()};r.Ta=function(a){a=V(this,a)*this.a.duration();a==this.a.duration()&&(a-=0.1);this.a.currentTime(a)};
+r.Ua=function(a){vjs.fa.f.Ua.call(this,a);this.a.Yb=k;this.Pc&&this.a.play()};r.ac=function(){this.a.currentTime(this.a.currentTime()+1)};r.$b=function(){this.a.currentTime(this.a.currentTime()-1)};vjs.qa=function(a,b){vjs.c.call(this,a,b);a.e("progress",vjs.bind(this,this.update))};v(vjs.qa,vjs.c);vjs.qa.prototype.d=function(){return vjs.qa.f.d.call(this,"div",{className:"vjs-load-progress",innerHTML:'Loaded: 0% '})};
+vjs.qa.prototype.update=function(){this.b.style&&(this.b.style.width=vjs.round(100*E(this.a),2)+"%")};vjs.Ea=function(a,b){vjs.c.call(this,a,b)};v(vjs.Ea,vjs.c);vjs.Ea.prototype.d=function(){return vjs.Ea.f.d.call(this,"div",{className:"vjs-play-progress",innerHTML:'Progress: 0% '})};vjs.Ga=function(a,b){vjs.c.call(this,a,b)};v(vjs.Ga,vjs.c);vjs.Ga.prototype.d=function(){return vjs.Ga.f.d.call(this,"div",{className:"vjs-seek-handle",innerHTML:'00:00 '})};
+vjs.xa=function(a,b){vjs.c.call(this,a,b)};v(vjs.xa,vjs.c);vjs.xa.prototype.options={children:{volumeBar:{}}};vjs.xa.prototype.d=function(){return vjs.xa.f.d.call(this,"div",{className:"vjs-volume-control vjs-control"})};vjs.Ka=function(a,b){vjs.K.call(this,a,b)};v(vjs.Ka,vjs.K);r=vjs.Ka.prototype;r.options={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};r.Vb="volumechange";r.d=function(){return vjs.Ka.f.d.call(this,"div",{className:"vjs-volume-bar"})};
+r.Ta=function(a){this.a.volume(V(this,a))};r.Rb=function(){return this.a.volume()};r.ac=function(){this.a.volume(this.a.volume()+0.1)};r.$b=function(){this.a.volume(this.a.volume()-0.1)};vjs.Ma=function(a,b){vjs.c.call(this,a,b)};v(vjs.Ma,vjs.c);vjs.Ma.prototype.d=function(){return vjs.Ma.f.d.call(this,"div",{className:"vjs-volume-level",innerHTML:' '})};vjs.La=function(a,b){vjs.c.call(this,a,b)};v(vjs.La,vjs.c);
+vjs.La.prototype.d=function(){return vjs.La.f.d.call(this,"div",{className:"vjs-volume-handle",innerHTML:' '})};vjs.ba=function(a,b){vjs.l.call(this,a,b);a.e("volumechange",vjs.bind(this,this.update))};v(vjs.ba,vjs.l);vjs.ba.prototype.d=function(){return vjs.ba.f.d.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'Mute
'})};vjs.ba.prototype.m=function(){this.a.muted(this.a.muted()?k:g)};
+vjs.ba.prototype.update=function(){var a=this.a.volume(),b=3;0===a||this.a.muted()?b=0:0.33>a?b=1:0.67>a&&(b=2);for(a=0;4>a;a++)vjs.z(this.b,"vjs-vol-"+a);vjs.u(this.b,"vjs-vol-"+b)};vjs.ta=function(a,b){vjs.l.call(this,a,b);this.a.options.poster||this.w();a.e("play",vjs.bind(this,this.w))};v(vjs.ta,vjs.l);vjs.ta.prototype.d=function(){var a=vjs.d("img",{className:"vjs-poster",tabIndex:-1});this.a.options.poster&&(a.src=this.a.options.poster);return a};vjs.ta.prototype.m=function(){this.a.play()};
+vjs.aa=function(a,b){vjs.c.call(this,a,b)};v(vjs.aa,vjs.c);function W(a,b){a.R(b);b.e("click",vjs.bind(a,function(){A(this)}))}vjs.aa.prototype.d=function(){return vjs.aa.f.d.call(this,"ul",{className:"vjs-menu"})};vjs.B=function(a,b){vjs.l.call(this,a,b);b.selected&&this.u("vjs-selected")};v(vjs.B,vjs.l);vjs.B.prototype.d=function(a,b){return vjs.B.f.d.call(this,"li",vjs.s({className:"vjs-menu-item",innerHTML:this.options.label},b))};vjs.B.prototype.m=function(){this.selected(g)};
+vjs.B.prototype.selected=function(a){a?this.u("vjs-selected"):this.z("vjs-selected")};function X(a){a.Ca=a.Ca||[];return a.Ca}function Y(a,b,c){for(var d=a.Ca,f=0,l=d.length,j,p;f ");this.ga.push(b)}this.la=2;this.i("loaded")};
+function ga(a){var b=a.split(":");a=0;var c,d,f;3==b.length?(c=b[0],d=b[1],b=b[2]):(c=0,d=b[0],b=b[1]);b=b.split(/\s+/);b=b.splice(0,1)[0];b=b.split(/\.|,/);f=parseFloat(b[1]);b=b[0];a+=3600*parseFloat(c);a+=60*parseFloat(d);a+=parseFloat(b);f&&(a+=f/1E3);return a}
+r.update=function(){if(0=this.Qa||this.Qa===e?s=this.ob!==e?this.ob:0:(f=g,s=this.ub!==e?this.ub:b.length-1);for(;;){m=b[s];if(m.za<=a)d=Math.max(d,m.za),m.Na&&(m.Na=k);else if(a'+a[c].text+"";this.b.innerHTML=b;this.i("cuechange")}}};r.reset=function(){this.Qa=0;this.Bb=this.a.duration();this.ub=this.ob=0};vjs.cb=function(a,b){vjs.t.call(this,a,b)};v(vjs.cb,vjs.t);vjs.cb.prototype.r="captions";vjs.gb=function(a,b){vjs.t.call(this,a,b)};v(vjs.gb,vjs.t);vjs.gb.prototype.r="subtitles";
+vjs.fb=function(a,b){vjs.t.call(this,a,b)};v(vjs.fb,vjs.t);vjs.fb.prototype.r="chapters";vjs.Ha=function(a,b,c){vjs.c.call(this,a,b,c);if(a.options.tracks&&0d.readyState()){this.Xc=d;d.e("loaded",vjs.bind(this,this.lb));return}f=d;break}a=this.ja=new vjs.aa(this.a);a.b.appendChild(vjs.d("li",{className:"vjs-menu-title",innerHTML:vjs.T(this.r)}));if(f){d=f.ga;for(var j,b=0,c=d.length;b d ? "0" + d : d) + ":") + (10 > c ? "0" + c : c)
-};
-vjs.qc = function() {
- document.body.focus();
- document.onselectstart = q(j)
-};
-vjs.Sc = function() {
- document.onselectstart = q(g)
-};
-vjs.trim = function(a) {
- return a.toString().replace(/^\s+/, "").replace(/\s+$/, "")
-};
-vjs.round = function(a, b) {
- b || (b = 0);
- return Math.round(a * Math.pow(10, b)) / Math.pow(10, b)
-};
-vjs.sb = function(a) {
- return{length:1, start:q(0), end:function() {
- return a
- }}
-};
-vjs.get = function(a, b, c) {
- var d = 0 === a.indexOf("file:") || 0 === window.location.href.indexOf("file:") && -1 === a.indexOf("http");
- "undefined" === typeof XMLHttpRequest && (window.XMLHttpRequest = function() {
- try {
- return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")
- }catch(a) {
- }
- try {
- return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")
- }catch(b) {
- }
- try {
- return new window.ActiveXObject("Msxml2.XMLHTTP")
- }catch(c) {
- }
- throw Error("This browser does not support XMLHttpRequest.");
- });
- var f = new XMLHttpRequest;
- try {
- f.open("GET", a)
- }catch(m) {
- c(m)
- }
- f.onreadystatechange = function() {
- 4 === f.readyState && (200 === f.status || d && 0 === f.status ? b(f.responseText) : c && c())
- };
- try {
- f.send()
- }catch(k) {
- c && c(k)
- }
-};
-vjs.Nc = function(a) {
- var b = window.localStorage || j;
- if(b) {
- try {
- b.volume = a
- }catch(c) {
- 22 == c.code || 1014 == c.code ? vjs.log("LocalStorage Full (VideoJS)", c) : vjs.log("LocalStorage Error (VideoJS)", c)
- }
- }
-};
-vjs.Xa = function(a) {
- a.match(/^https?:\/\//) || (a = vjs.e("div", {innerHTML:'x '}).firstChild.href);
- return a
-};
-vjs.log = function() {
- vjs.log.history = vjs.log.history || [];
- vjs.log.history.push(arguments);
- window.console && window.console.log(Array.prototype.slice.call(arguments))
-};
-vjs.wc = "getBoundingClientRect" in document.documentElement ? function(a) {
- var b;
- try {
- b = a.getBoundingClientRect()
- }catch(c) {
- }
- if(!b) {
- return 0
- }
- a = document.body;
- return b.left + (window.pageXOffset || a.scrollLeft) - (document.documentElement.clientLeft || a.clientLeft || 0)
-} : function(a) {
- for(var b = a.offsetLeft;a = a.offsetParent;) {
- b += a.offsetLeft
- }
- return b
-};
-vjs.f = function(a, b, c) {
- var d = vjs.getData(a);
- d.u || (d.u = {});
- d.u[b] || (d.u[b] = []);
- c.t || (c.t = vjs.t++);
- d.u[b].push(c);
- d.T || (d.disabled = j, d.T = function(b) {
- if(!d.disabled) {
- b = vjs.Qb(b);
- var c = d.u[b.type];
- if(c) {
- for(var k = [], p = 0, n = c.length;p < n;p++) {
- k[p] = c[p]
- }
- c = 0;
- for(p = k.length;c < p;c++) {
- k[c].call(a, b)
- }
- }
- }
- });
- 1 == d.u[b].length && (document.addEventListener ? a.addEventListener(b, d.T, j) : document.attachEvent && a.attachEvent("on" + b, d.T))
-};
-vjs.n = function(a, b, c) {
- if(vjs.Vb(a)) {
- var d = vjs.getData(a);
- if(d.u) {
- if(b) {
- var f = d.u[b];
- if(f) {
- if(c) {
- if(c.t) {
- for(d = 0;d < f.length;d++) {
- f[d].t === c.t && f.splice(d--, 1)
- }
- }
- }else {
- d.u[b] = []
- }
- vjs.Mb(a, b)
- }
- }else {
- for(f in d.u) {
- b = f, d.u[b] = [], vjs.Mb(a, b)
- }
- }
- }
- }
-};
-vjs.Mb = function(a, b) {
- var c = vjs.getData(a);
- 0 === c.u[b].length && (delete c.u[b], document.removeEventListener ? a.removeEventListener(b, c.T, j) : document.detachEvent && a.detachEvent("on" + b, c.T));
- vjs.Ya(c.u) && (delete c.u, delete c.T, delete c.disabled);
- vjs.Ya(c) && vjs.Gb(a)
-};
-vjs.Qb = function(a) {
- function b() {
- return g
- }
- function c() {
- return j
- }
- if(!a || !a.xb) {
- var d = a || window.event, f;
- for(f in d) {
- a[f] = d[f]
- }
- a.target || (a.target = a.srcElement || document);
- a.relatedTarget = a.fromElement === a.target ? a.toElement : a.fromElement;
- a.preventDefault = function() {
- a.returnValue = j;
- a.Wb = b
- };
- a.Wb = c;
- a.stopPropagation = function() {
- a.cancelBubble = g;
- a.xb = b
- };
- a.xb = c;
- a.stopImmediatePropagation = function() {
- a.zc = b;
- a.stopPropagation()
- };
- a.zc = c;
- a.clientX != h && (d = document.documentElement, f = document.body, a.pageX = a.clientX + (d && d.scrollLeft || f && f.scrollLeft || 0) - (d && d.clientLeft || f && f.clientLeft || 0), a.pageY = a.clientY + (d && d.scrollTop || f && f.scrollTop || 0) - (d && d.clientTop || f && f.clientTop || 0));
- a.which = a.charCode || a.keyCode;
- a.button != h && (a.button = a.button & 1 ? 0 : a.button & 4 ? 1 : a.button & 2 ? 2 : 0)
- }
- return a
-};
-vjs.h = function(a, b) {
- var c = vjs.Vb(a) ? vjs.getData(a) : {}, d = a.parentNode || a.ownerDocument;
- "string" === typeof b && (b = {type:b, target:a});
- b = vjs.Qb(b);
- c.T && c.T.call(a, b);
- if(d && !b.xb()) {
- vjs.h(d, b)
- }else {
- if(!d && !b.Wb() && (c = vjs.getData(b.target), b.target[b.type])) {
- c.disabled = g;
- if("function" === typeof b.target[b.type]) {
- b.target[b.type]()
- }
- c.disabled = j
- }
- }
-};
-vjs.G = function(a, b, c) {
- vjs.f(a, b, function() {
- vjs.n(a, b, arguments.callee);
- c.apply(this, arguments)
- })
-};
-vjs.d = function(a, b, c) {
- this.a = a;
- b = this.options = vjs.w(this.options || {}, b);
- this.U = b.id || (b.g && b.g.id ? b.g.id : a.id + "_component_" + vjs.t++);
- this.Dc = b.name || h;
- this.b = b.g ? b.g : this.e();
- this.I = [];
- this.Va = {};
- this.L = {};
- if((a = this.options) && a.children) {
- var d = this;
- vjs.Da(a.children, function(a, b) {
- b !== j && !b.Bc && (d[a] = d.K(a, b))
- })
- }
- this.N(c)
-};
-r = vjs.d.prototype;
-r.p = function() {
- if(this.I) {
- for(var a = this.I.length - 1;0 <= a;a--) {
- this.I[a].p()
- }
- }
- this.L = this.Va = this.I = h;
- this.n();
- this.b.parentNode && this.b.parentNode.removeChild(this.b);
- vjs.Gb(this.b);
- this.b = h
-};
-r.e = function(a, b) {
- return vjs.e(a, b)
-};
-r.g = l("b");
-r.id = l("U");
-r.name = l("Dc");
-r.children = l("I");
-r.K = function(a, b) {
- var c, d, f;
- "string" === typeof a ? (d = a, b = b || {}, c = b.cd || vjs.S(d), b.name = d, c = new window.videojs[c](this.a || this, b)) : c = a;
- d = c.name();
- f = c.id();
- this.I.push(c);
- f && (this.Va[f] = c);
- d && (this.L[d] = c);
- this.b.appendChild(c.g());
- return c
-};
-r.removeChild = function(a) {
- "string" === typeof a && (a = this.L[a]);
- if(a && this.I) {
- for(var b = j, c = this.I.length - 1;0 <= c;c--) {
- if(this.I[c] === a) {
- b = g;
- this.I.splice(c, 1);
- break
- }
- }
- b && (this.Va[a.id] = h, this.L[a.name] = h, (b = a.g()) && b.parentNode === this.b && this.b.removeChild(a.g()))
- }
-};
-r.C = q("");
-r.f = function(a, b) {
- vjs.f(this.b, a, vjs.bind(this, b));
- return this
-};
-r.n = function(a, b) {
- vjs.n(this.b, a, b);
- return this
-};
-r.G = function(a, b) {
- vjs.G(this.b, a, vjs.bind(this, b));
- return this
-};
-r.h = function(a, b) {
- vjs.h(this.b, a, b);
- return this
-};
-r.N = function(a) {
- a && (this.na ? a.call(this) : (this.fb === e && (this.fb = []), this.fb.push(a)));
- return this
-};
-function A(a) {
- a.na = g;
- var b = a.fb;
- if(b && 0 < b.length) {
- for(var c = 0, d = b.length;c < d;c++) {
- b[c].call(a)
- }
- a.fb = [];
- a.h("ready")
- }
-}
-r.q = function(a) {
- vjs.q(this.b, a);
- return this
-};
-r.B = function(a) {
- vjs.B(this.b, a);
- return this
-};
-r.show = function() {
- this.b.style.display = "block";
- return this
-};
-r.A = function() {
- this.b.style.display = "none";
- return this
-};
-r.Wa = function() {
- this.B("vjs-fade-out");
- this.q("vjs-fade-in");
- return this
-};
-r.ub = function() {
- this.B("vjs-fade-in");
- this.q("vjs-fade-out");
- return this
-};
-r.Xb = function() {
- var a = this.b.style;
- a.display = "block";
- a.opacity = 1;
- a.Uc = "visible";
- return this
-};
-function B(a) {
- a = a.b.style;
- a.display = "";
- a.opacity = "";
- a.Uc = ""
-}
-r.width = function(a, b) {
- return C(this, "width", a, b)
-};
-r.height = function(a, b) {
- return C(this, "height", a, b)
-};
-r.tc = function(a, b) {
- return this.width(a, g).height(b)
-};
-function C(a, b, c, d) {
- if(c !== e) {
- return a.b.style[b] = -1 !== ("" + c).indexOf("%") || -1 !== ("" + c).indexOf("px") ? c : c + "px", d || a.h("resize"), a
- }
- if(!a.b) {
- return 0
- }
- c = a.b.style[b];
- d = c.indexOf("px");
- return-1 !== d ? parseInt(c.slice(0, d), 10) : parseInt(a.b["offset" + vjs.S(b)], 10)
-}
-;vjs.D = function(a, b, c) {
- this.O = a;
- var d = {};
- vjs.w(d, vjs.options);
- vjs.w(d, ca(a));
- vjs.w(d, b);
- this.r = {};
- vjs.d.call(this, this, d, c);
- this.f("ended", this.Fc);
- this.f("play", this.Eb);
- this.f("pause", this.Db);
- this.f("progress", this.Gc);
- this.f("durationchange", this.Ec);
- this.f("error", this.Bb);
- vjs.$[this.U] = this
-};
-v(vjs.D, vjs.d);
-r = vjs.D.prototype;
-r.p = function() {
- vjs.$[this.U] = h;
- this.O && this.O.a && (this.O.a = h);
- this.b && this.b.a && (this.b.a = h);
- clearInterval(this.eb);
- this.l && this.l.p();
- vjs.D.i.p.call(this)
-};
-function ca(a) {
- var b = {sources:[], tracks:[]};
- vjs.w(b, vjs.Y(a));
- if(a.hasChildNodes()) {
- for(var c, d = a.childNodes, f = 0, m = d.length;f < m;f++) {
- a = d[f], c = a.nodeName.toLowerCase(), "source" === c ? b.sources.push(vjs.Y(a)) : "track" === c && b.tracks.push(vjs.Y(a))
- }
- }
- return b
-}
-r.e = function() {
- var a = this.b = vjs.D.i.e.call(this, "div"), b = this.O;
- b.removeAttribute("controls");
- b.removeAttribute("poster");
- b.removeAttribute("width");
- b.removeAttribute("height");
- if(b.hasChildNodes()) {
- for(var c = b.childNodes.length, d = 0, f = b.childNodes;d < c;d++) {
- ("source" == f[0].nodeName.toLowerCase() || "track" == f[0].nodeName.toLowerCase()) && b.removeChild(f[0])
- }
- }
- b.id = b.id || "vjs_video_" + vjs.t++;
- a.id = b.id;
- a.className = b.className;
- b.id += "_html5_api";
- b.className = "vjs-tech";
- b.a = a.a = this;
- this.q("vjs-paused");
- this.width(this.options.width, g);
- this.height(this.options.height, g);
- b.parentNode && b.parentNode.insertBefore(a, b);
- vjs.Fa(b, a);
- return a
-};
-function D(a, b, c) {
- a.l ? E(a) : "Html5" !== b && a.O && (a.b.removeChild(a.O), a.O = h);
- a.aa = b;
- a.na = j;
- var d = vjs.w({source:c, Hc:a.b}, a.options[b.toLowerCase()]);
- c && (c.src == a.r.src && 0 < a.r.currentTime && (d.startTime = a.r.currentTime), a.r.src = c.src);
- a.l = new window.videojs[b](a, d);
- a.l.N(function() {
- A(this.a);
- if(!this.M.Zb) {
- var a = this.a;
- a.zb = g;
- a.eb = setInterval(vjs.bind(a, function() {
- this.r.ob < this.buffered().end(0) ? this.h("progress") : 1 == F(this) && (clearInterval(this.eb), this.h("progress"))
- }), 500);
- a.l.G("progress", function() {
- this.M.Zb = g;
- var a = this.a;
- a.zb = j;
- clearInterval(a.eb)
- })
- }
- this.M.dc || (a = this.a, a.Ab = g, a.f("play", a.ec), a.f("pause", a.hb), a.l.G("timeupdate", function() {
- this.M.dc = g;
- G(this.a)
- }))
- })
-}
-function E(a) {
- a.l.p();
- a.zb && (a.zb = j, clearInterval(a.eb));
- a.Ab && G(a);
- a.l = j
-}
-function G(a) {
- a.Ab = j;
- a.hb();
- a.n("play", a.ec);
- a.n("pause", a.hb)
-}
-r.ec = function() {
- this.Ob && this.hb();
- this.Ob = setInterval(vjs.bind(this, function() {
- this.h("timeupdate")
- }), 250)
-};
-r.hb = function() {
- clearInterval(this.Ob)
-};
-r.Fc = function() {
- this.options.loop && (this.currentTime(0), this.play())
-};
-r.Eb = function() {
- vjs.B(this.b, "vjs-paused");
- vjs.q(this.b, "vjs-playing")
-};
-r.Db = function() {
- vjs.B(this.b, "vjs-playing");
- vjs.q(this.b, "vjs-paused")
-};
-r.Gc = function() {
- 1 == F(this) && this.h("loadedalldata")
-};
-r.Ec = function() {
- this.duration(H(this, "duration"))
-};
-r.Bb = function(a) {
- vjs.log("Video Error", a)
-};
-function I(a, b, c) {
- if(a.l.na) {
- try {
- a.l[b](c)
- }catch(d) {
- vjs.log(d)
- }
- }else {
- a.l.N(function() {
- this[b](c)
- })
- }
-}
-function H(a, b) {
- if(a.l.na) {
- try {
- return a.l[b]()
- }catch(c) {
- if(a.l[b] === e) {
- vjs.log("Video.js: " + b + " method not defined for " + a.aa + " playback technology.", c)
- }else {
- if("TypeError" == c.name) {
- throw vjs.log("Video.js: " + b + " unavailable on " + a.aa + " playback technology element.", c), a.l.na = j, c;
- }
- vjs.log(c)
- }
- }
- }
-}
-r.play = function() {
- I(this, "play");
- return this
-};
-r.pause = function() {
- I(this, "pause");
- return this
-};
-r.paused = function() {
- return H(this, "paused") === j ? j : g
-};
-r.currentTime = function(a) {
- return a !== e ? (this.r.ld = a, I(this, "setCurrentTime", a), this.Ab && this.h("timeupdate"), this) : this.r.currentTime = H(this, "currentTime") || 0
-};
-r.duration = function(a) {
- return a !== e ? (this.r.duration = parseFloat(a), this) : this.r.duration
-};
-r.buffered = function() {
- var a = H(this, "buffered"), b = this.r.ob = this.r.ob || 0;
- a && (0 < a.length && a.end(0) !== b) && (b = a.end(0), this.r.ob = b);
- return vjs.sb(b)
-};
-function F(a) {
- return a.duration() ? a.buffered().end(0) / a.duration() : 0
-}
-r.volume = function(a) {
- if(a !== e) {
- return a = Math.max(0, Math.min(1, parseFloat(a))), this.r.volume = a, I(this, "setVolume", a), vjs.Nc(a), this
- }
- a = parseFloat(H(this, "volume"));
- return isNaN(a) ? 1 : a
-};
-r.muted = function(a) {
- return a !== e ? (I(this, "setMuted", a), this) : H(this, "muted") || j
-};
-r.ib = function() {
- return H(this, "supportsFullScreen") || j
-};
-r.gb = function() {
- var a = vjs.Hb.gb;
- this.Z = g;
- a ? (vjs.f(document, a.ma, vjs.bind(this, function() {
- this.Z = document[a.Z];
- this.Z === j && vjs.n(document, a.ma, arguments.callee);
- this.h("fullscreenchange")
- })), this.l.M.Sb === j && this.options.flash.iFrameMode !== g && (this.pause(), E(this), vjs.f(document, a.ma, vjs.bind(this, function() {
- vjs.n(document, a.ma, arguments.callee);
- D(this, this.aa, {src:this.r.src})
- }))), this.b[a.Jc]()) : this.l.ib() ? (this.h("fullscreenchange"), I(this, "enterFullScreen")) : (this.h("fullscreenchange"), this.yc = g, this.uc = document.documentElement.style.overflow, vjs.f(document, "keydown", vjs.bind(this, this.Rb)), document.documentElement.style.overflow = "hidden", vjs.q(document.body, "vjs-full-window"), vjs.q(this.b, "vjs-fullscreen"), this.h("enterFullWindow"));
- return this
-};
-function J(a) {
- var b = vjs.Hb.gb;
- a.Z = j;
- b ? (a.l.M.Sb === j && a.options.flash.iFrameMode !== g && (a.pause(), E(a), vjs.f(document, b.ma, vjs.bind(a, function() {
- vjs.n(document, b.ma, arguments.callee);
- D(this, this.aa, {src:this.r.src})
- }))), document[b.rc]()) : (a.l.ib() ? I(a, "exitFullScreen") : K(a), a.h("fullscreenchange"))
-}
-r.Rb = function(a) {
- 27 === a.keyCode && (this.Z === g ? J(this) : K(this))
-};
-function K(a) {
- a.yc = j;
- vjs.n(document, "keydown", a.Rb);
- document.documentElement.style.overflow = a.uc;
- vjs.B(document.body, "vjs-full-window");
- vjs.B(a.b, "vjs-fullscreen");
- a.h("exitFullWindow")
-}
-r.src = function(a) {
- if(a instanceof Array) {
- var b;
- a: {
- b = a;
- for(var c = 0, d = this.options.techOrder;c < d.length;c++) {
- var f = vjs.S(d[c]), m = window.videojs[f];
- if(m.isSupported()) {
- for(var k = 0, p = b;k < p.length;k++) {
- var n = p[k];
- if(m.canPlaySource(n)) {
- b = {source:n, l:f};
- break a
- }
- }
- }
- }
- b = j
- }
- b ? (a = b.source, b = b.l, b == this.aa ? this.src(a) : D(this, b, a)) : vjs.log("No compatible source and media technology were found.")
- }else {
- a instanceof Object ? window.videojs[this.aa].canPlaySource(a) ? this.src(a.src) : this.src([a]) : (this.r.src = a, this.na ? (I(this, "src", a), "auto" == this.options.preload && this.load(), this.options.autoplay && this.play()) : this.N(function() {
- this.src(a)
- }))
- }
- return this
-};
-r.load = function() {
- I(this, "load");
- return this
-};
-r.currentSrc = function() {
- return H(this, "currentSrc") || this.r.src || ""
-};
-r.Ia = function(a) {
- return a !== e ? (I(this, "setPreload", a), this.options.preload = a, this) : H(this, "preload")
-};
-r.autoplay = function(a) {
- return a !== e ? (I(this, "setAutoplay", a), this.options.autoplay = a, this) : H(this, "autoplay")
-};
-r.loop = function(a) {
- return a !== e ? (I(this, "setLoop", a), this.options.loop = a, this) : H(this, "loop")
-};
-r.controls = function() {
- return this.options.controls
-};
-r.poster = function() {
- return H(this, "poster")
-};
-r.error = function() {
- return H(this, "error")
-};
-var L, M, N, O;
-if(document.ad !== e) {
- L = "requestFullscreen", M = "exitFullscreen", N = "fullscreenchange", O = "fullScreen"
-}else {
- for(var P = ["moz", "webkit"], Q = P.length - 1;0 <= Q;Q--) {
- var R = P[Q];
- if(("moz" != R || document.mozFullScreenEnabled) && document[R + "CancelFullScreen"] !== e) {
- L = R + "RequestFullScreen", M = R + "CancelFullScreen", N = R + "fullscreenchange", O = "webkit" == R ? R + "IsFullScreen" : R + "FullScreen"
- }
- }
-}
-L && (vjs.Hb.gb = {Jc:L, rc:M, ma:N, Z:O});
-vjs.Ib = function(a, b, c) {
- vjs.d.call(this, a, b, c);
- if(!a.options.sources || 0 === a.options.sources.length) {
- b = 0;
- for(c = a.options.techOrder;b < c.length;b++) {
- var d = vjs.S(c[b]), f = window.videojs[d];
- if(f && f.isSupported()) {
- D(a, d);
- break
- }
- }
- }else {
- a.src(a.options.sources)
- }
-};
-v(vjs.Ib, vjs.d);
-vjs.P = function(a, b, c) {
- vjs.d.call(this, a, b, c)
-};
-v(vjs.P, vjs.d);
-vjs.P.prototype.o = function() {
- this.a.options.controls && (this.a.paused() ? this.a.play() : this.a.pause())
-};
-vjs.media = {};
-vjs.media.jb = "play pause paused currentTime setCurrentTime duration buffered volume setVolume muted setMuted width height supportsFullScreen enterFullScreen src load currentSrc preload setPreload autoplay setAutoplay loop setLoop error networkState readyState seeking initialTime startOffsetTime played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks defaultPlaybackRate playbackRate mediaGroup controller controls defaultMuted".split(" ");
-function da() {
- var a = vjs.media.jb[i];
- return function() {
- throw Error('The "' + a + "\" method is not available on the playback technology's API");
- }
-}
-for(var i = vjs.media.jb.length - 1;0 <= i;i--) {
- vjs.P.prototype[vjs.media.jb[i]] = da()
-}
-;vjs.k = function(a, b, c) {
- vjs.P.call(this, a, b, c);
- (b = b.source) && this.b.currentSrc == b.src ? a.h("loadstart") : b && (this.b.src = b.src);
- a.N(function() {
- this.options.autoplay && this.paused() && (this.O.poster = h, this.play())
- });
- this.f("click", this.o);
- for(a = vjs.k.ea.length - 1;0 <= a;a--) {
- vjs.f(this.b, vjs.k.ea[a], vjs.bind(this.a, this.Pb))
- }
- A(this)
-};
-v(vjs.k, vjs.P);
-r = vjs.k.prototype;
-r.p = function() {
- for(var a = vjs.k.ea.length - 1;0 <= a;a--) {
- vjs.n(this.b, vjs.k.ea[a], vjs.bind(this.a, this.Pb))
- }
- vjs.k.i.p.call(this)
-};
-r.e = function() {
- var a = this.a, b = a.O;
- if(!b || this.M.Cc === j) {
- b && a.g().removeChild(b), b = vjs.createElement("video", {id:b.id || a.id + "_html5_api", className:b.className || "vjs-tech"}), vjs.Fa(b, a.g)
- }
- for(var c = ["autoplay", "preload", "loop", "muted"], d = c.length - 1;0 <= d;d--) {
- var f = c[d];
- a.options[f] !== h && (b[f] = a.options[f])
- }
- return b
-};
-r.Pb = function(a) {
- this.h(a);
- a.stopPropagation()
-};
-r.play = function() {
- this.b.play()
-};
-r.pause = function() {
- this.b.pause()
-};
-r.paused = function() {
- return this.b.paused
-};
-r.currentTime = function() {
- return this.b.currentTime
-};
-r.Mc = function(a) {
- try {
- this.b.currentTime = a
- }catch(b) {
- vjs.log(b, "Video is not ready. (Video.js)")
- }
-};
-r.duration = function() {
- return this.b.duration || 0
-};
-r.buffered = function() {
- return this.b.buffered
-};
-r.volume = function() {
- return this.b.volume
-};
-r.Rc = function(a) {
- this.b.volume = a
-};
-r.muted = function() {
- return this.b.muted
-};
-r.Pc = function(a) {
- this.b.muted = a
-};
-r.width = function() {
- return this.b.offsetWidth
-};
-r.height = function() {
- return this.b.offsetHeight
-};
-r.ib = function() {
- return"function" == typeof this.b.webkitEnterFullScreen && !navigator.userAgent.match("Chrome") && !navigator.userAgent.match("Mac OS X 10.5") ? g : j
-};
-r.src = function(a) {
- this.b.src = a
-};
-r.load = function() {
- this.b.load()
-};
-r.currentSrc = function() {
- return this.b.currentSrc
-};
-r.Ia = function() {
- return this.b.Ia
-};
-r.Qc = function(a) {
- this.b.Ia = a
-};
-r.autoplay = function() {
- return this.b.autoplay
-};
-r.Lc = function(a) {
- this.b.autoplay = a
-};
-r.loop = function() {
- return this.b.loop
-};
-r.Oc = function(a) {
- this.b.loop = a
-};
-r.error = function() {
- return this.b.error
-};
-r.controls = function() {
- return this.a.options.controls
-};
-vjs.k.isSupported = function() {
- return!!document.createElement("video").canPlayType
-};
-vjs.k.pb = function(a) {
- return!!document.createElement("video").canPlayType(a.type)
-};
-vjs.k.ea = "loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
-vjs.k.prototype.M = {fd:vjs.mc.webkitEnterFullScreen ? !vjs.Qa.match("Chrome") && !vjs.Qa.match("Mac OS X 10.5") ? g : j : j, Cc:!vjs.ic};
-vjs.gc && 3 > vjs.fc && (document.createElement("video").constructor.prototype.canPlayType = function(a) {
- return a && -1 != a.toLowerCase().indexOf("video/mp4") ? "maybe" : ""
-});
-vjs.j = function(a, b, c) {
- vjs.P.call(this, a, b, c);
- c = b.source;
- var d = b.Hc, f = this.b = vjs.e("div", {id:a.id() + "_temp_flash"}), m = a.id() + "_flash_api";
- a = a.options;
- var k = vjs.w({readyFunction:"videojs.Flash.onReady", eventProxyFunction:"videojs.Flash.onEvent", errorEventProxyFunction:"videojs.Flash.onError", autoplay:a.autoplay, preload:a.Ia, loop:a.loop, muted:a.muted}, b.flashVars), p = vjs.w({wmode:"opaque", bgcolor:"#000000"}, b.params), n = vjs.w({id:m, name:m, "class":"vjs-tech"}, b.attributes);
- c && (k.src = encodeURIComponent(vjs.Xa(c.src)));
- vjs.Fa(f, d);
- b.startTime && this.N(function() {
- this.load();
- this.play();
- this.currentTime(b.startTime)
- });
- if(b.jd === g && !vjs.hc) {
- var s = vjs.e("iframe", {id:m + "_iframe", name:m + "_iframe", className:"vjs-tech", scrolling:"no", marginWidth:0, marginHeight:0, frameBorder:0});
- k.readyFunction = "ready";
- k.eventProxyFunction = "events";
- k.errorEventProxyFunction = "errors";
- vjs.f(s, "load", vjs.bind(this, function() {
- var a, c = s.contentWindow;
- a = s.contentDocument ? s.contentDocument : s.contentWindow.document;
- a.write(vjs.j.Tb(b.swf, k, p, n));
- c.a = this.a;
- c.N = vjs.bind(this.a, function(b) {
- b = a.getElementById(b);
- var c = this.l;
- c.g = b;
- vjs.f(b, "click", c.bind(c.o));
- vjs.j.qb(c)
- });
- c.ed = vjs.bind(this.a, function(a, b) {
- this && "flash" === this.aa && this.h(b)
- });
- c.dd = vjs.bind(this.a, function(a, b) {
- vjs.log("Flash Error", b)
- })
- }));
- f.parentNode.replaceChild(s, f)
- }else {
- vjs.j.vc(b.swf, f, k, p, n)
- }
-};
-v(vjs.j, vjs.P);
-r = vjs.j.prototype;
-r.p = function() {
- vjs.j.i.p.call(this)
-};
-r.play = function() {
- this.b.vjs_play()
-};
-r.pause = function() {
- this.b.vjs_pause()
-};
-r.src = function(a) {
- a = vjs.Xa(a);
- this.b.vjs_src(a);
- if(this.a.autoplay()) {
- var b = this;
- setTimeout(function() {
- b.play()
- }, 0)
- }
-};
-r.load = function() {
- this.b.vjs_load()
-};
-r.poster = function() {
- this.b.vjs_getProperty("poster")
-};
-r.buffered = function() {
- return vjs.sb(this.b.vjs_getProperty("buffered"))
-};
-r.ib = q(j);
-var S = vjs.j.prototype, T = "preload currentTime defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "), U = "error currentSrc networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" ");
-function ea() {
- var a = T[i], b = a.charAt(0).toUpperCase() + a.slice(1);
- S["set" + b] = function(b) {
- return this.b.vjs_setProperty(a, b)
- }
-}
-function V(a) {
- S[a] = function() {
- return this.b.vjs_getProperty(a)
- }
-}
-for(i = 0;i < T.length;i++) {
- V(T[i]), ea()
-}
-for(i = 0;i < U.length;i++) {
- V(U[i])
-}
-vjs.j.isSupported = function() {
- return 10 <= vjs.j.version()[0]
-};
-vjs.j.pb = function(a) {
- if(a.type in vjs.j.prototype.M.xc) {
- return"maybe"
- }
-};
-vjs.j.prototype.M = {xc:{"video/flv":"FLV", "video/x-flv":"FLV", "video/mp4":"MP4", "video/m4v":"MP4"}, Zb:j, dc:j, Sb:j, md:!vjs.Qa.match("Firefox")};
-vjs.j.onReady = function(a) {
- a = vjs.g(a);
- var b = a.a || a.parentNode.a, c = b.l;
- a.a = b;
- c.b = a;
- c.f("click", c.o);
- vjs.j.qb(c)
-};
-vjs.j.qb = function(a) {
- a.g().vjs_getProperty ? A(a) : setTimeout(function() {
- vjs.j.qb(a)
- }, 50)
-};
-vjs.j.onEvent = function(a, b) {
- vjs.g(a).a.h(b)
-};
-vjs.j.onError = function(a, b) {
- vjs.g(a).a.h("error");
- vjs.log("Flash Error", b, a)
-};
-vjs.j.version = function() {
- var a = "0,0,0";
- try {
- a = (new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g, ",").match(/^,?(.+),?$/)[1]
- }catch(b) {
- try {
- navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin && (a = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1])
- }catch(c) {
- }
- }
- return a.split(",")
-};
-vjs.j.vc = function(a, b, c, d, f) {
- a = vjs.j.Tb(a, c, d, f);
- a = vjs.e("div", {innerHTML:a}).childNodes[0];
- c = b.parentNode;
- b.parentNode.replaceChild(a, b);
- var m = c.childNodes[0];
- setTimeout(function() {
- m.style.display = "block"
- }, 1E3)
-};
-vjs.j.Tb = function(a, b, c, d) {
- var f = "", m = "", k = "";
- b && vjs.Da(b, function(a, b) {
- f += a + "=" + b + "&"
- });
- c = vjs.w({movie:a, flashvars:f, allowScriptAccess:"always", allowNetworking:"all"}, c);
- vjs.Da(c, function(a, b) {
- m += ' '
- });
- d = vjs.w({data:a, width:"100%", height:"100%"}, d);
- vjs.Da(d, function(a, b) {
- k += a + '="' + b + '" '
- });
- return'" + m + " "
-};
-vjs.da = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.da, vjs.d);
-vjs.da.prototype.C = function() {
- return"vjs-control " + vjs.da.i.C.call(this)
-};
-vjs.V = function(a, b) {
- vjs.d.call(this, a, b);
- a.G("play", vjs.bind(this, function() {
- this.Wa();
- this.a.f("mouseover", vjs.bind(this, this.Wa));
- this.a.f("mouseout", vjs.bind(this, this.ub))
- }))
-};
-v(vjs.V, vjs.d);
-r = vjs.V.prototype;
-r.options = {Bc:"play", children:{playToggle:{}, fullscreenToggle:{}, currentTimeDisplay:{}, timeDivider:{}, durationDisplay:{}, remainingTimeDisplay:{}, progressControl:{}, volumeControl:{}, muteToggle:{}}};
-r.e = function() {
- return vjs.e("div", {className:"vjs-control-bar"})
-};
-r.Wa = function() {
- vjs.V.i.Wa.call(this);
- this.a.h("controlsvisible")
-};
-r.ub = function() {
- vjs.V.i.ub.call(this);
- this.a.h("controlshidden")
-};
-r.Xb = function() {
- this.b.style.opacity = "1"
-};
-vjs.m = function(a, b) {
- vjs.da.call(this, a, b);
- this.f("click", this.o);
- this.f("focus", this.ab);
- this.f("blur", this.$a)
-};
-v(vjs.m, vjs.da);
-r = vjs.m.prototype;
-r.e = function(a, b) {
- b = vjs.w({className:this.C(), innerHTML:'' + (this.W || "Need Text") + "
", Kc:"button", tabIndex:0}, b);
- return vjs.m.i.e.call(this, a, b)
-};
-r.o = function() {
-};
-r.ab = function() {
- vjs.f(document, "keyup", vjs.bind(this, this.Ha))
-};
-r.Ha = function(a) {
- if(32 == a.which || 13 == a.which) {
- a.preventDefault(), this.o()
- }
-};
-r.$a = function() {
- vjs.n(document, "keyup", vjs.bind(this, this.Ha))
-};
-vjs.ja = function(a, b) {
- vjs.m.call(this, a, b)
-};
-v(vjs.ja, vjs.m);
-vjs.ja.prototype.W = "Play";
-vjs.ja.prototype.C = function() {
- return"vjs-play-button " + vjs.ja.i.C.call(this)
-};
-vjs.ja.prototype.o = function() {
- this.a.play()
-};
-vjs.ia = function(a, b) {
- vjs.m.call(this, a, b)
-};
-v(vjs.ia, vjs.m);
-vjs.ia.prototype.W = "Play";
-vjs.ia.prototype.C = function() {
- return"vjs-pause-button " + vjs.ia.i.C.call(this)
-};
-vjs.ia.prototype.o = function() {
- this.a.pause()
-};
-vjs.Ma = function(a, b) {
- vjs.m.call(this, a, b);
- a.f("play", vjs.bind(this, this.Eb));
- a.f("pause", vjs.bind(this, this.Db))
-};
-v(vjs.Ma, vjs.m);
-r = vjs.Ma.prototype;
-r.W = "Play";
-r.C = function() {
- return"vjs-play-control " + vjs.Ma.i.C.call(this)
-};
-r.o = function() {
- this.a.paused() ? this.a.play() : this.a.pause()
-};
-r.Eb = function() {
- vjs.B(this.b, "vjs-paused");
- vjs.q(this.b, "vjs-playing")
-};
-r.Db = function() {
- vjs.B(this.b, "vjs-playing");
- vjs.q(this.b, "vjs-paused")
-};
-vjs.fa = function(a, b) {
- vjs.m.call(this, a, b)
-};
-v(vjs.fa, vjs.m);
-vjs.fa.prototype.W = "Fullscreen";
-vjs.fa.prototype.C = function() {
- return"vjs-fullscreen-control " + vjs.fa.i.C.call(this)
-};
-vjs.fa.prototype.o = function() {
- this.a.Z ? J(this.a) : this.a.gb()
-};
-vjs.ca = function(a, b) {
- vjs.m.call(this, a, b);
- a.f("play", vjs.bind(this, this.A));
- a.f("ended", vjs.bind(this, this.show))
-};
-v(vjs.ca, vjs.m);
-vjs.ca.prototype.e = function() {
- return vjs.ca.i.e.call(this, "div", {className:"vjs-big-play-button", innerHTML:" "})
-};
-vjs.ca.prototype.o = function() {
- this.a.currentTime() && this.a.currentTime(0);
- this.a.play()
-};
-vjs.wa = function(a, b) {
- vjs.d.call(this, a, b);
- a.f("canplay", vjs.bind(this, this.A));
- a.f("canplaythrough", vjs.bind(this, this.A));
- a.f("playing", vjs.bind(this, this.A));
- a.f("seeked", vjs.bind(this, this.A));
- a.f("seeking", vjs.bind(this, this.show));
- a.f("seeked", vjs.bind(this, this.A));
- a.f("error", vjs.bind(this, this.show));
- a.f("waiting", vjs.bind(this, this.show))
-};
-v(vjs.wa, vjs.d);
-vjs.wa.prototype.e = function() {
- var a, b;
- "string" == typeof this.a.g().style.WebkitBorderRadius || "string" == typeof this.a.g().style.MozBorderRadius || "string" == typeof this.a.g().style.Yc || "string" == typeof this.a.g().style.$c ? (a = "vjs-loading-spinner", b = '
') : (a = "vjs-loading-spinner-fallback", b = "");
- return vjs.wa.i.e.call(this, "div", {className:a, innerHTML:b})
-};
-vjs.ta = function(a, b) {
- vjs.d.call(this, a, b);
- a.f("timeupdate", vjs.bind(this, this.Ka))
-};
-v(vjs.ta, vjs.d);
-vjs.ta.prototype.e = function() {
- var a = vjs.ta.i.e.call(this, "div", {className:"vjs-current-time vjs-time-controls vjs-control"});
- this.content = vjs.e("div", {className:"vjs-current-time-display", innerHTML:"0:00"});
- a.appendChild(vjs.e("div").appendChild(this.content));
- return a
-};
-vjs.ta.prototype.Ka = function() {
- var a = this.a.$b ? this.a.r.currentTime : this.a.currentTime();
- this.content.innerHTML = vjs.s(a, this.a.duration())
-};
-vjs.ua = function(a, b) {
- vjs.d.call(this, a, b);
- a.f("timeupdate", vjs.bind(this, this.Ka))
-};
-v(vjs.ua, vjs.d);
-vjs.ua.prototype.e = function() {
- var a = vjs.ua.i.e.call(this, "div", {className:"vjs-duration vjs-time-controls vjs-control"});
- this.content = vjs.e("div", {className:"vjs-duration-display", innerHTML:"0:00"});
- a.appendChild(vjs.e("div").appendChild(this.content));
- return a
-};
-vjs.ua.prototype.Ka = function() {
- this.a.duration() && (this.content.innerHTML = vjs.s(this.a.duration()))
-};
-vjs.Pa = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.Pa, vjs.d);
-vjs.Pa.prototype.e = function() {
- return vjs.Pa.i.e.call(this, "div", {className:"vjs-time-divider", innerHTML:"/
"})
-};
-vjs.Aa = function(a, b) {
- vjs.d.call(this, a, b);
- a.f("timeupdate", vjs.bind(this, this.Ka))
-};
-v(vjs.Aa, vjs.d);
-vjs.Aa.prototype.e = function() {
- var a = vjs.Aa.i.e.call(this, "div", {className:"vjs-remaining-time vjs-time-controls vjs-control"});
- this.content = vjs.e("div", {className:"vjs-remaining-time-display", innerHTML:"-0:00"});
- a.appendChild(vjs.e("div").appendChild(this.content));
- return a
-};
-vjs.Aa.prototype.Ka = function() {
- this.a.duration() && (this.content.innerHTML = "-" + vjs.s(this.a.duration() - this.a.currentTime()))
-};
-vjs.Q = function(a, b) {
- vjs.d.call(this, a, b);
- this.pc = this.L[this.options.barName];
- this.handle = this.L[this.options.handleName];
- a.f(this.Yb, vjs.bind(this, this.update));
- this.f("mousedown", this.Cb);
- this.f("focus", this.ab);
- this.f("blur", this.$a);
- this.a.f("controlsvisible", vjs.bind(this, this.update));
- a.N(vjs.bind(this, this.update))
-};
-v(vjs.Q, vjs.d);
-r = vjs.Q.prototype;
-r.e = function(a, b) {
- b = vjs.w({Kc:"slider", "aria-valuenow":0, "aria-valuemin":0, "aria-valuemax":100, tabIndex:0}, b);
- return vjs.Q.i.e.call(this, a, b)
-};
-r.Cb = function(a) {
- a.preventDefault();
- vjs.qc();
- vjs.f(document, "mousemove", vjs.bind(this, this.bb));
- vjs.f(document, "mouseup", vjs.bind(this, this.cb));
- this.bb(a)
-};
-r.cb = function() {
- vjs.Sc();
- vjs.n(document, "mousemove", this.bb, j);
- vjs.n(document, "mouseup", this.cb, j);
- this.update()
-};
-r.update = function() {
- var a, b = this.Ub(), c = this.handle, d = this.pc;
- isNaN(b) && (b = 0);
- a = b;
- if(c) {
- a = this.b.offsetWidth;
- var f = c.g().offsetWidth;
- a = f ? f / a : 0;
- b *= 1 - a;
- a = b + a / 2;
- c.g().style.left = vjs.round(100 * b, 2) + "%"
- }
- d.g().style.width = vjs.round(100 * a, 2) + "%"
-};
-function W(a, b) {
- var c = a.b, d = vjs.wc(c), c = c.offsetWidth, f = a.handle;
- f && (f = f.g().offsetWidth, d += f / 2, c -= f);
- return Math.max(0, Math.min(1, (b.pageX - d) / c))
-}
-r.ab = function() {
- vjs.f(document, "keyup", vjs.bind(this, this.Ha))
-};
-r.Ha = function(a) {
- 37 == a.which ? (a.preventDefault(), this.bc()) : 39 == a.which && (a.preventDefault(), this.cc())
-};
-r.$a = function() {
- vjs.n(document, "keyup", vjs.bind(this, this.Ha))
-};
-vjs.za = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.za, vjs.d);
-vjs.za.prototype.options = {children:{seekBar:{}}};
-vjs.za.prototype.e = function() {
- return vjs.za.i.e.call(this, "div", {className:"vjs-progress-control vjs-control"})
-};
-vjs.ka = function(a, b) {
- vjs.Q.call(this, a, b)
-};
-v(vjs.ka, vjs.Q);
-r = vjs.ka.prototype;
-r.options = {children:{loadProgressBar:{}, playProgressBar:{}, seekHandle:{}}, barName:"playProgressBar", handleName:"seekHandle"};
-r.Yb = "timeupdate";
-r.e = function() {
- return vjs.ka.i.e.call(this, "div", {className:"vjs-progress-holder"})
-};
-r.Ub = function() {
- return this.a.currentTime() / this.a.duration()
-};
-r.Cb = function(a) {
- vjs.ka.i.Cb.call(this, a);
- this.a.$b = g;
- this.Tc = !this.a.paused();
- this.a.pause()
-};
-r.bb = function(a) {
- a = W(this, a) * this.a.duration();
- a == this.a.duration() && (a -= 0.1);
- this.a.currentTime(a)
-};
-r.cb = function(a) {
- vjs.ka.i.cb.call(this, a);
- this.a.$b = j;
- this.Tc && this.a.play()
-};
-r.cc = function() {
- this.a.currentTime(this.a.currentTime() + 1)
-};
-r.bc = function() {
- this.a.currentTime(this.a.currentTime() - 1)
-};
-vjs.va = function(a, b) {
- vjs.d.call(this, a, b);
- a.f("progress", vjs.bind(this, this.update))
-};
-v(vjs.va, vjs.d);
-vjs.va.prototype.e = function() {
- return vjs.va.i.e.call(this, "div", {className:"vjs-load-progress", innerHTML:'Loaded: 0% '})
-};
-vjs.va.prototype.update = function() {
- this.b.style && (this.b.style.width = vjs.round(100 * F(this.a), 2) + "%")
-};
-vjs.La = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.La, vjs.d);
-vjs.La.prototype.e = function() {
- return vjs.La.i.e.call(this, "div", {className:"vjs-play-progress", innerHTML:'Progress: 0% '})
-};
-vjs.Na = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.Na, vjs.d);
-vjs.Na.prototype.e = function() {
- return vjs.Na.i.e.call(this, "div", {className:"vjs-seek-handle", innerHTML:'00:00 '})
-};
-vjs.Ca = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.Ca, vjs.d);
-vjs.Ca.prototype.options = {children:{volumeBar:{}}};
-vjs.Ca.prototype.e = function() {
- return vjs.Ca.i.e.call(this, "div", {className:"vjs-volume-control vjs-control"})
-};
-vjs.Ra = function(a, b) {
- vjs.Q.call(this, a, b)
-};
-v(vjs.Ra, vjs.Q);
-r = vjs.Ra.prototype;
-r.options = {children:{volumeLevel:{}, volumeHandle:{}}, barName:"volumeLevel", handleName:"volumeHandle"};
-r.Yb = "volumechange";
-r.e = function() {
- return vjs.Ra.i.e.call(this, "div", {className:"vjs-volume-bar"})
-};
-r.bb = function(a) {
- this.a.volume(W(this, a))
-};
-r.Ub = function() {
- return this.a.volume()
-};
-r.cc = function() {
- this.a.volume(this.a.volume() + 0.1)
-};
-r.bc = function() {
- this.a.volume(this.a.volume() - 0.1)
-};
-vjs.Ta = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.Ta, vjs.d);
-vjs.Ta.prototype.e = function() {
- return vjs.Ta.i.e.call(this, "div", {className:"vjs-volume-level", innerHTML:' '})
-};
-vjs.Sa = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.Sa, vjs.d);
-vjs.Sa.prototype.e = function() {
- return vjs.Sa.i.e.call(this, "div", {className:"vjs-volume-handle", innerHTML:' '})
-};
-vjs.ha = function(a, b) {
- vjs.m.call(this, a, b);
- a.f("volumechange", vjs.bind(this, this.update))
-};
-v(vjs.ha, vjs.m);
-vjs.ha.prototype.e = function() {
- return vjs.ha.i.e.call(this, "div", {className:"vjs-mute-control vjs-control", innerHTML:'Mute
'})
-};
-vjs.ha.prototype.o = function() {
- this.a.muted(this.a.muted() ? j : g)
-};
-vjs.ha.prototype.update = function() {
- var a = this.a.volume(), b = 3;
- 0 === a || this.a.muted() ? b = 0 : 0.33 > a ? b = 1 : 0.67 > a && (b = 2);
- for(a = 0;4 > a;a++) {
- vjs.B(this.b, "vjs-vol-" + a)
- }
- vjs.q(this.b, "vjs-vol-" + b)
-};
-vjs.ya = function(a, b) {
- vjs.m.call(this, a, b);
- this.a.options.poster || this.A();
- a.f("play", vjs.bind(this, this.A))
-};
-v(vjs.ya, vjs.m);
-vjs.ya.prototype.e = function() {
- var a = vjs.e("img", {className:"vjs-poster", tabIndex:-1});
- this.a.options.poster && (a.src = this.a.options.poster);
- return a
-};
-vjs.ya.prototype.o = function() {
- this.a.play()
-};
-vjs.ga = function(a, b) {
- vjs.d.call(this, a, b)
-};
-v(vjs.ga, vjs.d);
-function fa(a, b) {
- a.K(b);
- b.f("click", vjs.bind(a, function() {
- B(this)
- }))
-}
-vjs.ga.prototype.e = function() {
- return vjs.ga.i.e.call(this, "ul", {className:"vjs-menu"})
-};
-vjs.H = function(a, b) {
- vjs.m.call(this, a, b);
- b.selected && this.q("vjs-selected")
-};
-v(vjs.H, vjs.m);
-vjs.H.prototype.e = function(a, b) {
- return vjs.H.i.e.call(this, "li", vjs.w({className:"vjs-menu-item", innerHTML:this.options.label}, b))
-};
-vjs.H.prototype.o = function() {
- this.selected(g)
-};
-vjs.H.prototype.selected = function(a) {
- a ? this.q("vjs-selected") : this.B("vjs-selected")
-};
-function X(a) {
- a.Ja = a.Ja || [];
- return a.Ja
-}
-function ga(a, b, c) {
- for(var d = a.Ja, f = 0, m = d.length, k, p;f < m;f++) {
- k = d[f], k.id() === b ? (k.show(), p = k) : c && (k.F() == c && 0 < k.mode()) && k.disable()
- }
- (b = p ? p.F() : c ? c : j) && a.h(b + "trackchange")
-}
-vjs.z = function(a, b) {
- vjs.d.call(this, a, b);
- this.U = b.id || "vjs_" + b.kind + "_" + b.language + "_" + vjs.t++;
- this.ac = b.src;
- this.sc = b["default"] || b.dflt;
- this.pd = b.title;
- this.kd = b.srclang;
- this.Ac = b.label;
- this.la = [];
- this.Jb = [];
- this.pa = this.qa = 0
-};
-v(vjs.z, vjs.d);
-r = vjs.z.prototype;
-r.F = l("v");
-r.src = l("ac");
-r.tb = l("sc");
-r.label = l("Ac");
-r.readyState = l("qa");
-r.mode = l("pa");
-r.e = function() {
- return vjs.z.i.e.call(this, "div", {className:"vjs-" + this.v + " vjs-text-track"})
-};
-r.show = function() {
- ha(this);
- this.pa = 2;
- vjs.z.i.show.call(this)
-};
-r.A = function() {
- ha(this);
- this.pa = 1;
- vjs.z.i.A.call(this)
-};
-r.disable = function() {
- 2 == this.pa && this.A();
- this.a.n("timeupdate", vjs.bind(this, this.update, this.U));
- this.a.n("ended", vjs.bind(this, this.reset, this.U));
- this.reset();
- this.a.L.textTrackDisplay.removeChild(this);
- this.pa = 0
-};
-function ha(a) {
- 0 === a.qa && a.load();
- 0 === a.pa && (a.a.f("timeupdate", vjs.bind(a, a.update, a.U)), a.a.f("ended", vjs.bind(a, a.reset, a.U)), ("captions" === a.v || "subtitles" === a.v) && a.a.L.textTrackDisplay.K(a))
-}
-r.load = function() {
- 0 === this.qa && (this.qa = 1, vjs.get(this.ac, vjs.bind(this, this.Ic), vjs.bind(this, this.Bb)))
-};
-r.Bb = function(a) {
- this.error = a;
- this.qa = 3;
- this.h("error")
-};
-r.Ic = function(a) {
- var b, c;
- a = a.split("\n");
- for(var d = "", f = 1, m = a.length;f < m;f++) {
- if(d = vjs.trim(a[f])) {
- -1 == d.indexOf("--\x3e") ? (b = d, d = vjs.trim(a[++f])) : b = this.la.length;
- b = {id:b, index:this.la.length};
- c = d.split(" --\x3e ");
- b.startTime = ia(c[0]);
- b.Ea = ia(c[1]);
- for(c = [];a[++f] && (d = vjs.trim(a[f]));) {
- c.push(d)
- }
- b.text = c.join(" ");
- this.la.push(b)
- }
- }
- this.qa = 2;
- this.h("loaded")
-};
-function ia(a) {
- var b = a.split(":");
- a = 0;
- var c, d, f;
- 3 == b.length ? (c = b[0], d = b[1], b = b[2]) : (c = 0, d = b[0], b = b[1]);
- b = b.split(/\s+/);
- b = b.splice(0, 1)[0];
- b = b.split(/\.|,/);
- f = parseFloat(b[1]);
- b = b[0];
- a += 3600 * parseFloat(c);
- a += 60 * parseFloat(d);
- a += parseFloat(b);
- f && (a += f / 1E3);
- return a
-}
-r.update = function() {
- if(0 < this.la.length) {
- var a = this.a.currentTime();
- if(this.Fb === e || a < this.Fb || this.Za <= a) {
- var b = this.la, c = this.a.duration(), d = 0, f = j, m = [], k, p, n, s;
- a >= this.Za || this.Za === e ? s = this.vb !== e ? this.vb : 0 : (f = g, s = this.yb !== e ? this.yb : b.length - 1);
- for(;;) {
- n = b[s];
- if(n.Ea <= a) {
- d = Math.max(d, n.Ea), n.Ua && (n.Ua = j)
- }else {
- if(a < n.startTime) {
- if(c = Math.min(c, n.startTime), n.Ua && (n.Ua = j), !f) {
- break
- }
- }else {
- f ? (m.splice(0, 0, n), p === e && (p = s), k = s) : (m.push(n), k === e && (k = s), p = s), c = Math.min(c, n.Ea), d = Math.max(d, n.startTime), n.Ua = g
- }
- }
- if(f) {
- if(0 === s) {
- break
- }else {
- s--
- }
- }else {
- if(s === b.length - 1) {
- break
- }else {
- s++
- }
- }
- }
- this.Jb = m;
- this.Za = c;
- this.Fb = d;
- this.vb = k;
- this.yb = p;
- a = this.Jb;
- b = "";
- c = 0;
- for(d = a.length;c < d;c++) {
- b += '' + a[c].text + " "
- }
- this.b.innerHTML = b;
- this.h("cuechange")
- }
- }
-};
-r.reset = function() {
- this.Za = 0;
- this.Fb = this.a.duration();
- this.yb = this.vb = 0
-};
-vjs.kb = function(a, b) {
- vjs.z.call(this, a, b)
-};
-v(vjs.kb, vjs.z);
-vjs.kb.prototype.v = "captions";
-vjs.nb = function(a, b) {
- vjs.z.call(this, a, b)
-};
-v(vjs.nb, vjs.z);
-vjs.nb.prototype.v = "subtitles";
-vjs.mb = function(a, b) {
- vjs.z.call(this, a, b)
-};
-v(vjs.mb, vjs.z);
-vjs.mb.prototype.v = "chapters";
-vjs.Oa = function(a, b, c) {
- vjs.d.call(this, a, b, c);
- if(a.options.tracks && 0 < a.options.tracks.length) {
- b = this.a;
- a = a.options.tracks;
- var d;
- for(c = 0;c < a.length;c++) {
- d = a[c];
- var f = b, m = d.kind, k = d.label, p = d.language, n = d;
- d = f.Ja = f.Ja || [];
- n = n || {};
- n.kind = m;
- n.label = k;
- n.language = p;
- m = vjs.S(m || "subtitles");
- f = new window.videojs[m + "Track"](f, n);
- d.push(f)
- }
- }
-};
-v(vjs.Oa, vjs.d);
-vjs.Oa.prototype.e = function() {
- return vjs.Oa.i.e.call(this, "div", {className:"vjs-text-track-display"})
-};
-vjs.R = function(a, b) {
- var c = this.ba = b.track;
- b.label = c.label();
- b.selected = c.tb();
- vjs.H.call(this, a, b);
- this.a.f(c.F() + "trackchange", vjs.bind(this, this.update))
-};
-v(vjs.R, vjs.H);
-vjs.R.prototype.o = function() {
- vjs.R.i.o.call(this);
- ga(this.a, this.ba.id(), this.ba.F())
-};
-vjs.R.prototype.update = function() {
- 2 == this.ba.mode() ? this.selected(g) : this.selected(j)
-};
-vjs.xa = function(a, b) {
- b.track = {F:function() {
- return b.kind
- }, a:a, label:q("Off"), tb:q(j), mode:q(j)};
- vjs.R.call(this, a, b)
-};
-v(vjs.xa, vjs.R);
-vjs.xa.prototype.o = function() {
- vjs.xa.i.o.call(this);
- ga(this.a, this.ba.id(), this.ba.F())
-};
-vjs.xa.prototype.update = function() {
- for(var a = X(this.a), b = 0, c = a.length, d, f = g;b < c;b++) {
- d = a[b], d.F() == this.ba.F() && 2 == d.mode() && (f = j)
- }
- f ? this.selected(g) : this.selected(j)
-};
-vjs.J = function(a, b) {
- vjs.m.call(this, a, b);
- this.oa = this.rb();
- 0 === this.Ga.length && this.A()
-};
-v(vjs.J, vjs.m);
-r = vjs.J.prototype;
-r.rb = function() {
- var a = new vjs.ga(this.a);
- a.g().appendChild(vjs.e("li", {className:"vjs-menu-title", innerHTML:vjs.S(this.v)}));
- fa(a, new vjs.xa(this.a, {kind:this.v}));
- this.Ga = this.Nb();
- for(var b = 0;b < this.Ga.length;b++) {
- fa(a, this.Ga[b])
- }
- this.K(a);
- return a
-};
-r.Nb = function() {
- for(var a = [], b, c = 0;c < X(this.a).length;c++) {
- b = X(this.a)[c], b.F() === this.v && a.push(new vjs.R(this.a, {track:b}))
- }
- return a
-};
-r.C = function() {
- return this.className + " vjs-menu-button " + vjs.J.i.C.call(this)
-};
-r.ab = function() {
- this.oa.Xb();
- vjs.G(this.oa.b.childNodes[this.oa.b.childNodes.length - 1], "blur", vjs.bind(this, function() {
- B(this.oa)
- }))
-};
-r.$a = function() {
-};
-r.o = function() {
- this.G("mouseout", vjs.bind(this, function() {
- B(this.oa);
- this.b.blur()
- }))
-};
-vjs.ra = function(a, b) {
- vjs.J.call(this, a, b)
-};
-v(vjs.ra, vjs.J);
-vjs.ra.prototype.v = "captions";
-vjs.ra.prototype.W = "Captions";
-vjs.ra.prototype.className = "vjs-captions-button";
-vjs.Ba = function(a, b) {
- vjs.J.call(this, a, b)
-};
-v(vjs.Ba, vjs.J);
-vjs.Ba.prototype.v = "subtitles";
-vjs.Ba.prototype.W = "Subtitles";
-vjs.Ba.prototype.className = "vjs-subtitles-button";
-vjs.lb = function(a, b) {
- vjs.J.call(this, a, b)
-};
-v(vjs.lb, vjs.J);
-r = vjs.lb.prototype;
-r.v = "chapters";
-r.W = "Chapters";
-r.className = "vjs-chapters-button";
-r.Nb = function() {
- for(var a = [], b, c = 0;c < X(this.a).length;c++) {
- b = X(this.a)[c], b.F() === this.v && a.push(new vjs.R(this.a, {track:b}))
- }
- return a
-};
-r.rb = function() {
- for(var a = X(this.a), b = 0, c = a.length, d, f, m = this.Ga = [];b < c;b++) {
- if(d = a[b], d.F() == this.v && d.tb()) {
- if(2 > d.readyState()) {
- this.bd = d;
- d.f("loaded", vjs.bind(this, this.rb));
- return
- }
- f = d;
- break
- }
- }
- a = this.oa = new vjs.ga(this.a);
- a.b.appendChild(vjs.e("li", {className:"vjs-menu-title", innerHTML:vjs.S(this.v)}));
- if(f) {
- d = f.la;
- for(var k, b = 0, c = d.length;b < c;b++) {
- k = d[b], k = new vjs.sa(this.a, {track:f, cue:k}), m.push(k), a.K(k)
- }
- }
- this.K(a);
- 0 < this.Ga.length && this.show();
- return a
-};
-vjs.sa = function(a, b) {
- var c = this.ba = b.track, d = this.cue = b.cue, f = a.currentTime();
- b.label = d.text;
- b.selected = d.startTime <= f && f < d.Ea;
- vjs.H.call(this, a, b);
- c.f("cuechange", vjs.bind(this, this.update))
-};
-v(vjs.sa, vjs.H);
-vjs.sa.prototype.o = function() {
- vjs.sa.i.o.call(this);
- this.a.currentTime(this.cue.startTime);
- this.update(this.cue.startTime)
-};
-vjs.sa.prototype.update = function() {
- var a = this.cue, b = this.a.currentTime();
- a.startTime <= b && b < a.Ea ? this.selected(g) : this.selected(j)
-};
-vjs.w(vjs.V.prototype.options.children, {subtitlesButton:{}, captionsButton:{}, chaptersButton:{}});
-vjs.Kb = function() {
- var a, b, c = document.getElementsByTagName("video");
- if(c && 0 < c.length) {
- for(var d = 0, f = c.length;d < f;d++) {
- if((b = c[d]) && b.getAttribute) {
- b.a === e && (a = b.getAttribute("data-setup"), a !== h && (a = vjs.JSON.parse(a || "{}"), w(b, a)))
- }else {
- vjs.Lb();
- break
- }
- }
- }else {
- vjs.Vc || vjs.Lb()
- }
-};
-vjs.Lb = function() {
- setTimeout(vjs.Kb, 1)
-};
-vjs.G(window, "load", function() {
- vjs.Vc = g
-});
-vjs.Kb();
-if(JSON && "function" === JSON.parse) {
- vjs.JSON = JSON
-}else {
- vjs.JSON = {};
- var Y = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
- vjs.JSON.parse = function(a, b) {
- function c(a, d) {
- var k, p, n = a[d];
- if(n && "object" === typeof n) {
- for(k in n) {
- Object.prototype.hasOwnProperty.call(n, k) && (p = c(n, k), p !== e ? n[k] = p : delete n[k])
- }
- }
- return b.call(a, d, n)
- }
- var d;
- a = String(a);
- Y.lastIndex = 0;
- Y.test(a) && (a = a.replace(Y, function(a) {
- return"\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
- }));
- if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
- return d = eval("(" + a + ")"), "function" === typeof b ? c({"":d}, "") : d
- }
- throw new SyntaxError("JSON.parse");
- }
-}
-;u("videojs", vjs);
-u("_V_", vjs);
-u("videojs.options", vjs.options);
-u("videojs.cache", vjs.X);
-u("videojs.Component", vjs.d);
-vjs.d.prototype.dispose = vjs.d.prototype.p;
-vjs.d.prototype.createEl = vjs.d.prototype.e;
-vjs.d.prototype.getEl = vjs.d.prototype.hd;
-vjs.d.prototype.addChild = vjs.d.prototype.K;
-vjs.d.prototype.getChildren = vjs.d.prototype.gd;
-vjs.d.prototype.on = vjs.d.prototype.f;
-vjs.d.prototype.off = vjs.d.prototype.n;
-vjs.d.prototype.one = vjs.d.prototype.G;
-vjs.d.prototype.trigger = vjs.d.prototype.h;
-vjs.d.prototype.show = vjs.d.prototype.show;
-vjs.d.prototype.hide = vjs.d.prototype.A;
-vjs.d.prototype.width = vjs.d.prototype.width;
-vjs.d.prototype.height = vjs.d.prototype.height;
-vjs.d.prototype.dimensions = vjs.d.prototype.tc;
-u("videojs.Player", vjs.D);
-u("videojs.MediaLoader", vjs.Ib);
-u("videojs.PosterImage", vjs.ya);
-u("videojs.LoadingSpinner", vjs.wa);
-u("videojs.BigPlayButton", vjs.ca);
-u("videojs.ControlBar", vjs.V);
-u("videojs.TextTrackDisplay", vjs.Oa);
-u("videojs.Control", vjs.da);
-u("videojs.ControlBar", vjs.V);
-u("videojs.Button", vjs.m);
-u("videojs.PlayButton", vjs.ja);
-u("videojs.PauseButton", vjs.ia);
-u("videojs.PlayToggle", vjs.Ma);
-u("videojs.FullscreenToggle", vjs.fa);
-u("videojs.BigPlayButton", vjs.ca);
-u("videojs.LoadingSpinner", vjs.wa);
-u("videojs.CurrentTimeDisplay", vjs.ta);
-u("videojs.DurationDisplay", vjs.ua);
-u("videojs.TimeDivider", vjs.Pa);
-u("videojs.RemainingTimeDisplay", vjs.Aa);
-u("videojs.Slider", vjs.Q);
-u("videojs.ProgressControl", vjs.za);
-u("videojs.SeekBar", vjs.ka);
-u("videojs.LoadProgressBar", vjs.va);
-u("videojs.PlayProgressBar", vjs.La);
-u("videojs.SeekHandle", vjs.Na);
-u("videojs.VolumeControl", vjs.Ca);
-u("videojs.VolumeBar", vjs.Ra);
-u("videojs.VolumeLevel", vjs.Ta);
-u("videojs.VolumeHandle", vjs.Sa);
-u("videojs.MuteToggle", vjs.ha);
-u("videojs.PosterImage", vjs.ya);
-u("videojs.Menu", vjs.ga);
-u("videojs.MenuItem", vjs.H);
-u("videojs.SubtitlesButton", vjs.Ba);
-u("videojs.CaptionsButton", vjs.ra);
-u("videojs.ChaptersButton", vjs.lb);
-u("videojs.MediaTechController", vjs.P);
-u("videojs.Html5", vjs.k);
-vjs.k.Events = vjs.k.ea;
-vjs.k.isSupported = vjs.k.isSupported;
-vjs.k.canPlaySource = vjs.k.pb;
-vjs.k.prototype.setCurrentTime = vjs.k.prototype.Mc;
-vjs.k.prototype.setVolume = vjs.k.prototype.Rc;
-vjs.k.prototype.setMuted = vjs.k.prototype.Pc;
-vjs.k.prototype.setPreload = vjs.k.prototype.Qc;
-vjs.k.prototype.setAutoplay = vjs.k.prototype.Lc;
-vjs.k.prototype.setLoop = vjs.k.prototype.Oc;
-u("videojs.Flash", vjs.j);
-vjs.j.Events = vjs.j.ea;
-vjs.j.isSupported = vjs.j.isSupported;
-vjs.j.canPlaySource = vjs.j.pb;
-vjs.j.onReady = vjs.j.onReady;
-u("videojs.TextTrack", vjs.z);
-vjs.z.prototype.label = vjs.z.prototype.label;
-u("videojs.CaptionsTrack", vjs.kb);
-u("videojs.SubtitlesTrack", vjs.nb);
-u("videojs.ChaptersTrack", vjs.mb);
-module("Component");
-test("should create an element", function() {
- var a = new vjs.d({}, {});
- ok(a.g().nodeName)
-});
-test("should add a child component", function() {
- var a = new vjs.d({}), b = a.K("component");
- ok(1 === a.children().length);
- ok(a.children()[0] === b);
- ok(a.g().childNodes[0] === b.g());
- ok(a.L.component === b);
- var c = ok, d = b.id();
- c(a.Va[d] === b)
-});
-test("should init child coponents from options", function() {
- var a = new vjs.d({}, {children:{component:g}});
- ok(1 === a.children().length);
- ok(1 === a.g().childNodes.length)
-});
-test("should dispose of component and children", function() {
- var a = new vjs.d({}), b = a.K("Component");
- ok(1 === a.children().length);
- a.f("click", q(g));
- var c = vjs.getData(a.g()), d = a.g()[vjs.expando];
- a.p();
- ok(!a.children(), "component children were deleted");
- ok(!a.g(), "component element was deleted");
- ok(!b.children(), "child children were deleted");
- ok(!b.g(), "child element was deleted");
- ok(!vjs.X[d], "listener cache nulled");
- ok(vjs.Ya(c), "original listener cache object was emptied")
-});
-test("should add and remove event listeners to element", function() {
- function a() {
- ok(g, "fired event once");
- ok(this === b, "listener has the component as context")
- }
- var b = new vjs.d({}, {});
- expect(2);
- b.f("test-event", a);
- b.h("test-event");
- b.n("test-event", a);
- b.h("test-event")
-});
-test("should trigger a listener once using one()", function() {
- var a = new vjs.d({}, {});
- expect(1);
- a.G("test-event", function() {
- ok(g, "fired event once")
- });
- a.h("test-event");
- a.h("test-event")
-});
-test("should trigger a listener when ready", function() {
- expect(2);
- var a = new vjs.d({}, {}, function() {
- ok(g, "options listener fired")
- });
- A(a);
- a.N(function() {
- ok(g, "ready method listener fired")
- });
- A(a)
-});
-test("should add and remove a CSS class", function() {
- var a = new vjs.d({}, {});
- a.q("test-class");
- ok(-1 !== a.g().className.indexOf("test-class"));
- a.B("test-class");
- ok(-1 === a.g().className.indexOf("test-class"))
-});
-test("should show and hide an element", function() {
- var a = new vjs.d({}, {});
- a.A();
- ok("none" === a.g().style.display);
- a.show();
- ok("block" === a.g().style.display)
-});
-test("should change the width and height of a component", function() {
- var a = document.createElement("div"), b = new vjs.d({}, {}), c = b.g();
- document.getElementById("qunit-fixture").appendChild(a);
- a.appendChild(c);
- a.style.width = "1000px";
- a.style.height = "1000px";
- b.width("50%");
- b.height("123px");
- ok(500 === b.width(), "percent values working");
- ok(vjs.wb(c, "width") === b.width() + "px", "matches computed style");
- ok(123 === b.height(), "px values working");
- b.width(321);
- ok(321 === b.width(), "integer values working")
-});
-module("Lib");
-test("should create an element", function() {
- var a = vjs.e(), b = vjs.e("span", {"data-test":"asdf", innerHTML:"fdsa"});
- ok("DIV" === a.nodeName);
- ok("SPAN" === b.nodeName);
- ok("asdf" === b["data-test"]);
- ok("fdsa" === b.innerHTML)
-});
-test("should make a string start with an uppercase letter", function() {
- var a = vjs.S("bar");
- ok("Bar" === a)
-});
-test("should loop through each property on an object", function() {
- var a = {nc:1, oc:2, c:3};
- vjs.Da(a, function(b, c) {
- a[b] = c + 3
- });
- deepEqual(a, {nc:4, oc:5, c:6})
-});
-test("should add context to a function", function() {
- var a = {test:"obj"};
- vjs.bind(a, function() {
- ok(this === a)
- })()
-});
-test("should add and remove a class name on an element", function() {
- var a = document.createElement("div");
- vjs.q(a, "test-class");
- ok("test-class" === a.className, "class added");
- vjs.q(a, "test-class");
- ok("test-class" === a.className, "same class not duplicated");
- vjs.q(a, "test-class2");
- ok("test-class test-class2" === a.className, "added second class");
- vjs.B(a, "test-class");
- ok("test-class2" === a.className, "removed first class")
-});
-test("should get and remove data from an element", function() {
- var a = document.createElement("div"), b = vjs.getData(a), c = a[vjs.expando];
- ok("object" === typeof b, "data object created");
- var d = {Zc:"fdsa"};
- b.test = d;
- ok(vjs.getData(a).test === d, "data added");
- vjs.Gb(a);
- ok(!vjs.X[c], "cached item nulled");
- ok(a[vjs.expando] === h || a[vjs.expando] === e, "element data id removed")
-});
-test("should read tag attributes from elements, including HTML5 in all browsers", function() {
- var a = document.createElement("div"), b;
- b = '';
- b += '';
- a.innerHTML += b;
- document.getElementById("qunit-fixture").appendChild(a);
- a = vjs.Y(document.getElementById("vid2"));
- b = vjs.Y(document.getElementById("source"));
- var c = vjs.Y(document.getElementById("track"));
- deepEqual(vjs.Y(document.getElementById("vid1")), {autoplay:g, controls:g, "data-test":"asdf", "data-empty-string":"", id:"vid1", loop:g, muted:g, poster:"http://www2.videojs.com/img/video-js-html5-video-player.png", preload:"none", src:"http://google.com"});
- deepEqual(a, {id:"vid2"});
- deepEqual(b, {title:"test", media:"fdsa", type:"video/mp4", src:"http://google.com", id:"source"});
- deepEqual(c, {"default":g, id:"track", kind:"captions", label:"testlabel", src:"http://google.com", srclang:"en", title:"test"})
-});
-test("should get the right style values for an element", function() {
- var a = document.createElement("div"), b = document.createElement("div"), c = document.getElementById("qunit-fixture");
- b.appendChild(a);
- c.appendChild(b);
- b.style.width = "1000px";
- b.style.height = "1000px";
- a.style.height = "100%";
- a.style.width = "123px";
- ok("1000px" === vjs.wb(a, "height"));
- ok("123px" === vjs.wb(a, "width"))
-});
-test("should insert an element first in another", function() {
- var a = document.createElement("div"), b = document.createElement("div"), c = document.createElement("div");
- vjs.Fa(a, c);
- ok(c.firstChild === a, "inserts first into empty parent");
- vjs.Fa(b, c);
- ok(c.firstChild === b, "inserts first into parent with child")
-});
-test("should return the element with the ID", function() {
- var a = document.createElement("div"), b = document.createElement("div"), c = document.getElementById("qunit-fixture");
- c.appendChild(a);
- c.appendChild(b);
- a.id = "test_id1";
- b.id = "test_id2";
- ok(vjs.g("test_id1") === a, "found element for ID");
- ok(vjs.g("#test_id2") === b, "found element for CSS ID")
-});
-test("should trim whitespace from a string", function() {
- ok("asdf asdf asdf" === vjs.trim(" asdf asdf asdf \t\n\r"))
-});
-test("should round a number", function() {
- ok(1 === vjs.round(1.01));
- ok(2 === vjs.round(1.5));
- ok(1.55 === vjs.round(1.55, 2));
- ok(10.55 === vjs.round(10.551, 2))
-});
-test("should format time as a string", function() {
- ok("0:01" === vjs.s(1));
- ok("0:10" === vjs.s(10));
- ok("1:00" === vjs.s(60));
- ok("10:00" === vjs.s(600));
- ok("1:00:00" === vjs.s(3600));
- ok("10:00:00" === vjs.s(36E3));
- ok("100:00:00" === vjs.s(36E4));
- ok("0:01" === vjs.s(1, 1));
- ok("0:01" === vjs.s(1, 10));
- ok("0:01" === vjs.s(1, 60));
- ok("00:01" === vjs.s(1, 600));
- ok("0:00:01" === vjs.s(1, 3600));
- ok("0:00:01" === vjs.s(1, 36E3));
- ok("0:00:01" === vjs.s(1, 36E4))
-});
-test("should create a fake timerange", function() {
- var a = vjs.sb(10);
- ok(0 === a.start());
- ok(10 === a.end())
-});
-test("should get an absolute URL", function() {
- ok("http://asdf.com" === vjs.Xa("http://asdf.com"));
- ok("https://asdf.com/index.html" === vjs.Xa("https://asdf.com/index.html"))
-});
-module("Events");
-test("should add and remove an event listener to an element", function() {
- function a() {
- ok(g, "Click Triggered")
- }
- expect(1);
- var b = document.createElement("div");
- vjs.f(b, "click", a);
- vjs.h(b, "click");
- vjs.n(b, "click", a);
- vjs.h(b, "click")
-});
-test("should remove all listeners of a type", function() {
- var a = document.createElement("div"), b = 0;
- vjs.f(a, "click", function() {
- b++
- });
- vjs.f(a, "click", function() {
- b++
- });
- vjs.h(a, "click");
- ok(2 === b, "both click listeners fired");
- vjs.n(a, "click");
- vjs.h(a, "click");
- ok(2 === b, "no click listeners fired")
-});
-test("should remove all listeners from an element", function() {
- expect(2);
- var a = document.createElement("div");
- vjs.f(a, "fake1", function() {
- ok(g, "Fake1 Triggered")
- });
- vjs.f(a, "fake2", function() {
- ok(g, "Fake2 Triggered")
- });
- vjs.h(a, "fake1");
- vjs.h(a, "fake2");
- vjs.n(a);
- vjs.h(a, "fake1");
- vjs.h(a, "fake2")
-});
-test("should listen only once", function() {
- expect(1);
- var a = document.createElement("div");
- vjs.G(a, "click", function() {
- ok(g, "Click Triggered")
- });
- vjs.h(a, "click");
- vjs.h(a, "click")
-});
-module("Player");
-function Z() {
- var a = document.createElement("video");
- a.id = "example_1";
- a.className = "video-js vjs-default-skin";
- return a
-}
-function $(a) {
- var b = Z();
- document.getElementById("qunit-fixture").appendChild(b);
- return player = new vjs.D(b, a)
-}
-test("should create player instance that inherits from component and dispose it", function() {
- var a = $();
- ok("DIV" === a.g().nodeName);
- ok(a.f, "component function exists");
- a.p();
- ok(a.g() === h, "element disposed")
-});
-test("should accept options from multiple sources and override in correct order", function() {
- vjs.options.attr = 1;
- var a = Z(), a = new vjs.D(a);
- ok(1 === a.options.attr, "global option was set");
- a.p();
- a = Z();
- a.setAttribute("attr", "asdf");
- a = new vjs.D(a);
- ok("asdf" === a.options.attr, "Tag options overrode global options");
- a.p();
- a = Z();
- a.setAttribute("attr", "asdf");
- a = new vjs.D(a, {attr:"fdsa"});
- ok("fdsa" === a.options.attr, "Init options overrode tag and global options");
- a.p()
-});
-test("should get tag, source, and track settings", function() {
- var a = document.getElementById("qunit-fixture"), b;
- b = '';
- b += '';
- b += " ";
- a.innerHTML += b;
- a = document.getElementById("example_1");
- b = new vjs.D(a);
- ok(b.options.autoplay === g);
- ok("metadata" === b.options.preload);
- ok("example_1" === b.options.id);
- ok(2 === b.options.sources.length);
- ok("http://google.com" === b.options.sources[0].src);
- ok("video/mp4" === b.options.sources[0].type);
- ok("video/webm" === b.options.sources[1].type);
- ok(1 === b.options.tracks.length);
- ok("captions" === b.options.tracks[0].kind);
- ok(b.options.tracks[0]["default"] === g);
- ok(-1 !== b.g().className.indexOf("video-js"), "transferred class from tag to player div");
- ok("example_1" === b.g().id, "transferred id from tag to player div");
- ok(a.a === b, "player referenceable on original tag");
- ok(vjs.$[b.id()] === b, "player referenceable from global list");
- ok(a.id !== b.id, "tag ID no longer is the same as player ID");
- ok(a.className !== b.g().className, "tag classname updated");
- b.p();
- ok(a.a === h, "tag player ref killed");
- ok(!vjs.$.example_1, "global player ref killed");
- ok(b.g() === h, "player el killed")
-});
-test("should set the width and height of the player", function() {
- var a = $({width:123, height:"100%"});
- ok(123 === a.width());
- ok("123px" === a.g().style.width);
- var b = document.getElementById("qunit-fixture"), c = document.createElement("div");
- b.appendChild(c);
- c.appendChild(a.g());
- c.style.height = "1000px";
- ok(1E3 === a.height());
- a.p()
-});
-test("should accept options from multiple sources and override in correct order", function() {
- var a = Z(), b = document.createElement("div"), c = document.getElementById("qunit-fixture");
- b.appendChild(a);
- c.appendChild(b);
- var c = new vjs.D(a), d = c.g();
- ok(d.parentNode === b, "player placed at same level as tag");
- ok(a.parentNode !== b, "tag removed from original place");
- c.p()
-});
-test("should load a media controller", function() {
- var a = $({Ia:"none", nd:[{src:"http://google.com", type:"video/mp4"}, {src:"http://google.com", type:"video/webm"}]});
- ok(-1 !== a.g().children[0].className.indexOf("vjs-tech"), "media controller loaded");
- a.p()
-});
-module("Setup");
-module("Core");
-test("should create a video tag and have access children in old IE", function() {
- document.getElementById("qunit-fixture").innerHTML += " ";
- vid = document.getElementById("test_vid_id");
- ok(1 === vid.childNodes.length);
- ok("video/mp4" === vid.childNodes[0].getAttribute("type"))
-});
-test("should return a video player instance", function() {
- document.getElementById("qunit-fixture").innerHTML += " ";
- var a = w("test_vid_id");
- ok(a, "created player from tag");
- ok("test_vid_id" === a.id());
- ok(w.$.test_vid_id === a, "added player to global reference");
- var b = w("test_vid_id");
- ok(a === b, "did not create a second player from same tag");
- a = w(document.getElementById("test_vid_id2"));
- ok("test_vid_id2" === a.id(), "created player from element")
-});
-})();//@ sourceMappingURL=video.test.compiled.js.map