1 line
1.3 MiB
JavaScript
1 line
1.3 MiB
JavaScript
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self,e.videojs=t(e.window,e.document))}(this,function(e,t){function n(e){var t,r="info",i=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];t("log",r,n)};return t=bt(e,i),i.createLogger=function(t){return n(e+": "+t)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},i.level=function(e){if("string"==typeof e){if(!i.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},i.history=function(){return _t?[].concat(_t):[]},i.history.filter=function(e){return(_t||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},i.history.clear=function(){_t&&(_t.length=0)},i.history.disable=function(){null!==_t&&(_t.length=0,_t=null)},i.history.enable=function(){null===_t&&(_t=[])},i.error=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t("error",r,n)},i.warn=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t("warn",r,n)},i.debug=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t("debug",r,n)},i}function r(e,t){kt(e).forEach(function(n){return t(e[n],n)})}function i(e,t,n){return void 0===n&&(n=0),kt(e).reduce(function(n,r){return t(n,e[r],r)},n)}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[e].concat(n)):(n.forEach(function(t){t&&r(t,function(t,n){e[n]=t})}),e)}function o(e){return!!e&&"object"==typeof e}function s(e){return o(e)&&"[object Object]"===wt.call(e)&&e.constructor===Object}function u(t,n){if(!t||!n)return"";if("function"==typeof e.getComputedStyle){var r=e.getComputedStyle(t);return r?r.getPropertyValue(n)||r[n]:""}return""}function l(e){return"string"==typeof e&&/\S/.test(e)}function c(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function d(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function f(){return t===e.document}function h(e){return o(e)&&1===e.nodeType}function p(){try{return e.parent!==e.self}catch(e){return!0}}function m(e){return function(n,r){if(!l(n))return t[e](null);l(r)&&(r=t.querySelector(r));var i=h(r)?r:t;return i[e]&&i[e](n)}}function v(e,n,r,i){void 0===e&&(e="div"),void 0===n&&(n={}),void 0===r&&(r={});var a=t.createElement(e);return Object.getOwnPropertyNames(n).forEach(function(e){var t=n[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Tt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+t+"."),a.setAttribute(e,t)):"textContent"===e?g(a,t):a[e]=t}),Object.getOwnPropertyNames(r).forEach(function(e){a.setAttribute(e,r[e])}),i&&M(a,i),a}function g(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function y(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function _(e,t){return c(t),e.classList?e.classList.contains(t):d(t).test(e.className)}function b(e,t){return e?(e.classList?e.classList.add(t):_(e,t)||(e.className=(e.className+" "+t).trim()),e):e}function T(e,t){return e?(e.classList?e.classList.remove(t):(c(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e):e}function S(e,t,n){var r=_(e,t);return"function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!r),n===r?e:(n?b(e,t):T(e,t),e)}function w(e,t){Object.getOwnPropertyNames(t).forEach(function(n){var r=t[n];null===r||void 0===r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)})}function k(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,a=n[r].value;"boolean"!=typeof e[i]&&-1===",autoplay,stretch,fluent,controls,playsinline,l
|