diff --git a/CHANGELOG.md b/CHANGELOG.md index 77e8595b35..7bc50a0838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ CHANGELOG _(none)_ -------------------- +## 4.12.11-notrack (2017-12-04) +* @Mulder90 Add passive event listeners support + ## 4.12.10-notrack (2016-10-21) * @Mulder90 Remove track supports diff --git a/dist/video-js/video.dev.js b/dist/video-js/video.dev.js index 0d5a4551bb..55e37297ad 100644 --- a/dist/video-js/video.dev.js +++ b/dist/video-js/video.dev.js @@ -320,7 +320,7 @@ vjs.CoreObject.create = function(){ * @param {Function} fn Event listener. * @private */ -vjs.on = function(elem, type, fn){ +vjs.on = function (elem, type, fn) { if (vjs.obj.isArray(type)) { return _handleMultipleEvents(vjs.on, elem, type, fn); } @@ -339,7 +339,7 @@ vjs.on = function(elem, type, fn){ if (!data.dispatcher) { data.disabled = false; - data.dispatcher = function (event){ + data.dispatcher = function (event) { if (data.disabled) return; event = vjs.fixEvent(event); @@ -363,7 +363,13 @@ vjs.on = function(elem, type, fn){ if (data.handlers[type].length == 1) { if (elem.addEventListener) { - elem.addEventListener(type, data.dispatcher, false); + if (vjs.PASSIVE_LISTNERS_SUPPORTED && vjs.PASSIVE_EVENTS.indexOf(type) > -1) { + elem.addEventListener(type, data.dispatcher, { + 'passive': true + }); + } else { + elem.addEventListener(type, data.dispatcher, false); + } } else if (elem.attachEvent) { elem.attachEvent('on' + type, data.dispatcher); } @@ -377,7 +383,7 @@ vjs.on = function(elem, type, fn){ * @param {Function} fn Specific listener to remove. Don't include to remove listeners for an event type. * @private */ -vjs.off = function(elem, type, fn) { +vjs.off = function (elem, type, fn) { // Don't want to add a cache object through getData if not needed if (!vjs.hasData(elem)) return; @@ -391,9 +397,9 @@ vjs.off = function(elem, type, fn) { } // Utility function - var removeType = function(t){ - data.handlers[t] = []; - vjs.cleanUpEvents(elem,t); + var removeType = function (t) { + data.handlers[t] = []; + vjs.cleanUpEvents(elem, t); }; // Are we removing all bound events? @@ -431,7 +437,7 @@ vjs.off = function(elem, type, fn) { * @param {String} type Type of event to clean up * @private */ -vjs.cleanUpEvents = function(elem, type) { +vjs.cleanUpEvents = function (elem, type) { var data = vjs.getData(elem); // Remove the events of a particular type if there are none left @@ -442,7 +448,13 @@ vjs.cleanUpEvents = function(elem, type) { // Remove the meta-handler from the element if (elem.removeEventListener) { - elem.removeEventListener(type, data.dispatcher, false); + if (vjs.PASSIVE_LISTNERS_SUPPORTED && vjs.PASSIVE_EVENTS.indexOf(type) > -1) { + elem.removeEventListener(type, data.dispatcher, { + 'passive': true + }); + } else { + elem.removeEventListener(type, data.dispatcher, false); + } } else if (elem.detachEvent) { elem.detachEvent('on' + type, data.dispatcher); } @@ -471,7 +483,7 @@ vjs.cleanUpEvents = function(elem, type) { * @return {Object} * @private */ -vjs.fixEvent = function(event) { +vjs.fixEvent = function (event) { function returnTrue() { return true; } function returnFalse() { return false; } @@ -581,18 +593,18 @@ vjs.fixEvent = function(event) { * @param {Event|Object|String} event A string (the type) or an event object with a type attribute * @private */ -vjs.trigger = function(elem, event) { +vjs.trigger = function (elem, event) { // Fetches element data and a reference to the parent (for bubbling). // Don't want to add a data object to cache for every parent, // so checking hasData first. var elemData = (vjs.hasData(elem)) ? vjs.getData(elem) : {}; var parent = elem.parentNode || elem.ownerDocument; - // type = event.type || event, - // handler; + // type = event.type || event, + // handler; // If an event name was passed as a string, creates an event out of it if (typeof event === 'string') { - event = { type:event, target:elem }; + event = { type: event, target: elem }; } // Normalizes the event properties. event = vjs.fixEvent(event); @@ -603,11 +615,11 @@ vjs.trigger = function(elem, event) { } // Unless explicitly stopped or the event does not bubble (e.g. media events) - // recursively calls this function to bubble the event up the DOM. - if (parent && !event.isPropagationStopped() && event.bubbles !== false) { + // recursively calls this function to bubble the event up the DOM. + if (parent && !event.isPropagationStopped() && event.bubbles !== false) { vjs.trigger(parent, event); - // If at the top of the DOM, triggers the default action unless disabled. + // If at the top of the DOM, triggers the default action unless disabled. } else if (!parent && !event.defaultPrevented) { var targetData = vjs.getData(event.target); @@ -654,11 +666,11 @@ vjs.trigger = function(elem, event) { * @param {Function} fn * @private */ -vjs.one = function(elem, type, fn) { +vjs.one = function (elem, type, fn) { if (vjs.obj.isArray(type)) { return _handleMultipleEvents(vjs.one, elem, type, fn); } - var func = function(){ + var func = function () { vjs.off(elem, type, func); fn.apply(this, arguments); }; @@ -676,7 +688,7 @@ vjs.one = function(elem, type, fn) { * @private */ function _handleMultipleEvents(fn, elem, type, callback) { - vjs.arr.forEach(type, function(type) { + vjs.arr.forEach(type, function (type) { fn(elem, type, callback); //Call the event method for each one of the types }); } @@ -689,7 +701,7 @@ var hasOwnProp = Object.prototype.hasOwnProperty; * @return {Element} * @private */ -vjs.createEl = function(tagName, properties){ +vjs.createEl = function (tagName, properties) { var el; tagName = tagName || 'div'; @@ -697,7 +709,7 @@ vjs.createEl = function(tagName, properties){ el = document.createElement(tagName); - vjs.obj.each(properties, function(propName, val){ + vjs.obj.each(properties, function (propName, val) { // Not remembering why we were checking for dash // but using setAttribute means you have to use getAttribute @@ -707,9 +719,9 @@ vjs.createEl = function(tagName, properties){ // browsers handle the attribute just fine. The W3C allows for aria-* attributes to be used in pre-HTML5 docs. // http://www.w3.org/TR/wai-aria-primer/#ariahtml. Using setAttribute gets around this problem. if (propName.indexOf('aria-') !== -1 || propName == 'role') { - el.setAttribute(propName, val); + el.setAttribute(propName, val); } else { - el[propName] = val; + el[propName] = val; } }); @@ -722,7 +734,7 @@ vjs.createEl = function(tagName, properties){ * @return {String} * @private */ -vjs.capitalize = function(string){ +vjs.capitalize = function (string) { return string.charAt(0).toUpperCase() + string.slice(1); }; @@ -742,9 +754,9 @@ vjs.obj = {}; * @param {Object} obj Object to use as prototype * @private */ -vjs.obj.create = Object.create || function(obj){ +vjs.obj.create = Object.create || function (obj) { //Create a new function called 'F' which is just an empty object. - function F() {} + function F() { } //the prototype of the 'F' function should point to the //parameter of the anonymous function. @@ -762,7 +774,7 @@ vjs.obj.create = Object.create || function(obj){ * @this {*} * @private */ -vjs.obj.each = function(obj, fn, context){ +vjs.obj.each = function (obj, fn, context) { for (var key in obj) { if (hasOwnProp.call(obj, key)) { fn.call(context || this, key, obj[key]); @@ -777,9 +789,9 @@ vjs.obj.each = function(obj, fn, context){ * @return {Object} * @private */ -vjs.obj.merge = function(obj1, obj2){ +vjs.obj.merge = function (obj1, obj2) { if (!obj2) { return obj1; } - for (var key in obj2){ + for (var key in obj2) { if (hasOwnProp.call(obj2, key)) { obj1[key] = obj2[key]; } @@ -796,14 +808,14 @@ vjs.obj.merge = function(obj1, obj2){ * @return {Object} New object. Obj1 and Obj2 will be untouched. * @private */ -vjs.obj.deepMerge = function(obj1, obj2){ +vjs.obj.deepMerge = function (obj1, obj2) { var key, val1, val2; // make a copy of obj1 so we're not overwriting original values. // like prototype.options_ and all sub options objects obj1 = vjs.obj.copy(obj1); - for (key in obj2){ + for (key in obj2) { if (hasOwnProp.call(obj2, key)) { val1 = obj1[key]; val2 = obj2[key]; @@ -825,7 +837,7 @@ vjs.obj.deepMerge = function(obj1, obj2){ * @return {Object} Copy of object * @private */ -vjs.obj.copy = function(obj){ +vjs.obj.copy = function (obj) { return vjs.obj.merge({}, obj); }; @@ -835,7 +847,7 @@ vjs.obj.copy = function(obj){ * @return {Boolean} True if plain, false otherwise * @private */ -vjs.obj.isPlain = function(obj){ +vjs.obj.isPlain = function (obj) { return !!obj && typeof obj === 'object' && obj.toString() === '[object Object]' @@ -849,7 +861,7 @@ vjs.obj.isPlain = function(obj){ * @return {Boolean} True if plain, false otherwise * @private */ -vjs.obj.isArray = Array.isArray || function(arr) { +vjs.obj.isArray = Array.isArray || function (arr) { return Object.prototype.toString.call(arr) === '[object Array]'; }; @@ -860,7 +872,7 @@ vjs.obj.isArray = Array.isArray || function(arr) { * @return {Boolean} True if NaN, false otherwise * @private */ -vjs.isNaN = function(num) { +vjs.isNaN = function (num) { return num !== num; }; @@ -873,12 +885,12 @@ vjs.isNaN = function(num) { * @return {Function} * @private */ -vjs.bind = function(context, fn, uid) { +vjs.bind = function (context, fn, uid) { // Make sure the function has a unique ID if (!fn.guid) { fn.guid = vjs.guid++; } // Create the new function that changes the context - var ret = function() { + var ret = function () { return fn.apply(context, arguments); }; @@ -923,7 +935,7 @@ vjs.expando = 'vdata' + (new Date()).getTime(); * @return {Object} * @private */ -vjs.getData = function(el){ +vjs.getData = function (el) { var id = el[vjs.expando]; if (!id) { id = el[vjs.expando] = vjs.guid++; @@ -940,7 +952,7 @@ vjs.getData = function(el){ * @return {Object} * @private */ -vjs.hasData = function(el){ +vjs.hasData = function (el) { var id = el[vjs.expando]; return !(!id || vjs.isEmpty(vjs.cache[id])); }; @@ -950,7 +962,7 @@ vjs.hasData = function(el){ * @param {Element} el Remove data for an element * @private */ -vjs.removeData = function(el){ +vjs.removeData = function (el) { var id = el[vjs.expando]; if (!id) { return; } // Remove all stored data @@ -962,7 +974,7 @@ vjs.removeData = function(el){ // Remove the expando property from the DOM node try { delete el[vjs.expando]; - } catch(e) { + } catch (e) { if (el.removeAttribute) { el.removeAttribute(vjs.expando); } else { @@ -978,7 +990,7 @@ vjs.removeData = function(el){ * @return {Boolean} * @private */ -vjs.isEmpty = function(obj) { +vjs.isEmpty = function (obj) { for (var prop in obj) { // Inlude null properties as empty. if (obj[prop] !== null) { @@ -994,7 +1006,7 @@ vjs.isEmpty = function(obj) { * @param {String} classToCheck Classname to check * @private */ -vjs.hasClass = function(element, classToCheck){ +vjs.hasClass = function (element, classToCheck) { return ((' ' + element.className + ' ').indexOf(' ' + classToCheck + ' ') !== -1); }; @@ -1005,7 +1017,7 @@ vjs.hasClass = function(element, classToCheck){ * @param {String} classToAdd Classname to add * @private */ -vjs.addClass = function(element, classToAdd){ +vjs.addClass = function (element, classToAdd) { if (!vjs.hasClass(element, classToAdd)) { element.className = element.className === '' ? classToAdd : element.className + ' ' + classToAdd; } @@ -1017,17 +1029,17 @@ vjs.addClass = function(element, classToAdd){ * @param {String} classToAdd Classname to remove * @private */ -vjs.removeClass = function(element, classToRemove){ +vjs.removeClass = function (element, classToRemove) { var classNames, i; - if (!vjs.hasClass(element, classToRemove)) {return;} + if (!vjs.hasClass(element, classToRemove)) { return; } classNames = element.className.split(' '); // no arr.indexOf in ie8, and we don't want to add a big shim for (i = classNames.length - 1; i >= 0; i--) { if (classNames[i] === classToRemove) { - classNames.splice(i,1); + classNames.splice(i, 1); } } @@ -1041,7 +1053,7 @@ vjs.removeClass = function(element, classToRemove){ * @private */ vjs.TEST_VID = vjs.createEl('video'); -(function() { +(function () { var track = document.createElement('track'); track.kind = 'captions'; track.srclang = 'en'; @@ -1068,13 +1080,13 @@ vjs.IS_IPAD = (/iPad/i).test(vjs.USER_AGENT); vjs.IS_IPOD = (/iPod/i).test(vjs.USER_AGENT); vjs.IS_IOS = vjs.IS_IPHONE || vjs.IS_IPAD || vjs.IS_IPOD; -vjs.IOS_VERSION = (function(){ +vjs.IOS_VERSION = (function () { var match = vjs.USER_AGENT.match(/OS (\d+)_/i); if (match && match[1]) { return match[1]; } })(); vjs.IS_ANDROID = (/Android/i).test(vjs.USER_AGENT); -vjs.ANDROID_VERSION = (function() { +vjs.ANDROID_VERSION = (function () { // This matches Android Major.Minor.Patch versions // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned var match = vjs.USER_AGENT.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i), @@ -1106,14 +1118,31 @@ vjs.IS_IE8 = (/MSIE\s8\.0/).test(vjs.USER_AGENT); vjs.TOUCH_ENABLED = !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch); vjs.BACKGROUND_SIZE_SUPPORTED = 'backgroundSize' in vjs.TEST_VID.style; +vjs.PASSIVE_LISTNERS_SUPPORTED = (function () { + var isPassiveSupported = false; + var opts; + try { + opts = Object.defineProperty({}, 'passive', { + get: function () { + isPassiveSupported = true; + } + }); + window.addEventListener('testPassive', null, opts); + window.removeEventListener('testPassive', null, opts); + } catch (e) { } + + return isPassiveSupported; +})(); +vjs.PASSIVE_EVENTS = ['touchstart', 'touchmove']; + /** * Apply attributes to an HTML element. * @param {Element} el Target element. * @param {Object=} attributes Element attributes to be applied. * @private */ -vjs.setElementAttributes = function(el, attributes){ - vjs.obj.each(attributes, function(attrName, attrValue) { +vjs.setElementAttributes = function (el, attributes) { + vjs.obj.each(attributes, function (attrName, attrValue) { if (attrValue === null || typeof attrValue === 'undefined' || attrValue === false) { el.removeAttribute(attrName); } else { @@ -1131,7 +1160,7 @@ vjs.setElementAttributes = function(el, attributes){ * @return {Object} * @private */ -vjs.getElementAttributes = function(tag){ +vjs.getElementAttributes = function (tag) { var obj, knownBooleans, attrs, attrName, attrVal; obj = {}; @@ -1139,7 +1168,7 @@ vjs.getElementAttributes = function(tag){ // known boolean attributes // we can check for matching boolean properties, but older browsers // won't know about HTML5 boolean attributes that we still read from - knownBooleans = ','+'autoplay,controls,loop,muted,default'+','; + knownBooleans = ',' + 'autoplay,controls,loop,muted,default' + ','; if (tag && tag.attributes && tag.attributes.length > 0) { attrs = tag.attributes; @@ -1150,7 +1179,7 @@ vjs.getElementAttributes = function(tag){ // check for known booleans // the matching element property will return a value for typeof - if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(','+attrName+',') !== -1) { + if (typeof tag[attrName] === 'boolean' || knownBooleans.indexOf(',' + attrName + ',') !== -1) { // the value of an included boolean attribute is typically an empty // string ('') which would equal false if we just check for a false value. // we also don't want support bad code like autoplay='false' @@ -1172,14 +1201,14 @@ vjs.getElementAttributes = function(tag){ * @return {String} Style value * @private */ -vjs.getComputedDimension = function(el, strCssRule){ +vjs.getComputedDimension = function (el, strCssRule) { var strValue = ''; - if(document.defaultView && document.defaultView.getComputedStyle){ + if (document.defaultView && document.defaultView.getComputedStyle) { strValue = document.defaultView.getComputedStyle(el, '').getPropertyValue(strCssRule); - } else if(el.currentStyle){ + } else if (el.currentStyle) { // IE8 Width/Height support - strValue = el['client'+strCssRule.substr(0,1).toUpperCase() + strCssRule.substr(1)] + 'px'; + strValue = el['client' + strCssRule.substr(0, 1).toUpperCase() + strCssRule.substr(1)] + 'px'; } return strValue; }; @@ -1190,7 +1219,7 @@ vjs.getComputedDimension = function(el, strCssRule){ * @param {[type]} parent Element to insert child into * @private */ -vjs.insertFirst = function(child, parent){ +vjs.insertFirst = function (child, parent) { if (parent.firstChild) { parent.insertBefore(child, parent.firstChild); } else { @@ -1212,7 +1241,7 @@ vjs.browser = {}; * @return {Element} Element with supplied ID * @private */ -vjs.el = function(id){ +vjs.el = function (id) { if (id.indexOf('#') === 0) { id = id.slice(1); } @@ -1229,14 +1258,14 @@ vjs.el = function(id){ * @return {String} Time formatted as H:MM:SS or M:SS * @private */ -vjs.formatTime = function(seconds, guide) { +vjs.formatTime = function (seconds, guide) { // Default to using seconds as guide guide = guide || seconds; var s = Math.floor(seconds % 60), - m = Math.floor(seconds / 60 % 60), - h = Math.floor(seconds / 3600), - gm = Math.floor(guide / 60 % 60), - gh = Math.floor(guide / 3600); + m = Math.floor(seconds / 60 % 60), + h = Math.floor(seconds / 3600), + gm = Math.floor(guide / 60 % 60), + gh = Math.floor(guide / 3600); // handle invalid times if (isNaN(seconds) || seconds === Infinity) { @@ -1259,12 +1288,12 @@ vjs.formatTime = function(seconds, guide) { }; // Attempt to block the ability to select text while dragging controls -vjs.blockTextSelection = function(){ +vjs.blockTextSelection = function () { document.body.focus(); document.onselectstart = function () { return false; }; }; // Turn off text selection blocking -vjs.unblockTextSelection = function(){ document.onselectstart = function () { return true; }; }; +vjs.unblockTextSelection = function () { document.onselectstart = function () { return true; }; }; /** * Trim whitespace from the ends of a string. @@ -1272,8 +1301,8 @@ vjs.unblockTextSelection = function(){ document.onselectstart = function () { re * @return {String} Trimmed string * @private */ -vjs.trim = function(str){ - return (str+'').replace(/^\s+|\s+$/g, ''); +vjs.trim = function (str) { + return (str + '').replace(/^\s+|\s+$/g, ''); }; /** @@ -1283,9 +1312,9 @@ vjs.trim = function(str){ * @return {Number} Rounded number * @private */ -vjs.round = function(num, dec) { +vjs.round = function (num, dec) { if (!dec) { dec = 0; } - return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec); + return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); }; /** @@ -1298,14 +1327,14 @@ vjs.round = function(num, dec) { * @return {Object} Fake TimeRange object * @private */ -vjs.createTimeRange = function(start, end){ +vjs.createTimeRange = function (start, end) { if (start === undefined && end === undefined) { return { length: 0, - start: function() { + start: function () { throw new Error('This TimeRanges object is empty'); }, - end: function() { + end: function () { throw new Error('This TimeRanges object is empty'); } }; @@ -1313,8 +1342,8 @@ vjs.createTimeRange = function(start, end){ return { length: 1, - start: function() { return start; }, - end: function() { return end; } + start: function () { return start; }, + end: function () { return end; } }; }; @@ -1322,13 +1351,13 @@ vjs.createTimeRange = function(start, end){ * Add to local storage (may removable) * @private */ -vjs.setLocalStorage = function(key, value){ +vjs.setLocalStorage = function (key, value) { try { // IE was throwing errors referencing the var anywhere without this var localStorage = window.localStorage || false; if (!localStorage) { return; } localStorage[key] = value; - } catch(e) { + } catch (e) { if (e.code == 22 || e.code == 1014) { // Webkit == 22 / Firefox == 1014 vjs.log('LocalStorage Full (VideoJS)', e); } else { @@ -1348,13 +1377,13 @@ vjs.setLocalStorage = function(key, value){ * @return {String} Absolute URL * @private */ -vjs.getAbsoluteURL = function(url){ +vjs.getAbsoluteURL = function (url) { // Check if absolute URL if (!url.match(/^https?:\/\//)) { // Convert to absolute URL. Flash hosted off-site needs an absolute URL. url = vjs.createEl('div', { - innerHTML: 'x' + innerHTML: 'x' }).firstChild.href; } @@ -1367,7 +1396,7 @@ vjs.getAbsoluteURL = function(url){ * @param {String} url The url to parse * @return {Object} An object of url details */ -vjs.parseUrl = function(url) { +vjs.parseUrl = function (url) { var div, a, addToBody, props, details; props = ['protocol', 'hostname', 'port', 'pathname', 'search', 'hash', 'host']; @@ -1381,7 +1410,7 @@ vjs.parseUrl = function(url) { addToBody = (a.host === '' && a.protocol !== 'file:'); if (addToBody) { div = vjs.createEl('div'); - div.innerHTML = ''; + div.innerHTML = ''; a = div.firstChild; // prevent the div from affecting layout div.setAttribute('style', 'display:none; position:absolute;'); @@ -1419,7 +1448,7 @@ vjs.parseUrl = function(url) { * @param {[type]} args The args to be passed to the log * @private */ -function _logType(type, args){ +function _logType(type, args) { var argsArray, noop, console; // convert args to an array to get array functions @@ -1428,7 +1457,7 @@ function _logType(type, args){ // they will still be stored in vjs.log.history // Was setting these once outside of this function, but containing them // in the function makes it easier to test cases where console doesn't exist - noop = function(){}; + noop = function () { }; console = window['console'] || { 'log': noop, 'warn': noop, @@ -1437,7 +1466,7 @@ function _logType(type, args){ if (type) { // add the type to the front of the message - argsArray.unshift(type.toUpperCase()+':'); + argsArray.unshift(type.toUpperCase() + ':'); } else { // default to log with no prefix type = 'log'; @@ -1461,7 +1490,7 @@ function _logType(type, args){ /** * Log plain debug messages */ -vjs.log = function(){ +vjs.log = function () { _logType(null, arguments); }; @@ -1474,20 +1503,20 @@ vjs.log.history = []; /** * Log error messages */ -vjs.log.error = function(){ +vjs.log.error = function () { _logType('error', arguments); }; /** * Log warning messages */ -vjs.log.warn = function(){ +vjs.log.warn = function () { _logType('warn', arguments); }; // Offset Left // getBoundingClientRect technique from John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/ -vjs.findPosition = function(el) { +vjs.findPosition = function (el) { var box, docEl, body, clientLeft, scrollLeft, left, clientTop, scrollTop, top; if (el.getBoundingClientRect && el.parentNode) { @@ -1534,7 +1563,7 @@ vjs.arr = {}; * @returns {Array} The array * @private */ -vjs.arr.forEach = function(array, callback, thisArg) { +vjs.arr.forEach = function (array, callback, thisArg) { if (vjs.obj.isArray(array) && callback instanceof Function) { for (var i = 0, len = array.length; i < len; ++i) { callback.call(thisArg || vjs, array[i], i, array); diff --git a/dist/video-js/video.js b/dist/video-js/video.js index be45e2a2d5..8605f575fc 100644 --- a/dist/video-js/video.js +++ b/dist/video-js/video.js @@ -1,154 +1,156 @@ /*! Video.js v4.12.10-notrack Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */ (function() {var b=void 0,f=!0,j=null,k=!1;function m(){return function(){}}function n(a){return function(){return this[a]}}function p(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio"); -function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.ha[a])return c&&t.log.warn('Player "'+a+'" is already initialised. Options will not be applied.'),d&&t.ha[a].G(d),t.ha[a];a=t.z(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}var videojs=window.videojs=t;t.Gb="4.12";t.Ec="https:"==document.location.protocol?"https://":"http://";t.VERSION="4.12.10-notrack"; -t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.qe||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."}; -"GENERATED_CDN_VSN"!==t.Gb&&(videojs.options.flash.swf=t.Ec+"vjs.zencdn.net/"+t.Gb+"/video-js.swf");t.Rc=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.Q.fa(t.options.languages[a],c):c;return t.options.languages};t.ha={};"function"===typeof define&&define.amd?define("videojs",[],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.ka=t.CoreObject=m(); +function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.ha[a])return c&&t.log.warn('Player "'+a+'" is already initialised. Options will not be applied.'),d&&t.ha[a].G(d),t.ha[a];a=t.z(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}var videojs=window.videojs=t;t.Gb="4.12";t.Gc="https:"==document.location.protocol?"https://":"http://";t.VERSION="4.12.10-notrack"; +t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.se||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."}; +"GENERATED_CDN_VSN"!==t.Gb&&(videojs.options.flash.swf=t.Gc+"vjs.zencdn.net/"+t.Gb+"/video-js.swf");t.Tc=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.R.fa(t.options.languages[a],c):c;return t.options.languages};t.ha={};"function"===typeof define&&define.amd?define("videojs",[],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.ka=t.CoreObject=m(); t.ka.extend=function(a){var c,d;a=a||{};c=a.init||a.n||this.prototype.init||this.prototype.n||m();d=function(){c.apply(this,arguments)};d.prototype=t.h.create(this.prototype);d.prototype.constructor=d;d.extend=t.ka.extend;d.create=t.ka.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.ka.create=function(){var a=t.h.create(this.prototype);this.apply(a,arguments);return a}; -t.c=function(a,c,d){if(t.h.isArray(c))return u(t.c,a,c,d);var e=t.getData(a);e.C||(e.C={});e.C[c]||(e.C[c]=[]);d.r||(d.r=t.r++);e.C[c].push(d);e.R||(e.disabled=k,e.R=function(c){if(!e.disabled){c=t.ob(c);var d=e.C[c.type];if(d)for(var d=d.slice(0),l=0,q=d.length;lt.Fb;t.Ic=/Firefox/i.test(t.J);t.de=/Chrome/i.test(t.J);t.ee=/MSIE\s8\.0/.test(t.J);t.bb=!!("ontouchstart"in window||window.Gc&&document instanceof window.Gc);t.Fc="backgroundSize"in t.A.style; -t.sc=function(a,c){t.h.S(c,function(c,e){e===j||"undefined"===typeof e||e===k?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};t.Ja=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.Uc=function(){document.body.focus();document.onselectstart=p(k)};t.Yd=function(){document.onselectstart=p(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)}; -t.qa=function(a,c){return a===b&&c===b?{length:0,start:function(){throw Error("This TimeRanges object is empty");},end:function(){throw Error("This TimeRanges object is empty");}}:{length:1,start:function(){return a},end:function(){return c}}};t.Nd=function(a){try{var c=window.localStorage||k;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}}; -t.hd=function(a){a.match(/^https?:\/\//)||(a=t.d("div",{innerHTML:'x'}).firstChild.href);return a}; -t.Id=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.d("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.d("div"),c.innerHTML='',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;ht.Fb;t.Kc=/Firefox/i.test(t.J);t.fe=/Chrome/i.test(t.J);t.ge=/MSIE\s8\.0/.test(t.J);t.bb=!!("ontouchstart"in window||window.Ic&&document instanceof window.Ic);t.Hc="backgroundSize"in t.A.style;var ca=t,D=k,E; +try{E=Object.defineProperty({},"passive",{get:function(){D=f}}),window.addEventListener("testPassive",j,E),window.removeEventListener("testPassive",j,E)}catch(da){}ca.Kb=D;t.Jb=["touchstart","touchmove"];t.uc=function(a,c){t.h.S(c,function(c,e){e===j||"undefined"===typeof e||e===k?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})}; +t.Ja=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.Wc=function(){document.body.focus();document.onselectstart=p(k)};t.$d=function(){document.onselectstart=p(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)}; +t.qa=function(a,c){return a===b&&c===b?{length:0,start:function(){throw Error("This TimeRanges object is empty");},end:function(){throw Error("This TimeRanges object is empty");}}:{length:1,start:function(){return a},end:function(){return c}}};t.Pd=function(a){try{var c=window.localStorage||k;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}}; +t.kd=function(a){a.match(/^https?:\/\//)||(a=t.d("div",{innerHTML:'x'}).firstChild.href);return a}; +t.Kd=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.d("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.d("div"),c.innerHTML='',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;he&&(a.preventDefault(),this.l("tap")))})} +s.G=function(a){a&&(this.ea?a.call(this):(this.Oa===b&&(this.Oa=[]),this.Oa.push(a)));return this};s.za=function(){this.ea=f;var a=this.Oa;if(a&&0e&&(a.preventDefault(),this.l("tap")))})} s.setTimeout=function(a,c){function d(){this.clearTimeout(e)}a=t.bind(this,a);var e=setTimeout(a,c);d.r="vjs-timeout-"+e;this.c("dispose",d);return e};s.clearTimeout=function(a){function c(){}clearTimeout(a);c.r="vjs-timeout-"+a;this.i("dispose",c);return a};s.setInterval=function(a,c){function d(){this.clearInterval(e)}a=t.bind(this,a);var e=setInterval(a,c);d.r="vjs-interval-"+e;this.c("dispose",d);return e}; -s.clearInterval=function(a){function c(){}clearInterval(a);c.r="vjs-interval-"+a;this.i("dispose",c);return a};t.t=t.a.extend({n:function(a,c){t.a.call(this,a,c);G(this);this.c("tap",this.v);this.c("click",this.v);this.c("focus",this.Ma);this.c("blur",this.La)}});s=t.t.prototype; +s.clearInterval=function(a){function c(){}clearInterval(a);c.r="vjs-interval-"+a;this.i("dispose",c);return a};t.t=t.a.extend({n:function(a,c){t.a.call(this,a,c);I(this);this.c("tap",this.v);this.c("click",this.v);this.c("focus",this.Ma);this.c("blur",this.La)}});s=t.t.prototype; s.d=function(a,c){var d;c=t.h.B({className:this.O(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.d.call(this,a,c);c.innerHTML||(this.u=t.d("div",{className:"vjs-control-content"}),this.ib=t.d("span",{className:"vjs-control-text",innerHTML:this.s(this.hb)||"Need Text"}),this.u.appendChild(this.ib),d.appendChild(this.u));return d};s.O=function(){return"vjs-control "+t.a.prototype.O.call(this)};s.v=m();s.Ma=function(){t.c(document,"keydown",t.bind(this,this.Y))}; -s.Y=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.v()};s.La=function(){t.i(document,"keydown",t.bind(this,this.Y))};t.N=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.Tc=this.Ia(this.o.barName);this.handle=this.Ia(this.o.handleName);this.c("mousedown",this.Na);this.c("touchstart",this.Na);this.c("focus",this.Ma);this.c("blur",this.La);this.c("click",this.v);this.c(a,"controlsvisible",this.update);this.c(a,this.nc,this.update)}});s=t.N.prototype; -s.d=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.h.B({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.d.call(this,a,c)};s.Na=function(a){a.preventDefault();t.Uc();this.j("vjs-sliding");this.c(document,"mousemove",this.Z);this.c(document,"mouseup",this.ga);this.c(document,"touchmove",this.Z);this.c(document,"touchend",this.ga);this.Z(a)};s.Z=m(); -s.ga=function(){t.Yd();this.q("vjs-sliding");this.i(document,"mousemove",this.Z);this.i(document,"mouseup",this.ga);this.i(document,"touchmove",this.Z);this.i(document,"touchend",this.ga);this.update()};s.update=function(){if(this.b){var a,c=this.qb(),d=this.handle,e=this.Tc;if("number"!==typeof c||c!==c||0>c||Infinity===c)c=0;a=c;if(d){a=this.b.offsetWidth;var g=d.z().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.z().style.left=t.round(100*c,2)+"%"}e&&(e.z().style.width=t.round(100*a,2)+"%")}}; -function H(a,c){var d,e,g,h;d=a.b;e=t.fd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.z().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.z().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Ma=function(){this.c(document,"keydown",this.Y)}; -s.Y=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.wc();else if(38==a.which||39==a.which)a.preventDefault(),this.xc()};s.La=function(){this.i(document,"keydown",this.Y)};s.v=function(a){a.stopImmediatePropagation();a.preventDefault()};t.V=t.a.extend();t.V.prototype.defaultValue=0;t.V.prototype.d=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.h.B({innerHTML:''+this.defaultValue+""},c);return t.a.prototype.d.call(this,"div",c)}; -t.la=t.a.extend();function ca(a,c){a.ca(c);c.c("click",t.bind(a,function(){E(this)}))}t.la.prototype.d=function(){var a=this.options().Vb||"ul";this.u=t.d(a,{className:"vjs-menu-content"});a=t.a.prototype.d.call(this,"div",{append:this.u,className:"vjs-menu"});a.appendChild(this.u);t.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.U=t.t.extend({n:function(a,c){t.t.call(this,a,c);this.selected(c.selected)}}); +s.Y=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.v()};s.La=function(){t.i(document,"keydown",t.bind(this,this.Y))};t.N=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.Vc=this.Ia(this.o.barName);this.handle=this.Ia(this.o.handleName);this.c("mousedown",this.Na);this.c("touchstart",this.Na);this.c("focus",this.Ma);this.c("blur",this.La);this.c("click",this.v);this.c(a,"controlsvisible",this.update);this.c(a,this.pc,this.update)}});s=t.N.prototype; +s.d=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.h.B({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.d.call(this,a,c)};s.Na=function(a){a.preventDefault();t.Wc();this.j("vjs-sliding");this.c(document,"mousemove",this.Z);this.c(document,"mouseup",this.ga);this.c(document,"touchmove",this.Z);this.c(document,"touchend",this.ga);this.Z(a)};s.Z=m(); +s.ga=function(){t.$d();this.q("vjs-sliding");this.i(document,"mousemove",this.Z);this.i(document,"mouseup",this.ga);this.i(document,"touchmove",this.Z);this.i(document,"touchend",this.ga);this.update()};s.update=function(){if(this.b){var a,c=this.qb(),d=this.handle,e=this.Vc;if("number"!==typeof c||c!==c||0>c||Infinity===c)c=0;a=c;if(d){a=this.b.offsetWidth;var g=d.z().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.z().style.left=t.round(100*c,2)+"%"}e&&(e.z().style.width=t.round(100*a,2)+"%")}}; +function J(a,c){var d,e,g,h;d=a.b;e=t.hd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.z().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.z().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Ma=function(){this.c(document,"keydown",this.Y)}; +s.Y=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.yc();else if(38==a.which||39==a.which)a.preventDefault(),this.zc()};s.La=function(){this.i(document,"keydown",this.Y)};s.v=function(a){a.stopImmediatePropagation();a.preventDefault()};t.V=t.a.extend();t.V.prototype.defaultValue=0;t.V.prototype.d=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.h.B({innerHTML:''+this.defaultValue+""},c);return t.a.prototype.d.call(this,"div",c)}; +t.la=t.a.extend();function ea(a,c){a.ca(c);c.c("click",t.bind(a,function(){G(this)}))}t.la.prototype.d=function(){var a=this.options().Xb||"ul";this.u=t.d(a,{className:"vjs-menu-content"});a=t.a.prototype.d.call(this,"div",{append:this.u,className:"vjs-menu"});a.appendChild(this.u);t.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.U=t.t.extend({n:function(a,c){t.t.call(this,a,c);this.selected(c.selected)}}); t.U.prototype.d=function(a,c){return t.t.prototype.d.call(this,"li",t.h.B({className:"vjs-menu-item",innerHTML:this.s(this.o.label)},c))};t.U.prototype.v=function(){this.selected(f)};t.U.prototype.selected=function(a){a?(this.j("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.q("vjs-selected"),this.b.setAttribute("aria-selected",k))}; -t.M=t.t.extend({n:function(a,c){t.t.call(this,a,c);this.update();this.c("keydown",this.Y);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.M.prototype;s.update=function(){var a=this.kb();this.ua&&this.removeChild(this.ua);this.ua=a;this.ca(a);this.P&&0===this.P.length?this.sb():this.P&&1a&&(a=Infinity),this.duration(a),Infinity===a?this.j("vjs-live"):this.q("vjs-live"))};s.Ad=function(){this.isFullscreen()?this.j("vjs-fullscreen"):this.q("vjs-fullscreen")}; -function T(a,c,d){if(a.m&&!a.m.ea)a.m.G(function(){this[c](d)});else try{a.m[c](d)}catch(e){throw t.log(e),e;}}function S(a,c){if(a.m&&a.m.ea)try{return a.m[c]()}catch(d){throw a.m[c]===b?t.log("Video.js: "+c+" method not defined for "+a.ya+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.ya+" playback technology element.",d),a.m.ea=k):t.log(d),d;}}s.play=function(){T(this,"play");return this};s.pause=function(){T(this,"pause");return this}; -s.paused=function(){return S(this,"paused")===k?k:f};s.currentTime=function(a){return a!==b?(T(this,"setCurrentTime",a),this):this.F.currentTime=S(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.F.duration=parseFloat(a),this;this.F.duration===b&&this.lc();return this.F.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=S(this,"buffered");if(!a||!a.length)a=t.qa(0,0);return a}; -s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;ha&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.F.volume=a,T(this,"setVolume",a),t.Nd(a),this;a=parseFloat(S(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(T(this,"setMuted",a),this):S(this,"muted")||k};s.xa=function(){return S(this,"supportsFullScreen")||k};s.fc=k; -s.isFullscreen=function(a){return a!==b?(this.fc=!!a,this):this.fc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)}; -s.requestFullscreen=function(){var a=t.Ca.pb;this.isFullscreen(f);a?(t.c(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===k&&t.i(document,a.fullscreenchange,arguments.callee);this.l("fullscreenchange")})),this.b[a.requestFullscreen]()):this.m.xa()?T(this,"enterFullScreen"):(this.$b(),this.l("fullscreenchange"));return this}; -s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Ca.pb;this.isFullscreen(k);if(a)document[a.exitFullscreen]();else this.m.xa()?T(this,"exitFullScreen"):(this.mb(),this.l("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()}; -s.$b=function(){this.od=f;this.cd=document.documentElement.style.overflow;t.c(document,"keydown",t.bind(this,this.ac));document.documentElement.style.overflow="hidden";t.j(document.body,"vjs-full-window");this.l("enterFullWindow")};s.ac=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.mb())};s.mb=function(){this.od=k;t.i(document,"keydown",this.ac);document.documentElement.style.overflow=this.cd;t.q(document.body,"vjs-full-window");this.l("exitFullWindow")}; +this.userActive(k)},a))}},250)}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.kc;this.kc=a;return this};s.languages=n("ud");s.o=t.options;s.dispose=function(){this.l("dispose");this.i("dispose");t.ha[this.ta]=j;this.H&&this.H.player&&(this.H.player=j);this.b&&this.b.player&&(this.b.player=j);this.m&&this.m.dispose();t.a.prototype.dispose.call(this)}; +function fa(a){var c,d,e={sources:[]};c=t.Ja(a);d=c["data-setup"];d!==j&&t.h.B(c,t.JSON.parse(d||"{}"));t.h.B(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;ga&&(a=Infinity),this.duration(a),Infinity===a?this.j("vjs-live"):this.q("vjs-live"))};s.Cd=function(){this.isFullscreen()?this.j("vjs-fullscreen"):this.q("vjs-fullscreen")}; +function V(a,c,d){if(a.m&&!a.m.ea)a.m.G(function(){this[c](d)});else try{a.m[c](d)}catch(e){throw t.log(e),e;}}function U(a,c){if(a.m&&a.m.ea)try{return a.m[c]()}catch(d){throw a.m[c]===b?t.log("Video.js: "+c+" method not defined for "+a.ya+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.ya+" playback technology element.",d),a.m.ea=k):t.log(d),d;}}s.play=function(){V(this,"play");return this};s.pause=function(){V(this,"pause");return this}; +s.paused=function(){return U(this,"paused")===k?k:f};s.currentTime=function(a){return a!==b?(V(this,"setCurrentTime",a),this):this.F.currentTime=U(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.F.duration=parseFloat(a),this;this.F.duration===b&&this.nc();return this.F.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=U(this,"buffered");if(!a||!a.length)a=t.qa(0,0);return a}; +s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;ha&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.F.volume=a,V(this,"setVolume",a),t.Pd(a),this;a=parseFloat(U(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(V(this,"setMuted",a),this):U(this,"muted")||k};s.xa=function(){return U(this,"supportsFullScreen")||k};s.hc=k; +s.isFullscreen=function(a){return a!==b?(this.hc=!!a,this):this.hc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)}; +s.requestFullscreen=function(){var a=t.Ca.pb;this.isFullscreen(f);a?(t.c(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===k&&t.i(document,a.fullscreenchange,arguments.callee);this.l("fullscreenchange")})),this.b[a.requestFullscreen]()):this.m.xa()?V(this,"enterFullScreen"):(this.bc(),this.l("fullscreenchange"));return this}; +s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Ca.pb;this.isFullscreen(k);if(a)document[a.exitFullscreen]();else this.m.xa()?V(this,"exitFullScreen"):(this.mb(),this.l("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()}; +s.bc=function(){this.qd=f;this.ed=document.documentElement.style.overflow;t.c(document,"keydown",t.bind(this,this.cc));document.documentElement.style.overflow="hidden";t.j(document.body,"vjs-full-window");this.l("enterFullWindow")};s.cc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.mb())};s.mb=function(){this.qd=k;t.i(document,"keydown",this.cc);document.documentElement.style.overflow=this.ed;t.q(document.body,"vjs-full-window");this.l("exitFullWindow")}; s.selectSource=function(a){for(var c=0,d=this.o.techOrder;c'+this.s("Stream Type")+""+this.s("LIVE"),"aria-live":"off"});a.appendChild(this.u);return a};t.Kb=t.t.extend({n:function(a,c){t.t.call(this,a,c);this.c(a,"play",this.yb);this.c(a,"pause",this.xb)}});s=t.Kb.prototype;s.hb="Play"; +s.ended=function(){return U(this,"ended")};s.seeking=function(){return U(this,"seeking")};s.seekable=function(){return U(this,"seekable")};s.ja=f;s.reportUserActivity=function(){this.ja=f};s.Cb=f; +s.userActive=function(a){return a!==b?(a=!!a,a!==this.Cb&&((this.Cb=a)?(this.ja=f,this.q("vjs-user-inactive"),this.j("vjs-user-active"),this.l("useractive")):(this.ja=k,this.m&&this.m.I("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.q("vjs-user-active"),this.j("vjs-user-inactive"),this.l("userinactive"))),this):this.Cb};s.playbackRate=function(a){return a!==b?(V(this,"setPlaybackRate",a),this):this.m&&this.m.featuresPlaybackRate?U(this,"playbackRate"):1};s.gc=k; +function R(a,c){return c!==b?(a.gc=!!c,a):a.gc}s.networkState=function(){return U(this,"networkState")};s.readyState=function(){return U(this,"readyState")};t.Ta=t.a.extend();t.Ta.prototype.o={oe:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}};t.Ta.prototype.d=function(){return t.d("div",{className:"vjs-control-bar"})}; +t.Hb=t.a.extend({n:function(a,c){t.a.call(this,a,c)}});t.Hb.prototype.d=function(){var a=t.a.prototype.d.call(this,"div",{className:"vjs-live-controls vjs-control"});this.u=t.d("div",{className:"vjs-live-display",innerHTML:''+this.s("Stream Type")+""+this.s("LIVE"),"aria-live":"off"});a.appendChild(this.u);return a};t.Mb=t.t.extend({n:function(a,c){t.t.call(this,a,c);this.c(a,"play",this.yb);this.c(a,"pause",this.xb)}});s=t.Mb.prototype;s.hb="Play"; s.O=function(){return"vjs-play-control "+t.t.prototype.O.call(this)};s.v=function(){this.e.paused()?this.e.play():this.e.pause()};s.yb=function(){this.q("vjs-paused");this.j("vjs-playing");this.b.children[0].children[0].innerHTML=this.s("Pause")};s.xb=function(){this.q("vjs-playing");this.j("vjs-paused");this.b.children[0].children[0].innerHTML=this.s("Play")};t.Ua=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.T)}}); t.Ua.prototype.d=function(){var a=t.a.prototype.d.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.u=t.d("div",{className:"vjs-current-time-display",innerHTML:'Current Time 0:00',"aria-live":"off"});a.appendChild(this.u);return a};t.Ua.prototype.T=function(){var a=this.e.Pa?this.e.F.currentTime:this.e.currentTime();this.u.innerHTML=''+this.s("Current Time")+" "+t.ra(a,this.e.duration())}; t.Va=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.T);this.c(a,"loadedmetadata",this.T)}});t.Va.prototype.d=function(){var a=t.a.prototype.d.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.u=t.d("div",{className:"vjs-duration-display",innerHTML:''+this.s("Duration Time")+" 0:00","aria-live":"off"});a.appendChild(this.u);return a}; -t.Va.prototype.T=function(){var a=this.e.duration();a&&(this.u.innerHTML=''+this.s("Duration Time")+" "+t.ra(a))};t.Ob=t.a.extend({n:function(a,c){t.a.call(this,a,c)}});t.Ob.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-time-divider",innerHTML:"
/
"})};t.ab=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.T)}}); +t.Va.prototype.T=function(){var a=this.e.duration();a&&(this.u.innerHTML=''+this.s("Duration Time")+" "+t.ra(a))};t.Qb=t.a.extend({n:function(a,c){t.a.call(this,a,c)}});t.Qb.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-time-divider",innerHTML:"
/
"})};t.ab=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.T)}}); t.ab.prototype.d=function(){var a=t.a.prototype.d.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.u=t.d("div",{className:"vjs-remaining-time-display",innerHTML:''+this.s("Remaining Time")+" -0:00","aria-live":"off"});a.appendChild(this.u);return a};t.ab.prototype.T=function(){this.e.duration()&&(this.u.innerHTML=''+this.s("Remaining Time")+" -"+t.ra(this.e.remainingTime()))}; t.Aa=t.t.extend({n:function(a,c){t.t.call(this,a,c)}});t.Aa.prototype.hb="Fullscreen";t.Aa.prototype.O=function(){return"vjs-fullscreen-control "+t.t.prototype.O.call(this)};t.Aa.prototype.v=function(){this.e.isFullscreen()?(this.e.exitFullscreen(),this.ib.innerHTML=this.s("Fullscreen")):(this.e.requestFullscreen(),this.ib.innerHTML=this.s("Non-Fullscreen"))};t.$a=t.a.extend({n:function(a,c){t.a.call(this,a,c)}});t.$a.prototype.o={children:{seekBar:{}}}; -t.$a.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.Nb=t.N.extend({n:function(a,c){t.N.call(this,a,c);this.c(a,"timeupdate",this.ia);a.G(t.bind(this,this.ia))}});s=t.Nb.prototype;s.o={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.nc="timeupdate";s.d=function(){return t.N.prototype.d.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})}; -s.ia=function(){var a=this.e.Pa?this.e.F.currentTime:this.e.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.qb(),2));this.b.setAttribute("aria-valuetext",t.ra(a,this.e.duration()))};s.qb=function(){return this.e.currentTime()/this.e.duration()};s.Na=function(a){t.N.prototype.Na.call(this,a);this.e.Pa=f;this.e.j("vjs-scrubbing");this.$d=!this.e.paused();this.e.pause()};s.Z=function(a){a=H(this,a)*this.e.duration();a==this.e.duration()&&(a-=0.1);this.e.currentTime(a)}; -s.ga=function(a){t.N.prototype.ga.call(this,a);this.e.Pa=k;this.e.q("vjs-scrubbing");this.$d&&this.e.play()};s.xc=function(){this.e.currentTime(this.e.currentTime()+5)};s.wc=function(){this.e.currentTime(this.e.currentTime()-5)};t.Ya=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.c(a,"progress",this.update)}});t.Ya.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.s("Loaded")+": 0%"})}; -t.Ya.prototype.update=function(){var a,c,d,e,g=this.e.buffered();a=this.e.duration();var h,l=this.e;h=l.buffered();l=l.duration();h=h.end(h.length-1);h>l&&(h=l);l=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;ag.length;a--)this.b.removeChild(l[a-1])};t.Jb=t.a.extend({n:function(a,c){t.a.call(this,a,c)}}); -t.Jb.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-play-progress",innerHTML:''+this.s("Progress")+": 0%"})};t.Ba=t.V.extend({n:function(a,c){t.V.call(this,a,c);this.c(a,"timeupdate",this.T)}});t.Ba.prototype.defaultValue="00:00";t.Ba.prototype.d=function(){return t.V.prototype.d.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})}; +t.$a.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.Pb=t.N.extend({n:function(a,c){t.N.call(this,a,c);this.c(a,"timeupdate",this.ia);a.G(t.bind(this,this.ia))}});s=t.Pb.prototype;s.o={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.pc="timeupdate";s.d=function(){return t.N.prototype.d.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})}; +s.ia=function(){var a=this.e.Pa?this.e.F.currentTime:this.e.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.qb(),2));this.b.setAttribute("aria-valuetext",t.ra(a,this.e.duration()))};s.qb=function(){return this.e.currentTime()/this.e.duration()};s.Na=function(a){t.N.prototype.Na.call(this,a);this.e.Pa=f;this.e.j("vjs-scrubbing");this.be=!this.e.paused();this.e.pause()};s.Z=function(a){a=J(this,a)*this.e.duration();a==this.e.duration()&&(a-=0.1);this.e.currentTime(a)}; +s.ga=function(a){t.N.prototype.ga.call(this,a);this.e.Pa=k;this.e.q("vjs-scrubbing");this.be&&this.e.play()};s.zc=function(){this.e.currentTime(this.e.currentTime()+5)};s.yc=function(){this.e.currentTime(this.e.currentTime()-5)};t.Ya=t.a.extend({n:function(a,c){t.a.call(this,a,c);this.c(a,"progress",this.update)}});t.Ya.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.s("Loaded")+": 0%"})}; +t.Ya.prototype.update=function(){var a,c,d,e,g=this.e.buffered();a=this.e.duration();var h,l=this.e;h=l.buffered();l=l.duration();h=h.end(h.length-1);h>l&&(h=l);l=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;ag.length;a--)this.b.removeChild(l[a-1])};t.Lb=t.a.extend({n:function(a,c){t.a.call(this,a,c)}}); +t.Lb.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-play-progress",innerHTML:''+this.s("Progress")+": 0%"})};t.Ba=t.V.extend({n:function(a,c){t.V.call(this,a,c);this.c(a,"timeupdate",this.T)}});t.Ba.prototype.defaultValue="00:00";t.Ba.prototype.d=function(){return t.V.prototype.d.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})}; t.Ba.prototype.T=function(){var a=this.e.Pa?this.e.F.currentTime:this.e.currentTime();this.b.innerHTML=''+t.ra(a,this.e.duration())+""};t.eb=t.a.extend({n:function(a,c){t.a.call(this,a,c);a.m&&a.m.featuresVolumeControl===k&&this.j("vjs-hidden");this.c(a,"loadstart",function(){a.m.featuresVolumeControl===k?this.j("vjs-hidden"):this.q("vjs-hidden")})}});t.eb.prototype.o={children:{volumeBar:{}}}; t.eb.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.cb=t.N.extend({n:function(a,c){t.N.call(this,a,c);this.c(a,"volumechange",this.ia);a.G(t.bind(this,this.ia))}});s=t.cb.prototype;s.ia=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.e.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.e.volume(),2)+"%")};s.o={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"}; -s.nc="volumechange";s.d=function(){return t.N.prototype.d.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.Z=function(a){this.e.muted()&&this.e.muted(k);this.e.volume(H(this,a))};s.qb=function(){return this.e.muted()?0:this.e.volume()};s.xc=function(){this.e.volume(this.e.volume()+0.1)};s.wc=function(){this.e.volume(this.e.volume()-0.1)};t.Pb=t.a.extend({n:function(a,c){t.a.call(this,a,c)}}); -t.Pb.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};t.fb=t.V.extend();t.fb.prototype.defaultValue="00:00";t.fb.prototype.d=function(){return t.V.prototype.d.call(this,"div",{className:"vjs-volume-handle"})}; +s.pc="volumechange";s.d=function(){return t.N.prototype.d.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.Z=function(a){this.e.muted()&&this.e.muted(k);this.e.volume(J(this,a))};s.qb=function(){return this.e.muted()?0:this.e.volume()};s.zc=function(){this.e.volume(this.e.volume()+0.1)};s.yc=function(){this.e.volume(this.e.volume()-0.1)};t.Rb=t.a.extend({n:function(a,c){t.a.call(this,a,c)}}); +t.Rb.prototype.d=function(){return t.a.prototype.d.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};t.fb=t.V.extend();t.fb.prototype.defaultValue="00:00";t.fb.prototype.d=function(){return t.V.prototype.d.call(this,"div",{className:"vjs-volume-handle"})}; t.ba=t.t.extend({n:function(a,c){t.t.call(this,a,c);this.c(a,"volumechange",this.update);a.m&&a.m.featuresVolumeControl===k&&this.j("vjs-hidden");this.c(a,"loadstart",function(){a.m.featuresVolumeControl===k?this.j("vjs-hidden"):this.q("vjs-hidden")})}});t.ba.prototype.d=function(){return t.t.prototype.d.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'
'+this.s("Mute")+"
"})}; t.ba.prototype.v=function(){this.e.muted(this.e.muted()?k:f)};t.ba.prototype.update=function(){var a=this.e.volume(),c=3;0===a||this.e.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.e.muted()?this.b.children[0].children[0].innerHTML!=this.s("Unmute")&&(this.b.children[0].children[0].innerHTML=this.s("Unmute")):this.b.children[0].children[0].innerHTML!=this.s("Mute")&&(this.b.children[0].children[0].innerHTML=this.s("Mute"));for(a=0;4>a;a++)t.q(this.b,"vjs-vol-"+a);t.j(this.b,"vjs-vol-"+c)}; -t.ma=t.M.extend({n:function(a,c){t.M.call(this,a,c);this.c(a,"volumechange",this.ae);a.m&&a.m.featuresVolumeControl===k&&this.j("vjs-hidden");this.c(a,"loadstart",function(){a.m.featuresVolumeControl===k?this.j("vjs-hidden"):this.q("vjs-hidden")});this.j("vjs-menu-button")}});t.ma.prototype.kb=function(){var a=new t.la(this.e,{Vb:"div"}),c=new t.cb(this.e,this.o.volumeBar);c.c("focus",function(){a.j("vjs-lock-showing")});c.c("blur",function(){E(a)});a.ca(c);return a}; -t.ma.prototype.v=function(){t.ba.prototype.v.call(this);t.M.prototype.v.call(this)};t.ma.prototype.d=function(){return t.t.prototype.d.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'
'+this.s("Mute")+"
"})};t.ma.prototype.ae=t.ba.prototype.update;t.Lb=t.M.extend({n:function(a,c){t.M.call(this,a,c);this.Cc();this.Bc();this.c(a,"loadstart",this.Cc);this.c(a,"ratechange",this.Bc)}});s=t.Lb.prototype;s.hb="Playback Rate"; -s.className="vjs-playback-rate";s.d=function(){var a=t.M.prototype.d.call(this);this.hc=t.d("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.hc);return a};s.kb=function(){var a=new t.la(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.ca(new t.Za(this.k(),{rate:c[d]+"x"}));return a};s.ia=function(){this.z().setAttribute("aria-valuenow",this.k().playbackRate())}; -s.v=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;ea){d=c[e];break}this.k().playbackRate(d)};function V(a){return a.k().m&&a.k().m.featuresPlaybackRate&&a.k().options().playbackRates&&0'+this.s("Mute")+""})};t.ma.prototype.ce=t.ba.prototype.update;t.Nb=t.M.extend({n:function(a,c){t.M.call(this,a,c);this.Ec();this.Dc();this.c(a,"loadstart",this.Ec);this.c(a,"ratechange",this.Dc)}});s=t.Nb.prototype;s.hb="Playback Rate"; +s.className="vjs-playback-rate";s.d=function(){var a=t.M.prototype.d.call(this);this.jc=t.d("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.jc);return a};s.kb=function(){var a=new t.la(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.ca(new t.Za(this.k(),{rate:c[d]+"x"}));return a};s.ia=function(){this.z().setAttribute("aria-valuenow",this.k().playbackRate())}; +s.v=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;ea){d=c[e];break}this.k().playbackRate(d)};function ha(a){return a.k().m&&a.k().m.featuresPlaybackRate&&a.k().options().playbackRates&&0