shaka-player 2.5.4 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.csslintrc +13 -0
- package/CHANGELOG.md +56 -0
- package/build/build.py +4 -1
- package/build/check.py +17 -0
- package/build/compiler.py +40 -0
- package/build/types/core +1 -0
- package/build/types/ui +4 -1
- package/demo/asset_card.js +41 -11
- package/demo/cast_receiver/receiver_app.css +19 -13
- package/demo/close_button.js +0 -6
- package/demo/common/asset.js +6 -1
- package/demo/common/assets.js +72 -14
- package/demo/demo.less +105 -16
- package/demo/index.html +8 -5
- package/demo/load.js +5 -7
- package/demo/main.js +81 -16
- package/dist/.csslintstamp +0 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +46 -39
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +46 -39
- package/dist/demo.compiled.map +3 -3
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +11 -7
- package/dist/receiver.compiled.debug.js +10 -6
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +10 -6
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.debug.externs.js +123 -92
- package/dist/shaka-player.compiled.debug.js +113 -105
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +123 -92
- package/dist/shaka-player.compiled.js +551 -548
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.debug.externs.js +170 -101
- package/dist/shaka-player.ui.debug.js +187 -188
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +170 -101
- package/dist/shaka-player.ui.js +651 -651
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/drm-config.md +1 -0
- package/docs/tutorials/fairplay.md +77 -0
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/ui-customization.md +3 -0
- package/docs/tutorials/ui.md +3 -1
- package/externs/mediasession.js +16 -1
- package/externs/shaka/net.js +5 -1
- package/externs/shaka/player.js +136 -90
- package/externs/webkitmediakeys.js +4 -0
- package/lib/dash/content_protection.js +33 -1
- package/lib/dash/dash_parser.js +12 -4
- package/lib/hls/hls_parser.js +20 -4
- package/lib/media/drm_engine.js +29 -2
- package/lib/media/media_source_engine.js +7 -3
- package/lib/media/playhead.js +8 -3
- package/lib/media/streaming_engine.js +24 -8
- package/lib/media/video_wrapper.js +8 -3
- package/lib/net/networking_engine.js +1 -0
- package/lib/player.js +3 -2
- package/lib/polyfill/patchedmediakeys_apple.js +2 -72
- package/lib/util/error.js +12 -0
- package/lib/util/fairplay_utils.js +122 -0
- package/lib/util/player_configuration.js +5 -0
- package/lib/util/pssh.js +41 -0
- package/package.json +4 -3
- package/shaka-player.uncompiled.js +5 -1
- package/test/dash/dash_parser_content_protection_unit.js +35 -1
- package/test/dash/dash_parser_manifest_unit.js +31 -0
- package/test/hls/hls_live_unit.js +7 -1
- package/test/hls/hls_parser_unit.js +50 -0
- package/test/media/media_source_engine_integration.js +12 -0
- package/test/media/playhead_unit.js +2 -0
- package/test/player_external.js +3 -2
- package/test/player_integration.js +75 -0
- package/test/test/externs/jasmine.js +6 -0
- package/test/test/util/test_scheme.js +32 -1
- package/test/test/util/ui_utils.js +41 -0
- package/test/ui/ui_unit.js +129 -3
- package/ui/audio_language_selection.js +17 -96
- package/ui/big_play_button.js +61 -0
- package/ui/controls.js +111 -86
- package/ui/controls.less +3 -5
- package/ui/externs/ui.js +14 -2
- package/ui/fullscreen_button.js +2 -52
- package/ui/less/buttons.less +8 -8
- package/ui/less/containers.less +21 -21
- package/ui/less/general.less +11 -0
- package/ui/less/other_elements.less +2 -1
- package/ui/less/overflow_menu.less +11 -10
- package/ui/less/range_elements.less +6 -0
- package/ui/less/spinner.less +2 -0
- package/ui/pip_button.js +1 -1
- package/ui/{play_pause_button.js → play_button.js} +17 -47
- package/ui/resolution_selection.js +41 -104
- package/ui/seek_bar.js +15 -17
- package/ui/settings_menu.js +113 -0
- package/ui/small_play_button.js +73 -0
- package/ui/text_displayer.js +2 -2
- package/ui/text_selection.js +39 -105
- package/ui/ui.js +12 -0
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
function fa(){ca();var b=ba.Symbol.iterator;b||(b=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ia(b){fa();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function r(b){fa();var c=b[Symbol.iterator];return c?c.call(b):ha(b)}
|
|
3
3
|
function ka(b,c){if(c){for(var d=ba,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
|
|
4
4
|
ka("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.h()})};var f=ba.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.h=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
|
|
5
|
-
[];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.
|
|
5
|
+
[];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.s),reject:b(this.f)}};c.prototype.s=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.v(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
|
|
6
6
|
break a;default:d=!1}d?this.m(b):this.h(b)}};c.prototype.m=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.C(c,b):this.h(b)};c.prototype.f=function(b){this.i(2,b)};c.prototype.h=function(b){this.i(1,b)};c.prototype.i=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.l()};c.prototype.l=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
|
|
7
7
|
var g=new d;c.prototype.v=function(b){var c=this.c();b.Yb(c.resolve,c.reject)};c.prototype.C=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(C){g(C)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Yb(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Yb=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
|
|
8
8
|
case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=r(b),g=f.next();!g.done;g=f.next())e(g.value).Yb(c,d)})};c.all=function(b){var d=r(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).Yb(g(h.length-1),c),f=d.next();
|
|
9
9
|
while(!f.done)})};return c});ka("Promise.prototype.finally",function(b){return b?b:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});function la(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function t(b){return la(b())}
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ca();fa();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){
|
|
18
|
-
var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!
|
|
19
|
-
ka("Map",function(b){function c(){var b={};return b.Ca=b.next=b.head=b}function d(b,c){var d=b.a;return ia(function(){if(d){for(;d.head!=b.a;)d=d.Ca;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&
|
|
10
|
+
var oa="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},pa;if("function"==typeof Object.setPrototypeOf)pa=Object.setPrototypeOf;else{var qa;a:{var ra={ne:!0},sa={};try{sa.__proto__=ra;qa=sa.ne;break a}catch(b){}qa=!1}pa=qa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ta=pa;function ua(){this.g=!1;this.c=null;this.o=void 0;this.j=1;this.b=this.f=0;this.i=this.a=null}
|
|
11
|
+
function va(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}ua.prototype.h=function(b){this.o=b};function xa(b,c){b.a={yd:c,Gd:!0};b.j=b.f||b.b}ua.prototype["return"]=function(b){this.a={"return":b};this.j=this.b};function u(b,c,d){b.j=d;return{value:c}}ua.prototype.A=function(b){this.j=b};function v(b){b.j=0}function y(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function ya(b,c){b.f=0;b.b=c||0}function za(b,c){b.j=c;b.f=0}function Ca(b){b.f=0;var c=b.a.yd;b.a=null;return c}
|
|
12
|
+
function Da(b){b.i=[b.a];b.f=0;b.b=0}function Ea(b,c){var d=b.i.splice(0)[0];(d=b.a=b.a||d)?d.Gd?b.j=b.f||b.b:void 0!=d.A&&b.b<d.A?(b.j=d.A,b.a=null):b.j=b.b:b.j=c}function Fa(b){this.a=new ua;this.b=b}function Ja(b,c){va(b.a);var d=b.a.c;if(d)return Ka(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return La(b)}
|
|
13
|
+
function Ka(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,xa(b.a,h),La(b)}b.a.c=null;e.call(b.a,g);return La(b)}
|
|
14
|
+
function La(b){for(;b.a.j;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.o=void 0,xa(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Gd)throw c.yd;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
|
|
15
|
+
function Ma(b){this.next=function(c){va(b.a);b.a.c?c=Ka(b,b.a.c.next,c,b.a.h):(b.a.h(c),c=La(b));return c};this["throw"]=function(c){va(b.a);b.a.c?c=Ka(b,b.a.c["throw"],c,b.a.h):(xa(b.a,c),c=La(b));return c};this["return"]=function(c){return Ja(b,c)};fa();this[Symbol.iterator]=function(){return this}}function z(b,c){Ma.prototype=b.prototype;return new Ma(new Fa(c))}function Na(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
|
|
16
|
+
function Oa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
|
|
17
|
+
ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ca();fa();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Oa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
|
|
18
|
+
var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Oa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Oa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Oa(b,f)&&Oa(b[f],this.a)};c.prototype["delete"]=function(b){return Oa(b,f)&&Oa(b[f],this.a)?delete b[f][this.a]:!1};return c});
|
|
19
|
+
ka("Map",function(b){function c(){var b={};return b.Ca=b.next=b.head=b}function d(b,c){var d=b.a;return ia(function(){if(d){for(;d.head!=b.a;)d=d.Ca;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Oa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,X:k}}return{id:d,
|
|
20
20
|
list:e,index:-1,X:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=r(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(r([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
|
|
21
21
|
"t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;ca();fa();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.X?d.X.value=c:(d.X={next:this.a,Ca:this.a.Ca,head:this.a,key:b,value:c},d.list.push(d.X),this.a.Ca.next=d.X,this.a.Ca=d.X,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.X&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.X.Ca.next=b.X.next,b.X.next.Ca=b.X.Ca,b.X.head=
|
|
22
22
|
null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Ca=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).X};f.prototype.get=function(b){return(b=e(this,b).X)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=
|
|
23
23
|
e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
|
|
24
24
|
ka("Set",function(b){function c(b){this.a=new Map;if(b){b=r(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(r([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
|
|
25
25
|
g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;ca();fa();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
|
|
26
|
-
c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function
|
|
27
|
-
function
|
|
28
|
-
ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function
|
|
29
|
-
ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==
|
|
30
|
-
ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=
|
|
31
|
-
function
|
|
26
|
+
c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Pa(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{Cd:f,ie:g}}return{Cd:-1,ie:void 0}}ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Pa(this,b,d).Cd}});
|
|
27
|
+
function Qa(b,c){fa();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ka("Array.prototype.keys",function(b){return b?b:function(){return Qa(this,function(b){return b})}});ka("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
|
|
28
|
+
ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Ra(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
|
|
29
|
+
ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Ra(this,b,"includes").indexOf(b,d||0)}});ka("Array.from",function(b){return b?b:function(b,d,e){fa();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});
|
|
30
|
+
ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Ra(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Pa(this,b,d).ie}});var Sa=this;Sa.a=!0;
|
|
31
|
+
function A(b,c){var d=b.split("."),e=Sa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Ua(b,c){function d(){}d.prototype=c.prototype;b.ag=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.og=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
|
|
32
32
|
|
|
33
33
|
Copyright 2016 Google Inc.
|
|
34
34
|
|
|
@@ -44,568 +44,571 @@ function z(b,c){var d=b.split("."),e=Ua;d[0]in e||!e.execScript||e.execScript("v
|
|
|
44
44
|
See the License for the specific language governing permissions and
|
|
45
45
|
limitations under the License.
|
|
46
46
|
*/
|
|
47
|
-
function
|
|
48
|
-
p.toString=function(){var b=[],c=this.va;c&&b.push(
|
|
49
|
-
p.resolve=function(b){var c=this.clone();"data"===c.va&&(c=new
|
|
50
|
-
k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.ia=e:d=""!==b.a.toString();d?
|
|
51
|
-
function
|
|
52
|
-
p.add=function(b,c){if(!this.
|
|
53
|
-
p.toString=function(){if(this.a)return this.a;if(!this.
|
|
54
|
-
|
|
55
|
-
function
|
|
56
|
-
|
|
47
|
+
function Va(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Wa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Xa(b){return b.a/(1-Math.pow(b.c,b.b))};function Ya(){this.b=new Va(2);this.c=new Va(5);this.a=0}Ya.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Xa(this.b),Xa(this.c))};function Za(){}function $a(){}function ab(){}window.console&&window.console.log.bind&&($a=console.warn.bind(console),Za=console.error.bind(console));var bb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function cb(b){var c;b instanceof cb?(gb(this,b.va),this.$a=b.$a,this.ra=b.ra,hb(this,b.xb),this.ia=b.ia,ib(this,b.a.clone()),this.Qa=b.Qa):b&&(c=String(b).match(bb))?(gb(this,c[1]||"",!0),this.$a=jb(c[2]||""),this.ra=jb(c[3]||"",!0),hb(this,c[4]),this.ia=jb(c[5]||"",!0),ib(this,c[6]||"",!0),this.Qa=jb(c[7]||"")):this.a=new kb(null)}p=cb.prototype;p.va="";p.$a="";p.ra="";p.xb=null;p.ia="";p.Qa="";
|
|
48
|
+
p.toString=function(){var b=[],c=this.va;c&&b.push(lb(c,mb,!0),":");if(c=this.ra){b.push("//");var d=this.$a;d&&b.push(lb(d,mb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.xb;null!=c&&b.push(":",String(c))}if(c=this.ia)this.ra&&"/"!=c.charAt(0)&&b.push("/"),b.push(lb(c,"/"==c.charAt(0)?nb:ob,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Qa)&&b.push("#",lb(c,pb));return b.join("")};
|
|
49
|
+
p.resolve=function(b){var c=this.clone();"data"===c.va&&(c=new cb);var d=!!b.va;d?gb(c,b.va):d=!!b.$a;d?c.$a=b.$a:d=!!b.ra;d?c.ra=b.ra:d=null!=b.xb;var e=b.ia;if(d)hb(c,b.xb);else if(d=!!b.ia){if("/"!=e.charAt(0))if(this.ra&&!this.ia)e="/"+e;else{var f=c.ia.lastIndexOf("/");-1!=f&&(e=c.ia.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
|
|
50
|
+
k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.ia=e:d=""!==b.a.toString();d?ib(c,b.a.clone()):d=!!b.Qa;d&&(c.Qa=b.Qa);return c};p.clone=function(){return new cb(this)};function gb(b,c,d){b.va=d?jb(c,!0):c;b.va&&(b.va=b.va.replace(/:$/,""))}function hb(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.xb=c}else b.xb=null}function ib(b,c,d){c instanceof kb?b.a=c:(d||(c=lb(c,qb)),b.a=new kb(c))}
|
|
51
|
+
function jb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function lb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,rb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function rb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var mb=/[#\/\?@]/g,ob=/[#\?:]/g,nb=/[#\?]/g,qb=/[#\?@]/g,pb=/#/g;function kb(b){this.a=b||null}p=kb.prototype;p.ha=null;p.$b=null;
|
|
52
|
+
p.add=function(b,c){if(!this.ha&&(this.ha={},this.$b=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.ha.hasOwnProperty(b)&&this.ha[b])||(this.ha[b]=d=[]);d.push(c);this.$b++;return this};
|
|
53
|
+
p.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var b=[],c;for(c in this.ha)for(var d=encodeURIComponent(c),e=this.ha[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new kb;b.a=this.a;if(this.ha){var c={},d;for(d in this.ha)c[d]=this.ha[d].concat();b.ha=c;b.$b=this.$b}return b};function sb(b){this.b=b;this.a=null}sb.prototype.O=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};sb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function D(b){this.b=b;this.a=null}A("shaka.util.Timer",D);D.prototype.sc=function(){this.stop();this.b();return this};D.prototype.tickNow=D.prototype.sc;D.prototype.O=function(b){var c=this;this.stop();this.a=(new sb(function(){c.b()})).O(b);return this};D.prototype.tickAfter=D.prototype.O;D.prototype.La=function(b){var c=this;this.stop();this.a=(new sb(function(){c.a.O(b);c.b()})).O(b);return this};D.prototype.tickEvery=D.prototype.La;D.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
|
|
54
|
+
D.prototype.stop=D.prototype.stop;function xb(b,c){var d=yb();this.i=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.h=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}
|
|
55
|
+
function zb(b){return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:if(b.a>=b.i)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new D(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function yb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function G(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}A("shaka.util.Error",G);G.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G.Severity={RECOVERABLE:1,CRITICAL:2};G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
|
|
56
|
+
G.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
|
|
57
57
|
EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
|
|
58
58
|
UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
|
|
59
59
|
HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,INVALID_STREAMS_CHOSEN:5005,
|
|
60
|
-
NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,
|
|
61
|
-
ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,CAST_RECEIVER_APP_ID_MISSING:8007,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
function
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
function
|
|
68
|
-
K.prototype.
|
|
60
|
+
NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,
|
|
61
|
+
NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,CAST_RECEIVER_APP_ID_MISSING:8007,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,
|
|
62
|
+
NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};function H(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}H.prototype.resolve=function(){};H.prototype.reject=function(){};function I(b,c){this.promise=b;this.Jd=c;this.a=!1}A("shaka.util.AbortableOperation",I);function Ab(b){return new I(Promise.reject(b),function(){return Promise.resolve()})}I.failed=Ab;function Bb(){var b=Promise.reject(new G(2,7,7001));b["catch"](function(){});return new I(b,function(){return Promise.resolve()})}I.aborted=Bb;function Cb(b){return new I(Promise.resolve(b),function(){return Promise.resolve()})}I.completed=Cb;
|
|
63
|
+
function Db(b){return new I(b,function(){return b["catch"](function(){})})}I.notAbortable=Db;I.prototype.abort=function(){this.a=!0;return this.Jd()};I.prototype.abort=I.prototype.abort;function Fb(b){return new I(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}I.all=Fb;I.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};I.prototype["finally"]=I.prototype["finally"];
|
|
64
|
+
I.prototype.U=function(b,c){function d(){f.reject(new G(2,7,7001));return e.abort()}var e=this,f=new H;this.promise.then(function(c){e.a?f.reject(new G(2,7,7001)):b?d=Gb(b,c,f):f.resolve(c)},function(b){c?d=Gb(c,b,f):f.reject(b)});return new I(f,function(){return d()})};I.prototype.chain=I.prototype.U;
|
|
65
|
+
function Gb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function J(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}J.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};J.prototype.stopImmediatePropagation=function(){this.a=!0};J.prototype.stopPropagation=function(){};function Hb(){this.a={}}p=Hb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function Ib(){this.Bc=new Hb;this.Vb=this}Ib.prototype.addEventListener=function(b,c){this.Bc.push(b,c)};Ib.prototype.removeEventListener=function(b,c){this.Bc.remove(b,c)};Ib.prototype.dispatchEvent=function(b){for(var c=this.Bc.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Vb;b.currentTarget=this.Vb;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function Jb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function Kb(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function Lb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function Mb(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
|
|
66
|
+
function Nb(b,c,d){d||(d=Kb);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function Ob(){this.a=[]}function Pb(b,c){b.a.push(c["finally"](function(){Lb(b.a,c)}))}Ob.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function K(b){Ib.call(this);this.f=!1;this.g=new Ob;this.a=new Set;this.b=new Set;this.c=b||null}Ua(K,Ib);A("shaka.net.NetworkingEngine",K);var Qb={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};K.RequestType=Qb;K.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Rb={};function Sb(b,c,d){d=d||3;var e=Rb[b];if(!e||d>=e.priority)Rb[b]={priority:d,zf:c}}K.registerScheme=Sb;K.unregisterScheme=function(b){delete Rb[b]};K.prototype.Bf=function(b){this.a.add(b)};
|
|
67
|
+
K.prototype.registerRequestFilter=K.prototype.Bf;K.prototype.cg=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.cg;K.prototype.we=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.we;K.prototype.Cf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.Cf;K.prototype.dg=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.dg;K.prototype.xe=function(){this.b.clear()};
|
|
68
|
+
K.prototype.clearAllResponseFilters=K.prototype.xe;function Tb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null,sessionId:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;
|
|
69
|
+
K.prototype.request=function(b,c){var d=this,e=new Ub;if(this.f){var f=Promise.reject(new G(2,7,7001));f["catch"](function(){});return new Vb(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Jb(c.retryParameters):yb();c.uris=Jb(c.uris);f=Wb(this,b,c);var g=f.U(function(){return Xb(d,b,c,new xb(c.retryParameters,!1),0,null,e)}),h=g.U(function(c){return Yb(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},
|
|
69
70
|
function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.U(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ze||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Vb(f.promise,f.Jd,e);Pb(this.g,f);return f};K.prototype.request=K.prototype.request;
|
|
70
|
-
function Wb(b,c,d){var e=
|
|
71
|
-
function Xb(b,c,d,e,f,g,h){var k=new
|
|
72
|
-
{error:k instanceof
|
|
73
|
-
Zb.prototype.constructor=Zb;if(
|
|
74
|
-
L.prototype.
|
|
75
|
-
function cc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=dc(b,e);this.target.addEventListener(c,d,this.a)}cc.prototype.
|
|
76
|
-
function ec(b){var c=fc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}fc=c}return c||!1}var fc=void 0;function gc(b
|
|
77
|
-
function
|
|
78
|
-
function
|
|
79
|
-
function
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
function Ic(b){for(var c=
|
|
83
|
-
|
|
84
|
-
function
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
function
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
function
|
|
91
|
-
function
|
|
92
|
-
function
|
|
93
|
-
|
|
71
|
+
function Wb(b,c,d){var e=Cb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={fd:f.fd},g=b.next())f.fd=g.value,e=e.U(function(b){return function(){return b.fd(c,d)}}(f));return e.U(void 0,function(b){if(b&&7001==b.code)throw b;throw new G(2,1,1006,b);})}
|
|
72
|
+
function Xb(b,c,d,e,f,g,h){var k=new cb(d.uris[f]),l=k.va,m=!1;l||(l=location.protocol,l=l.slice(0,-1),gb(k,l),d.uris[f]=k.toString());var n=(l=Rb[l])?l.zf:null;if(!n)return Ab(new G(2,1,1E3,k));var q;return Db(zb(e)).U(function(){if(b.f)return Bb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).U(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ze:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Bb();if(k&&1==k.severity)return b.dispatchEvent(new J("retry",
|
|
73
|
+
{error:k instanceof G?k:null})),f=(f+1)%d.uris.length,Xb(b,c,d,e,f,k,h);throw k||g;})}function Yb(b,c,d){var e=Cb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.U(f.value.bind(null,c,d.response));return e.U(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof G&&(c=b.severity);throw new G(c,1,1007,b);})}function Ub(){this.a=0}K.NumBytesRemainingClass=Ub;function Vb(b,c,d){I.call(this,b,c);this.b=d}var Zb=Vb;Zb.prototype=oa(I.prototype);
|
|
74
|
+
Zb.prototype.constructor=Zb;if(ta)ta(Zb,I);else for(var $b in I)if("prototype"!=$b)if(Object.defineProperties){var ac=Object.getOwnPropertyDescriptor(I,$b);ac&&Object.defineProperty(Zb,$b,ac)}else Zb[$b]=I[$b];Zb.ag=I.prototype;K.PendingRequest=Vb;Vb.all=Fb;Vb.notAbortable=Db;Vb.completed=Cb;Vb.aborted=Bb;Vb.failed=Ab;function bc(){}A("shaka.util.IReleasable",bc);bc.prototype.release=function(){};function L(){this.a=new Hb}A("shaka.util.EventManager",L);L.prototype.release=function(){this.Ya();this.a=null};L.prototype.release=L.prototype.release;L.prototype.w=function(b,c,d,e){this.a&&(b=new cc(b,c,d,e),this.a.push(c,b))};L.prototype.listen=L.prototype.w;L.prototype.da=function(b,c,d,e){function f(e){g.ea(b,c,f);d(e)}var g=this;this.w(b,c,f,e)};L.prototype.listenOnce=L.prototype.da;
|
|
75
|
+
L.prototype.ea=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.ea(),this.a.remove(c,f))}};L.prototype.unlisten=L.prototype.ea;L.prototype.Ya=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.ea();this.a.a={}}};L.prototype.removeAll=L.prototype.Ya;
|
|
76
|
+
function cc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=dc(b,e);this.target.addEventListener(c,d,this.a)}cc.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};cc.prototype.unlisten=cc.prototype.ea;function dc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return ec(b)?c:c.capture||!1}
|
|
77
|
+
function ec(b){var c=fc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}fc=c}return c||!1}var fc=void 0;function gc(b){b=new Uint8Array(b);if((new DataView(b.buffer,b.byteOffset,b.byteLength)).getUint32(0,!0)+4!=b.byteLength)throw new RangeError("Malformed FairPlay init data");b=hc(b.subarray(4),!0);return(new cb(b)).ra}A("shaka.util.FairPlayUtils.defaultGetContentId",gc);
|
|
78
|
+
function ic(b,c,d){function e(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;f(b)}function f(b){g.set(b,h);h+=b.byteLength}if(!d||!d.byteLength)throw new G(2,6,6015);c="string"==typeof c?new Uint8Array(jc(c,!0)):new Uint8Array(c);var g=new Uint8Array(8+b.byteLength+c.byteLength+d.byteLength),h=0;f(new Uint8Array(b));e(c);e(new Uint8Array(d));return g}A("shaka.util.FairPlayUtils.initDataTransform",ic);function kc(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function lc(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function mc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function nc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function oc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function pc(b){var c=[b.mimeType];qc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function rc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var qc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function sc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function tc(b){return""!=wc().canPlayType(b)}function xc(b){return(navigator.userAgent||"").includes(b)}function wc(){if(yc)return yc;zc||(zc=new D(function(){yc=null}));(yc=document.querySelector("video")||document.querySelector("audio"))||(yc=document.createElement("video"));zc.O(1);return yc}var zc=null,yc=null;function Ac(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Bc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new G(2,2,2004);}}A("shaka.util.StringUtils.fromUTF8",Ac);
|
|
79
|
+
function hc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new G(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return Bc(d)}A("shaka.util.StringUtils.fromUTF16",hc);
|
|
80
|
+
function Cc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Ac(c);if(254==c[0]&&255==c[1])return hc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return hc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return hc(b,!1);if(0==c[1]&&0==c[3])return hc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Ac(b);throw new G(2,2,2003);}A("shaka.util.StringUtils.fromBytesAutoDetect",Cc);
|
|
81
|
+
function Dc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}A("shaka.util.StringUtils.toUTF8",Dc);function jc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}A("shaka.util.StringUtils.toUTF16",jc);
|
|
82
|
+
function Bc(b){if(!Ec)for(var c=function(b){try{var c=new Uint8Array(b);Na(c);return!0}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){Ec=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(String,Na(c.subarray(e,e+b.size)));return d}}(d);break}return Ec(b)}var Ec=null;function Fc(b,c){var d=Bc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}A("shaka.util.Uint8ArrayUtils.toBase64",Fc);function Gc(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}A("shaka.util.Uint8ArrayUtils.fromBase64",Gc);function Hc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
|
|
83
|
+
A("shaka.util.Uint8ArrayUtils.fromHex",Hc);function Ic(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}A("shaka.util.Uint8ArrayUtils.toHex",Ic);function Jc(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}A("shaka.util.Uint8ArrayUtils.equal",Jc);
|
|
84
|
+
function Kc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}A("shaka.util.Uint8ArrayUtils.concat",Kc);function Lc(b){var c=this;this.C=b;this.v=new Set;this.m=this.h=null;this.P=!1;this.a=null;this.i=new L;this.b=new Map;this.s=[];this.l=new H;this.c=null;this.g=function(d){c.l.reject(d);b.onError(d)};this.na=new Map;this.T=new Map;this.M=new D(function(){return Mc(c)});this.f=!1;this.$=new H;this.D=!1;this.G=[];this.ma=!1;this.W=(new D(function(){Nc(c)})).La(1);this.l["catch"](function(){})}p=Lc.prototype;
|
|
85
|
+
p.destroy=function(){var b=this;return t(function d(){return z(d,function(d){switch(d.j){case 1:if(b.f)return u(d,b.$,0);b.f=!0;return u(d,Oc(b),4);case 4:b.$.resolve(),d.A(0)}})})};
|
|
86
|
+
function Oc(b){return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return b.i.release(),b.i=null,b.l.reject(),b.W.stop(),b.W=null,b.M.stop(),b.M=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return z(k,function(d){switch(d.j){case 1:return y(d,2),u(d,Pc(b),4);case 4:za(d,0);break;case 2:Ca(d),v(d)}})})})})),2);case 2:if(!b.m){d.A(3);break}y(d,4);return u(d,b.m.setMediaKeys(null),6);case 6:za(d,
|
|
87
|
+
5);break;case 4:Ca(d);case 5:b.m=null;case 3:b.a=null,b.v.clear(),b.h=null,b.s=[],b.c=null,b.g=null,b.C=null,v(d)}})})}p.configure=function(b){this.c=b};function Qc(b,c,d){b.s=[];b.D=d;return Rc(b,c)}function Sc(b,c,d){b.s=d;b.D=0<d.length;return Rc(b,c)}
|
|
88
|
+
function Tc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return Uc(b,h)}
|
|
89
|
+
function Rc(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=mc(b.c.servers);Vc(c,e)}var f=Wc(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())Xc(g.value,mc(b.c.servers),mc(b.c.advanced||{}));e=Yc(b,c);if(!e.size)return b.P=!0,Promise.resolve();e=Uc(b,e);return d?e:e["catch"](function(){})}
|
|
90
|
+
p.Cb=function(b){var c=this;if(!this.h)return this.i.da(b,"encrypted",function(){c.g(new G(2,6,6010))}),Promise.resolve();this.m=b;this.i.da(this.m,"play",function(){for(var b=0;b<c.G.length;b++)Zc(c,c.G[b]);c.ma=!0;c.G=[]});b=this.m.setMediaKeys(this.h);b=b["catch"](function(b){return Promise.reject(new G(2,6,6003,b.message))});var d=$c(this);return Promise.all([b,d]).then(function(){if(c.f)return Promise.reject();ad(c);c.a.initData.length||c.s.length||c.i.w(c.m,"encrypted",function(b){return bd(c,
|
|
91
|
+
b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.f)return Promise.reject(b)})};function $c(b){return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:if(!(b.h&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.A(0);break}y(d,3);return u(d,b.h.setServerCertificate(b.a.serverCertificate),5);case 5:za(d,0);break;case 3:return e=Ca(d),d["return"](Promise.reject(new G(2,6,6004,e.message)))}})})}
|
|
92
|
+
function cd(b,c){return t(function e(){var f,g,h;return z(e,function(e){switch(e.j){case 1:return u(e,dd(b,c),2);case 2:f=e.o;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.xa=new H,g.push(h.xa);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function ad(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return ed(b,c.initDataType,c.initData)});b.s.forEach(function(c){return dd(b,c)});c.length||b.s.length||b.l.resolve();return b.l}
|
|
93
|
+
function bd(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Jc(d,f.value.initData))return;ed(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function fd(b,c){return xc("Edge/")?!0:b.v.has(c)}function gd(b){b=b.b.keys();b=kc(b,function(b){return b.sessionId});return Array.from(b)}p.dc=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
|
|
94
|
+
function Yc(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())Xc(f.value,mc(b.c.servers),mc(b.c.advanced||{}));g=b.D?"required":"optional";var h=b.D?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
|
|
95
|
+
label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?oc(g.mimeType,g.codecs):"",l=h?oc(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
|
|
94
96
|
"",contentType:l})}}return e}
|
|
95
|
-
function
|
|
96
|
-
f=f["catch"](function(){return Promise.reject(new
|
|
97
|
-
d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new
|
|
98
|
-
null,this.v.clear(),b instanceof
|
|
99
|
-
function
|
|
97
|
+
function Uc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new G(2,6,6E3));for(var d=r(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new H;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.f)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
|
|
98
|
+
f=f["catch"](function(){return Promise.reject(new G(2,6,6001))});f=f.then(function(b){if(this.f)return Promise.reject();this.v.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.v.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.v.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];hd(d.drmInfos,f,g,n,q);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
|
|
99
|
+
d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new G(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.f)return Promise.reject();this.h=b;this.P=!0}.bind(b))["catch"](function(b){if(!this.f)return this.a=
|
|
100
|
+
null,this.v.clear(),b instanceof G?Promise.reject(b):Promise.reject(new G(2,6,6002,b.message))}.bind(b));d.reject();return f}
|
|
101
|
+
function Wc(b){b=mc(b.c.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Hc(e),g=Hc(b);f={kty:"oct",kid:Fc(f,!1),k:Fc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Dc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
|
|
100
102
|
initData:e,keyIds:[]}}
|
|
101
|
-
function
|
|
103
|
+
function dd(b,c){try{var d=b.h.createSession("persistent-license")}catch(g){var e=new G(2,6,6005,g.message);b.g(e);return Promise.reject(e)}b.i.w(d,"message",b.Rd.bind(b));b.i.w(d,"keystatuseschange",b.Pd.bind(b));var f={initData:null,loaded:!1,Yc:Infinity,xa:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.f)return Promise.reject();if(b)return f.loaded=!0,id(this)&&this.l.resolve(),d;this.b["delete"](d);this.g(new G(2,6,6013))}.bind(b),function(b){this.f||(this.b["delete"](d),this.g(new G(2,
|
|
102
104
|
6,6005,b.message)))}.bind(b))}
|
|
103
|
-
function
|
|
104
|
-
p.Rd=function(b){this.
|
|
105
|
-
function
|
|
106
|
-
this.a.keySystem.startsWith("com.apple.fps")&&
|
|
107
|
-
function
|
|
108
|
-
function
|
|
109
|
-
p.Pd=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!
|
|
110
|
-
this.na.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.xa&&(this.b["delete"](b),b.close()["catch"](function(){}));
|
|
111
|
-
function
|
|
112
|
-
persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return
|
|
113
|
-
function
|
|
114
|
-
function
|
|
115
|
-
f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function
|
|
116
|
-
function
|
|
117
|
-
function
|
|
118
|
-
function
|
|
119
|
-
(b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function
|
|
120
|
-
function
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
function
|
|
126
|
-
|
|
127
|
-
function
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
function
|
|
131
|
-
b.i.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.h))};function
|
|
132
|
-
p.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](
|
|
133
|
-
p.init=function(b,c){var d=this;return t(function f(){var g;return
|
|
134
|
-
function
|
|
135
|
-
p.
|
|
136
|
-
function
|
|
137
|
-
p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):
|
|
138
|
-
function
|
|
105
|
+
function ed(b,c,d){try{var e=b.D?b.h.createSession("persistent-license"):b.h.createSession()}catch(h){b.g(new G(2,6,6005,h.message));return}b.i.w(e,"message",b.Rd.bind(b));b.i.w(e,"keystatuseschange",b.Pd.bind(b));b.b.set(e,{initData:d,loaded:!1,Yc:Infinity,xa:null});try{if(b.c.initDataTransform)d=b.c.initDataTransform(d);else if(b.keySystem().startsWith("com.apple.fps")){var f=b.a.serverCertificate,g=gc(d);d=ic(d,g,f)}}catch(h){c=h;h instanceof G||(c=new G(2,6,6016,h));b.g(c);return}e.generateRequest(c,
|
|
106
|
+
d.buffer)["catch"](function(c){if(!b.f){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new G(2,6,6006,c.message,c,d))}})}p.Rd=function(b){this.c.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ma?this.G.push(b):Zc(this,b)};
|
|
107
|
+
function Zc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.c.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Tb([f],b.c.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;f.sessionId=d.sessionId;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||jd(f);b.a.keySystem.startsWith("com.apple.fps")&&b.c.fairPlayTransform&&kd(f);b.C.rb.request(2,
|
|
108
|
+
f).promise.then(function(b){if(this.f)return Promise.reject();this.a.keySystem.startsWith("com.apple.fps")&&this.c.fairPlayTransform&&ld(b);return d.update(b.data).then(function(){var b=this;this.C.onEvent(new J("drmsessionupdate"));e&&(e.xa&&e.xa.resolve(),(new D(function(){e.loaded=!0;id(b)&&b.l.resolve()})).O(md))}.bind(this))}.bind(b),function(b){this.f||(b=new G(2,6,6007,b),this.g(b),e&&e.xa&&e.xa.reject(b))}.bind(b))["catch"](function(b){this.f||(b=new G(2,6,6008,b.message),this.g(b),e&&e.xa&&
|
|
109
|
+
e.xa.reject(b))}.bind(b))}function jd(b){var c=hc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Gc(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
|
|
110
|
+
function kd(b){var c=new Uint8Array(b.body);c="spc="+Fc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Dc(c)}function ld(b){try{var c=Ac(b.data)}catch(d){return}c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Gc(c).buffer}
|
|
111
|
+
p.Pd=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!xc("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Ic(new Uint8Array(e));
|
|
112
|
+
this.na.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.xa&&(this.b["delete"](b),b.close()["catch"](function(){}));id(this)&&(this.l.resolve(),this.M.O(nd))};function Mc(b){var c=b.na,d=b.T;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new G(2,6,6014));b.C.kc(nc(d))}
|
|
113
|
+
function od(){function b(b){return t(function h(){var c,f,m;return z(h,function(h){switch(h.j){case 1:return y(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.o,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,xc("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:za(h,0);break;case 2:Ca(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
|
|
114
|
+
persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return nc(e)})}
|
|
115
|
+
function pd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!fd(b,oc(d.mimeType,d.codecs))||e&&e.encrypted&&!fd(b,oc(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
|
|
116
|
+
function qd(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
|
|
117
|
+
f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function Nc(b){b.b.forEach(function(c,d){var e=c.Yc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.C.onExpirationUpdated(d.sessionId,f),c.Yc=f)})}function id(b){b=b.b.values();return lc(b,function(b){return b.loaded})}
|
|
118
|
+
function Vc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
|
|
119
|
+
function hd(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return Jc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&Jc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
|
|
120
|
+
function Xc(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
|
|
121
|
+
(b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function Pc(b){return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return e=new Promise(function(b){(new D(b)).O(rd)}),u(d,Promise.race([b.close().then(function(){return!0}),e.then(function(){return!1})]),2);case 2:v(d)}})})}var rd=1,md=5,nd=.5;function sd(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}sd.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};sd.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};sd.prototype.c=function(){this.a.resetCaptionStream()};function td(){}td.prototype.init=function(){};td.prototype.b=function(){};td.prototype.c=function(){};function ud(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function vd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function xd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
|
|
122
|
+
function yd(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var zd={ye:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},yc:function(b,c){return b.concat(c)},ic:function(){},Ga:function(b){return null!=b}};function Ad(b,c){if(0==c.length)return b;var d=c.map(function(b){return new cb(b)});return b.map(function(b){return new cb(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(zd.yc,[]).map(function(b){return b.toString()})}function Bd(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Cd={Na:"video",Ab:"audio",qa:"text",kg:"application"},Dd=1/15;function Ed(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.i.bind(this));this.a.on("done",this.h.bind(this))}Ed.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Fd(b,c){return window.muxjs&&"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Gd(c,b)):MediaSource.isTypeSupported(Gd("audio",b))||MediaSource.isTypeSupported(Gd("video",b)):!1}
|
|
123
|
+
function Gd(b,c){var d=c.replace(/mp2t/i,"mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Hd(b,c){b.f=!0;b.b=new H;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new G(2,3,3018));return b.b}
|
|
124
|
+
Ed.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Ed.prototype.h=function(){var b={data:Kc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Id(b,c,d){this.startTime=b;this.direction=Jd;this.endTime=c;this.payload=d;this.region=new Kd;this.position=null;this.positionAlign=Ld;this.size=100;this.textAlign=Md;this.writingMode=Nd;this.lineInterpretation=Od;this.line=null;this.lineHeight="";this.lineAlign=Pd;this.displayAlign=Qd;this.fontSize=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Rd;this.fontStyle=Sd;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}A("shaka.text.Cue",Id);
|
|
125
|
+
var Ld="auto";Id.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ld};var Md="center",Td={LEFT:"left",RIGHT:"right",CENTER:Md,START:"start",END:"end"};Id.textAlign=Td;var Qd="after",Ud={BEFORE:"before",CENTER:"center",AFTER:Qd};Id.displayAlign=Ud;var Jd="ltr";Id.direction={HORIZONTAL_LEFT_TO_RIGHT:Jd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Nd="horizontal-tb";Id.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Nd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
|
|
126
|
+
var Od=0;Id.lineInterpretation={LINE_NUMBER:Od,PERCENTAGE:1};var Pd="start",Vd={CENTER:"center",START:Pd,END:"end"};Id.lineAlign=Vd;var Rd=400;Id.fontWeight={NORMAL:Rd,BOLD:700};var Sd="normal",Wd={NORMAL:Sd,ITALIC:"italic",OBLIQUE:"oblique"};Id.fontStyle=Wd;Id.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
|
|
127
|
+
function Kd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Xd;this.scroll=Yd}A("shaka.text.CueRegion",Kd);var Xd=1;Kd.units={PX:0,PERCENTAGE:Xd,LINES:2};var Yd="";Kd.scrollMode={NONE:Yd,UP:"up"};function Zd(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.l="";this.i=new Map}var $d={};A("shaka.text.TextEngine.registerParser",function(b,c){$d[b]=c});A("shaka.text.TextEngine.unregisterParser",function(b){delete $d[b]});function ae(b){return $d[b]||window.muxjs&&"application/cea-608"==b?!0:!1}Zd.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function be(b,c){"application/cea-608"!=c&&(b.g=new $d[c])}
|
|
128
|
+
Zd.prototype.Mc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new G(2,2,2009,d);}};
|
|
129
|
+
function ce(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.h}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.h)}}.bind(b))}
|
|
130
|
+
Zd.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};Zd.prototype.qe=function(b){this.c.append(b)};Zd.prototype.appendCues=Zd.prototype.qe;
|
|
131
|
+
Zd.prototype.rc=function(b,c){this.l=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Zd.prototype.setSelectedClosedCaptionId=Zd.prototype.rc;
|
|
132
|
+
function de(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.h&&(l=new Id(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.l&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.i.has(g)||b.i.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
|
|
133
|
+
b.i.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.h))};function ee(b,c,d){this.f=b;this.g=d;this.b={};this.a=null;this.c={};this.i=new L;this.v=!1;this.l={};this.m=c;b=this.s=new H;c=new MediaSource;this.i.da(c,"sourceopen",b.resolve);this.f.src=fe(c);this.h=c}var fe=window.URL.createObjectURL;function ge(b){var c=oc(b.mimeType,b.codecs),d=pc(b);return ae(c)||MediaSource.isTypeSupported(d)||Fd(c,b.type)}p=ee.prototype;
|
|
134
|
+
p.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](zd.ic));for(f=1;f<e.length;++f)e[f].p.reject()}this.a&&c.push(this.a.destroy());this.g&&c.push(this.g.destroy());for(var g in this.l)c.push(this.l[g].destroy());return Promise.all(c).then(function(){b.i&&(b.i.release(),b.i=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.h=null;b.a=null;b.g=null;b.b={};b.l={};b.m=null;b.c={}})};
|
|
135
|
+
p.init=function(b,c){var d=this;return t(function f(){var g;return z(f,function(f){switch(f.j){case 1:return g=Cd,u(f,d.s,2);case 2:b.forEach(function(b,f){var h=oc(b.mimeType,b.codecs);f==g.qa?he(d,h):(!c&&MediaSource.isTypeSupported(h)||!Fd(h,f)||(d.l[f]=new Ed,h=Gd(f,h)),h=d.h.addSourceBuffer(h),d.i.w(h,"error",d.Tf.bind(d,f)),d.i.w(h,"updateend",d.ub.bind(d,f)),d.b[f]=h,d.c[f]=[])}),v(f)}})})};function he(b,c){b.a||(b.a=new Zd(b.g));be(b.a,c)}
|
|
136
|
+
function ie(b){return b.h?"ended"==b.h.readyState:!0}function je(b,c){if("text"==c)var d=b.a.a;else d=ke(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function le(b,c){return"text"==c?b.a.b:ud(ke(b,c))}function me(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=ke(b,c);return xd(b,d)}
|
|
137
|
+
p.Jc=function(b){b.total=yd(this.f.buffered);b.audio=yd(ke(this,"audio"));b.video=yd(ke(this,"video"));b.text=[];if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}};function ke(b,c){try{return b.b[c].buffered}catch(d){return null}}
|
|
138
|
+
function ne(b,c,d,e,f,g){if("text"==c)return ce(b.a,d,e,f);if(b.l[c])return Hd(b.l[c],d).then(function(b){this.a||he(this,"text/vtt");b.captions&&de(this.a,b.captions,e,f,this.b.video.timestampOffset);return oe(this,c,this.ee.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||he(b,"text/vtt"),null==e&&null==f?b.m.init(d):b.m.b(d,function(c){c.length&&de(b.a,c,e,f,b.b.video.timestampOffset)}));return oe(b,c,b.ee.bind(b,c,d))}p.rc=function(b){var c=le(this,"video")||0;this.a.rc(b,c)};
|
|
139
|
+
p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):oe(this,b,this.fe.bind(this,b,c,d))};function pe(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.m.c();return b.a.remove(0,Infinity)}return oe(b,c,b.fe.bind(b,c,0,b.h.duration))}p.flush=function(b){return"text"==b?Promise.resolve():oe(this,b,this.Ce.bind(this,b))};
|
|
140
|
+
function qe(b,c,d,e,f){return"text"==c?(b.a.m=d,b=b.a,b.f=e,b.h=f,Promise.resolve()):Promise.all([oe(b,c,b.oe.bind(b,c)),oe(b,c,b.Sf.bind(b,c,d)),oe(b,c,b.Pf.bind(b,c,e,f))])}p.endOfStream=function(b){return re(this,function(){ie(this)||(b?this.h.endOfStream(b):this.h.endOfStream())}.bind(this))};p.wa=function(b){return re(this,function(){this.h.duration=b}.bind(this))};p.Y=function(){return this.h.duration};p.ee=function(b,c){this.b[b].appendBuffer(c)};
|
|
139
141
|
p.fe=function(b,c,d){d<=c?this.ub(b):this.b[b].remove(c,d)};p.oe=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.ub(b)};p.Ce=function(b){this.f.currentTime-=.001;this.ub(b)};p.Sf=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.ub(b)};p.Pf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.ub(b)};
|
|
140
|
-
p.Tf=function(b){this.c[b][0].p.reject(new
|
|
141
|
-
function
|
|
142
|
-
function
|
|
143
|
-
var
|
|
142
|
+
p.Tf=function(b){this.c[b][0].p.reject(new G(2,3,3014,this.f.error?this.f.error.code:0))};p.ub=function(b){var c=this.c[b][0];c&&(c.p.resolve(),se(this,b))};function oe(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new H};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new G(2,3,3017,c)):d.p.reject(new G(2,3,3015,e)),se(b,c)}return d.p}
|
|
143
|
+
function re(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new H,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new G(2,3,3015,l))}for(var d in this.b)se(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function se(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new G(2,3,3015,e)),se(b,c)}};function te(b,c){b=M(b);c=M(c);return b.split("-")[0]==c.split("-")[0]}function ue(b,c){b=M(b);c=M(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=ve.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function we(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):"und"}
|
|
144
|
+
function xe(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,ue(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,ue(d,f))return f;return null}
|
|
145
|
+
var ve=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
|
|
144
146
|
"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
|
|
145
147
|
"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
|
|
146
148
|
"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
|
|
147
149
|
"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
|
|
148
|
-
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function
|
|
149
|
-
function
|
|
150
|
-
function
|
|
150
|
+
"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ye(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function ze(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=ye(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
|
|
151
|
+
function Ae(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.P&&!pd(b,e))return!1;var f=e.audio;e=e.video;return f&&!ge(f)||e&&!ge(e)||f&&c&&!Be(f,c)||e&&d&&!Be(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return ae(oc(b.mimeType,b.codecs))})}function Be(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
|
|
152
|
+
function Ce(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),
|
|
151
153
|
audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||
|
|
152
|
-
null,b.label=c.label,b.audioRoles=c.roles);return b}function
|
|
153
|
-
function
|
|
154
|
-
function
|
|
155
|
-
function
|
|
156
|
-
function
|
|
157
|
-
function
|
|
158
|
-
N.prototype.chooseVariant=function(){var b=
|
|
159
|
-
N.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;
|
|
154
|
+
null,b.label=c.label,b.audioRoles=c.roles);return b}function De(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
|
|
155
|
+
function Ee(b){b.__shaka_id||(b.__shaka_id=Fe++);return b.__shaka_id}var Fe=0;function Ge(b){return{id:Ee(b),active:!1,type:"",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
|
|
156
|
+
function He(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ie(b){return b.filter(function(b){return He(b)})}
|
|
157
|
+
function Je(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}
|
|
158
|
+
function Ke(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=xe(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Le(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(zd.yc,[]);return b.length?Le(e,b[0]):e}
|
|
159
|
+
function Le(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Me(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function Ne(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c};function N(){this.h=null;this.f=!1;this.b=new Ya;this.c=[];this.i=!1;this.a=this.g=null}A("shaka.abr.SimpleAbrManager",N);N.prototype.stop=function(){this.h=null;this.f=!1;this.c=[];this.g=null};N.prototype.stop=N.prototype.stop;N.prototype.init=function(b){this.h=b};N.prototype.init=N.prototype.init;
|
|
160
|
+
N.prototype.chooseVariant=function(){var b=Oe(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Oe(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0};
|
|
161
|
+
N.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Wa(d.b,f,e);Wa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};
|
|
160
162
|
N.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;
|
|
161
|
-
function
|
|
162
|
-
getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10}
|
|
163
|
-
|
|
164
|
-
function
|
|
165
|
-
d:0>d?"-Infinity":"Infinity":d;return c}})}function
|
|
166
|
-
p.
|
|
167
|
-
p.
|
|
168
|
-
p.get=function(b,c){if("video"==b){if(
|
|
169
|
-
p
|
|
170
|
-
p.Yd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];
|
|
171
|
-
function
|
|
172
|
-
p.kf=function(b,c){var d=
|
|
173
|
-
O.prototype.destroy=function(b){b&&this.a&&this.a.Eb();this.i&&(this.i.release(),this.i=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.l=this.h=this.c=null;return Promise.all(b)};O.prototype.destroy=O.prototype.destroy;O.prototype.Ye=function(){return this.h};O.prototype.getVideo=O.prototype.Ye;O.prototype.Re=function(){return this.l};O.prototype.getPlayer=O.prototype.Re;O.prototype.se=function(){return this.a?this.a.h&&
|
|
174
|
-
O.prototype.canCast=O.prototype.se;O.prototype.
|
|
175
|
-
O.prototype.$f=function(){if(this.a){var b=this.a;if(b.b){var c=b.C();chrome.cast.requestSession(b.
|
|
176
|
-
O.prototype.ve=function(b){var c=this;return t(function e(){return
|
|
177
|
-
O.prototype.forceDisconnect=O.prototype.Eb;function
|
|
178
|
-
function
|
|
179
|
-
function
|
|
180
|
-
b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new
|
|
181
|
-
p.jg=function(b,c){this.a&&this.a.
|
|
182
|
-
p.Ud=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.h}.bind(this);if("getSharedConfiguration"==b)return this.a?this.a.get("player","getConfiguration"):this.b.getConfiguration();if("getNetworkingEngine"==b)return this.b.Fb.bind(this.b);if(this.a&&this.a.
|
|
183
|
-
return null};if("getManifestUri"==b)return
|
|
184
|
-
function
|
|
185
|
-
|
|
186
|
-
function
|
|
187
|
-
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.
|
|
188
|
-
(b.h=!0,
|
|
189
|
-
function
|
|
190
|
-
function
|
|
191
|
-
function
|
|
192
|
-
p.rf=function(b){var c=
|
|
163
|
+
function Oe(b,c){b&&(c=c.filter(function(c){return ye(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Pe(b,c){this.a=b;this.b=c}Pe.prototype.toString=function(){return"v"+this.a+"."+this.b};function Qe(b,c){var d=new Pe(2,6),e=Re,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Se(b,c,d,e){$a([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Te(b,c,d,e){Za([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Re=null;var Ue="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ve="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),We=["loop","playbackRate"],Xe=["pause","play"],Ye="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Ze={getAssetUri:2,
|
|
164
|
+
getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},$e={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},af=[["getConfiguration","configure"]],bf=[["isTextTrackVisible","setTextTrackVisibility"]],
|
|
165
|
+
cf="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),df=["attach","detach","load","unload"];
|
|
166
|
+
function ef(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof J){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
|
|
167
|
+
d:0>d?"-Infinity":"Infinity":d;return c}})}function ff(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?gf(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function gf(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function hf(b,c,d,e,f,g){this.T=b;this.f=new D(c);this.P=d;this.l=!1;this.G=e;this.M=f;this.C=g;this.b=this.h=!1;this.D="";this.i=null;this.m=this.Nd.bind(this);this.s=this.kf.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var jf=!1,kf=null;p=hf.prototype;p.destroy=function(){lf(this);kf&&mf(this);this.f&&(this.f.stop(),this.f=null);this.M=this.G=null;this.b=this.h=!1;this.s=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.ga=function(){return this.b};
|
|
168
|
+
p.cd=function(){return this.D};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.sc();var b=new chrome.cast.SessionRequest(this.T);b=new chrome.cast.ApiConfig(b,this.Od.bind(this),this.pf.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});jf&&this.f.O(.02);(b=kf)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Od(b):kf=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
|
|
169
|
+
p.jd=function(b){this.i=b;this.b&&nf({type:"appData",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new G(1,8,8E3));if(!jf)return Promise.reject(new G(1,8,8001));if(this.b)return Promise.reject(new G(1,8,8002));this.g=new H;chrome.cast.requestSession(this.$c.bind(this,b),this.Md.bind(this));return this.g};p.Eb=function(){this.b&&(lf(this),kf&&(mf(this),kf.stop(function(){},function(){}),kf=null))};
|
|
170
|
+
p.get=function(b,c){if("video"==b){if(Xe.includes(c))return this.Yd.bind(this,b,c)}else if("player"==b){if($e[c]&&!this.get("player","isLive")())return function(){};if(cf.includes(c))return this.Yd.bind(this,b,c);if(df.includes(c))return this.Ef.bind(this,b,c);if(Ze[c])return this.Vd.bind(this,b,c)}return this.Vd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;nf({type:"set",targetName:b,property:c,value:d})};
|
|
171
|
+
p.$c=function(b,c){kf=c;c.addUpdateListener(this.m);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s);this.Nd();nf({type:"init",initState:b,appData:this.i});this.g.resolve()};p.Md=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new G(2,8,c,b))};p.Vd=function(b,c){return this.a[b][c]};
|
|
172
|
+
p.Yd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];nf({type:"call",targetName:b,methodName:c,args:e})};p.Ef=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new H;var g=this.v.toString();this.v++;this.c[g]=f;nf({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};p.Od=function(b){var c=this.C();this.g=new H;this.l=!0;this.$c(c,b)};p.pf=function(b){jf="available"==b;this.f.sc()};
|
|
173
|
+
function mf(b){var c=kf;c.removeUpdateListener(b.m);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.s)}p.Nd=function(){var b=kf?"connected"==kf.status:!1;if(this.b&&!b){this.M();for(var c in this.a)this.a[c]={};lf(this)}this.D=(this.b=b)?kf.receiver.friendlyName:"";this.f.sc()};function lf(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new G(1,7,7E3))}}
|
|
174
|
+
p.kf=function(b,c){var d=ff(c);switch(d.type){case "event":var e=d.event;this.G(d.targetName,new J(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.l&&(this.P(),this.l=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new G(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function nf(b){b=ef(b);kf.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)};function O(b,c,d){var e=this;Ib.call(this);this.c=b;this.b=c;this.i=this.g=this.f=this.l=this.h=null;if(this.m=d)this.a=new hf(d,function(){return of(e)},function(){return pf(e)},function(b,c){return qf(e,b,c)},function(){return rf(e)},function(){return sf(e)});tf(this)}Ua(O,Ib);A("shaka.cast.CastProxy",O);
|
|
175
|
+
O.prototype.destroy=function(b){b&&this.a&&this.a.Eb();this.i&&(this.i.release(),this.i=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.l=this.h=this.c=null;return Promise.all(b)};O.prototype.destroy=O.prototype.destroy;O.prototype.Ye=function(){return this.h};O.prototype.getVideo=O.prototype.Ye;O.prototype.Re=function(){return this.l};O.prototype.getPlayer=O.prototype.Re;O.prototype.se=function(){return this.a?this.a.h&&jf:!1};
|
|
176
|
+
O.prototype.canCast=O.prototype.se;O.prototype.ga=function(){return this.a?this.a.ga():!1};O.prototype.isCasting=O.prototype.ga;O.prototype.cd=function(){return this.a?this.a.cd():""};O.prototype.receiverName=O.prototype.cd;O.prototype.cast=function(){if(!this.a)throw new G(1,8,8007);var b=sf(this);return this.a.cast(b).then(function(){if(this.b)return this.b.rd()}.bind(this))};O.prototype.cast=O.prototype.cast;O.prototype.jd=function(b){this.a&&this.a.jd(b)};O.prototype.setAppData=O.prototype.jd;
|
|
177
|
+
O.prototype.$f=function(){if(this.a){var b=this.a;if(b.b){var c=b.C();chrome.cast.requestSession(b.$c.bind(b,c),b.Md.bind(b))}}};O.prototype.suggestDisconnect=O.prototype.$f;
|
|
178
|
+
O.prototype.ve=function(b){var c=this;return t(function e(){return z(e,function(e){switch(e.j){case 1:if(b==c.m)return e["return"]();c.m=b;if(!c.a){e.A(2);break}c.a.Eb();return u(e,c.a.destroy(),3);case 3:c.a=null;case 2:c.a=new hf(b,function(){return of(c)},function(){return pf(c)},function(b,e){return qf(c,b,e)},function(){return rf(c)},function(){return sf(c)}),c.a.init(),v(e)}})})};O.prototype.changeReceiverId=O.prototype.ve;O.prototype.Eb=function(){this.a&&this.a.Eb()};
|
|
179
|
+
O.prototype.forceDisconnect=O.prototype.Eb;function tf(b){b.a&&b.a.init();b.i=new L;Ue.forEach(function(b){this.i.w(this.c,b,this.ig.bind(this))}.bind(b));Ye.forEach(function(b){this.i.w(this.b,b,this.yf.bind(this))}.bind(b));b.h={};for(var c in b.c)Object.defineProperty(b.h,c,{configurable:!1,enumerable:!0,get:b.hg.bind(b,c),set:b.jg.bind(b,c)});b.l={};for(var d in b.b)Object.defineProperty(b.l,d,{configurable:!1,enumerable:!0,get:b.Ud.bind(b,d)});b.f=new Ib;b.f.Vb=b.h;b.g=new Ib;b.g.Vb=b.l}
|
|
180
|
+
function sf(b){var c={video:{},player:{},playerAfterLoad:{},manifest:b.b.bc(),startTime:null};b.c.pause();We.forEach(function(b){c.video[b]=this.c[b]}.bind(b));b.c.ended||(c.startTime=b.c.currentTime);af.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.player[d]=b}.bind(b));bf.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.playerAfterLoad[d]=b}.bind(b));return c}function of(b){b.dispatchEvent(new J("caststatuschanged"))}function pf(b){b.f.dispatchEvent(new J(b.h.paused?"pause":"play"))}
|
|
181
|
+
function rf(b){af.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b));var c=b.a.get("player","getAssetUri")(),d=b.a.get("video","ended"),e=Promise.resolve(),f=b.c.autoplay,g=null;d||(g=b.a.get("video","currentTime"));c&&(b.c.autoplay=!1,e=b.b.load(c,g));var h={};We.forEach(function(b){h[b]=this.a.get("video",b)}.bind(b));e.then(function(){b.c&&(We.forEach(function(b){this.c[b]=h[b]}.bind(b)),bf.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b)),
|
|
182
|
+
b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new J("error",{detail:c}))})}p=O.prototype;p.hg=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a&&this.a.ga()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a&&this.a.ga()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
|
|
183
|
+
p.jg=function(b,c){this.a&&this.a.ga()?this.a.set("video",b,c):this.c[b]=c};p.ig=function(b){this.a&&this.a.ga()||this.f.dispatchEvent(new J(b.type,b))};
|
|
184
|
+
p.Ud=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.h}.bind(this);if("getSharedConfiguration"==b)return this.a?this.a.get("player","getConfiguration"):this.b.getConfiguration();if("getNetworkingEngine"==b)return this.b.Fb.bind(this.b);if(this.a&&this.a.ga()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");
|
|
185
|
+
return null};if("getManifestUri"==b)return Qe("getManifestUri",'Please use "getAssetUri" instead.'),this.Ud("getAssetUri");if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return this.a&&this.a.ga()&&0==Object.keys(this.a.a.video).length&&Ze[b]||!this.a||!this.a.ga()?this.b[b].bind(this.b):this.a.get("player",b)};p.yf=function(b){this.a&&this.a.ga()||this.g.dispatchEvent(b)};
|
|
186
|
+
function qf(b,c,d){b.a.ga()&&("video"==c?b.f.dispatchEvent(d):"player"==c&&b.g.dispatchEvent(d))};function uf(b,c,d,e){var f=this;Ib.call(this);this.a=b;this.b=c;this.c=new L;this.D={video:b,player:c};this.s=d||function(){};this.G=e||function(b){return b};this.v=!1;this.h=!0;this.g=0;this.m=!1;this.l=!0;this.i=this.f=null;this.C=new D(function(){vf(f)});wf(this)}Ua(uf,Ib);A("shaka.cast.CastReceiver",uf);uf.prototype.isConnected=function(){return this.v};uf.prototype.isConnected=uf.prototype.isConnected;uf.prototype.bf=function(){return this.h};uf.prototype.isIdle=uf.prototype.bf;
|
|
187
|
+
uf.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return b.c&&(b.c.release(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.C&&(b.C.stop(),b.C=null),b.a=null,b.D=null,b.s=null,b.v=!1,b.h=!0,b.f=null,b.i=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),v(d)}})})};uf.prototype.destroy=uf.prototype.destroy;
|
|
188
|
+
function wf(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Qd.bind(b);c.onSenderDisconnected=b.Qd.bind(b);c.onSystemVolumeChanged=b.Be.bind(b);b.i=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.i.onMessage=b.ef.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.rf.bind(b);c.start();Ue.forEach(function(b){this.c.w(this.a,b,this.Wd.bind(this,"video"))}.bind(b));Ye.forEach(function(b){this.c.w(this.b,b,this.Wd.bind(this,"player"))}.bind(b));
|
|
189
|
+
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.kd(3840,2160):b.b.kd(1920,1080);b.c.w(b.a,"loadeddata",function(){this.m=!0}.bind(b));b.c.w(b.b,"loading",function(){this.h=!1;xf(this)}.bind(b));b.c.w(b.a,"playing",function(){this.h=!1;xf(this)}.bind(b));b.c.w(b.a,"pause",function(){xf(this)}.bind(b));b.c.w(b.b,"unloading",function(){this.h=!0;xf(this)}.bind(b));b.c.w(b.a,"ended",function(){var b=this;(new D(function(){b.a&&b.a.ended&&
|
|
190
|
+
(b.h=!0,xf(b))})).O(5)}.bind(b))}p=uf.prototype;p.Qd=function(){this.g=0;this.l=!0;this.v=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;xf(this)};function xf(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new J("caststatuschanged")),yf(this)||zf(this,0))}.bind(b))}
|
|
191
|
+
function Af(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.s(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),zf(b,0))}},function(c){b.b.dispatchEvent(new J("error",{detail:c}))})}p.Wd=function(b,c){this.b&&(vf(this),Bf(this,{type:"event",targetName:b,event:c},this.f))};
|
|
192
|
+
function vf(b){b.C.O(.5);var c={video:{},player:{}};Ve.forEach(function(b){c.video[b]=this.a[b]}.bind(b));if(b.b.V())for(var d in $e)0==b.g%$e[d]&&(c.player[d]=b.b[d]());for(var e in Ze)0==b.g%Ze[e]&&(c.player[e]=b.b[e]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.m&&(b.g+=1);Bf(b,{type:"update",update:c},b.f);yf(b)}function yf(b){return b.l&&(b.a.duration||b.b.V())?(Cf(b),b.l=!1,!0):!1}
|
|
193
|
+
function Cf(b){var c={contentId:b.b.bc(),streamType:b.b.V()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};zf(b,0,c)}p.Be=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&Bf(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);Bf(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
|
|
194
|
+
p.rf=function(b){var c=ff(b.data);switch(c.type){case "init":this.g=0;this.m=!1;this.l=!0;Af(this,c.initState,c.appData);vf(this);break;case "appData":this.s(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}this.D[d][e]=c;break;case "call":d=this.D[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
|
|
193
195
|
c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.m=!1);f=c.id;b=b.senderId;var g=this.D[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.l=!0}.bind(this)));c.then(this.be.bind(this,b,f,null),this.be.bind(this,b,f))}};
|
|
194
|
-
p.ef=function(b){var c=
|
|
195
|
-
d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||
|
|
196
|
-
this.i)}.bind(this));break;default:
|
|
197
|
-
function
|
|
196
|
+
p.ef=function(b){var c=ff(b.data);switch(c.type){case "PLAY":this.a.play();zf(this,0);break;case "PAUSE":this.a.pause();zf(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),zf(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),zf(this,0));break;case "STOP":this.b.rd().then(function(){this.b&&zf(this,0)}.bind(this));break;case "GET_STATUS":zf(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
|
|
197
|
+
d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||zf(this,0);break;case "LOAD":this.g=0;this.l=this.m=!1;b=c.media;d=c.currentTime;e=this.G(b.contentId);f=c.autoplay||!0;this.s(b.customData);f&&(this.a.autoplay=!0);this.b.load(e,d).then(function(){this.b&&Cf(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");Bf(this,{requestId:Number(c.requestId),type:d},
|
|
198
|
+
this.i)}.bind(this));break;default:Bf(this,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}};p.be=function(b,c,d){this.b&&Bf(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function Bf(b,c,d,e){b.v&&(b=ef(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
|
|
199
|
+
function zf(b,c,d){var e=b.a.playbackRate;var f=Df;f=b.h?f.IDLE:b.b.Oc()?f.je:b.a.paused?f.le:f.me;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);Bf(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.i)}var Df={IDLE:"IDLE",me:"PLAYING",je:"BUFFERING",le:"PAUSED"};function P(b,c){this.K=b;this.b=c==Ef;this.a=0}A("shaka.util.DataViewReader",P);var Ef=1;P.Endianness={lg:0,mg:Ef};P.prototype.sa=function(){return this.a<this.K.byteLength};P.prototype.hasMoreData=P.prototype.sa;P.prototype.ba=function(){return this.a};P.prototype.getPosition=P.prototype.ba;P.prototype.Ie=function(){return this.K.byteLength};P.prototype.getLength=P.prototype.Ie;P.prototype.ka=function(){try{var b=this.K.getUint8(this.a);this.a+=1;return b}catch(c){Ff()}};P.prototype.readUint8=P.prototype.ka;
|
|
200
|
+
P.prototype.Mb=function(){try{var b=this.K.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Ff()}};P.prototype.readUint16=P.prototype.Mb;P.prototype.F=function(){try{var b=this.K.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Ff()}};P.prototype.readUint32=P.prototype.F;P.prototype.Xd=function(){try{var b=this.K.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Ff()}};P.prototype.readInt32=P.prototype.Xd;
|
|
201
|
+
P.prototype.yb=function(){try{if(this.b){var b=this.K.getUint32(this.a,!0);var c=this.K.getUint32(this.a+4,!0)}else c=this.K.getUint32(this.a,!1),b=this.K.getUint32(this.a+4,!1)}catch(d){Ff()}if(2097151<c)throw new G(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};P.prototype.readUint64=P.prototype.yb;P.prototype.Xa=function(b){this.a+b>this.K.byteLength&&Ff();var c=new Uint8Array(this.K.buffer,this.K.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};P.prototype.readBytes=P.prototype.Xa;
|
|
202
|
+
P.prototype.L=function(b){this.a+b>this.K.byteLength&&Ff();this.a+=b};P.prototype.skip=P.prototype.L;P.prototype.$d=function(b){this.a<b&&Ff();this.a-=b};P.prototype.rewind=P.prototype.$d;P.prototype.seek=function(b){(0>b||b>this.K.byteLength)&&Ff();this.a=b};P.prototype.seek=P.prototype.seek;P.prototype.bd=function(){for(var b=this.a;this.sa()&&0!=this.K.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.K.buffer,this.K.byteOffset+b,this.a-b);this.a+=1;return Ac(b)};
|
|
203
|
+
P.prototype.readTerminatedString=P.prototype.bd;function Ff(){throw new G(2,3,3E3);};function Q(){this.c=[];this.b=[];this.a=!1}A("shaka.util.Mp4Parser",Q);Q.prototype.H=function(b,c){var d=Gf(b);this.c[d]=0;this.b[d]=c;return this};Q.prototype.box=Q.prototype.H;Q.prototype.fa=function(b,c){var d=Gf(b);this.c[d]=1;this.b[d]=c;return this};Q.prototype.fullBox=Q.prototype.fa;Q.prototype.stop=function(){this.a=!0};Q.prototype.stop=Q.prototype.stop;
|
|
204
|
+
Q.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new P(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.sa()&&!this.a;)this.mc(0,d,c)};Q.prototype.parse=Q.prototype.parse;
|
|
205
|
+
Q.prototype.mc=function(b,c,d){var e=c.ba(),f=c.F(),g=c.F();switch(f){case 0:f=c.K.byteLength-e;break;case 1:f=c.yb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.F(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.K.byteLength&&(g=c.K.byteLength);g-=c.ba();c=0<g?c.Xa(g):new Uint8Array(0);c=new P(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.L(Math.min(e+f-c.ba(),c.K.byteLength-c.ba()))};
|
|
206
|
+
Q.prototype.parseNext=Q.prototype.mc;function Hf(b){for(;b.reader.sa()&&!b.parser.a;)b.parser.mc(b.start,b.reader,b.partialOkay)}Q.children=Hf;function If(b){for(var c=b.reader.F();0<c&&!b.parser.a;--c)b.parser.mc(b.start,b.reader,b.partialOkay)}Q.sampleDescription=If;function Jf(b){return function(c){b(c.reader.Xa(c.reader.K.byteLength-c.reader.ba()))}}Q.allData=Jf;function Gf(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
|
|
207
|
+
function Kf(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}Q.typeToString=Kf;function Lf(b){this.f=[];this.b=[];this.a=[];(new Q).fa("pssh",this.c.bind(this)).parse(b.buffer)}Lf.prototype.c=function(b){if(!(1<b.version)){var c=Ic(b.reader.Xa(16)),d=[];if(0<b.version)for(var e=b.reader.F(),f=0;f<e;++f){var g=Ic(b.reader.Xa(16));d.push(g)}e=b.reader.F();b.reader.L(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};var R={ac:function(b,c){var d=R.R(b,c);return 1!=d.length?null:d[0]},Gc:function(b,c,d){b=R.zd(b,c,d);return 1!=b.length?null:b[0]},R:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},zd:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},cc:function(b){return Array.prototype.every.call(b.childNodes,
|
|
198
208
|
function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},J:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},vf:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Ba:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
|
|
199
209
|
if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},oc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},nc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},vb:function(b){b=Number(b);return 0===
|
|
200
|
-
b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},Ae:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},Td:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Sd:function(b,c){try{var d=
|
|
201
|
-
function
|
|
202
|
-
r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{
|
|
203
|
-
function
|
|
204
|
-
function
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},Ae:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},Td:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Sd:function(b,c){try{var d=Ac(b);return R.Td(d,c)}catch(e){}}};var Mf=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
|
|
211
|
+
function Nf(b,c,d){var e=Of(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new G(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.ae?(f=b.init||f,!1):!0}),g.length&&(b=Pf(f,c,g),0==b.length&&(b=[Bd("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(Mf.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(Bd(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
|
|
212
|
+
r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{wd:h,pg:f,drmInfos:b,Ad:!0}}function Qf(b,c,d,e){var f=Nf(b,c,e);if(d.Ad){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.Ad=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new G(2,4,4008);return f.wd||d.wd}
|
|
213
|
+
function Rf(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Sf(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
|
|
214
|
+
function Pf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Mf.get(f.ae);if(g){var h;if(h=R.Gc(f.node,"urn:microsoft:playready","pro")){h=Gc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=h.length,m=k.length+16+l,n=new ArrayBuffer(m),q=new Uint8Array(n);n=new DataView(n);var w=0;n.setUint32(w,m);w+=4;n.setUint32(w,1886614376);w+=4;n.setUint32(w,0);w+=4;q.set(k,w);w+=k.length;n.setUint32(w,l);w+=4;q.set(h,w);h=[{initData:q,
|
|
215
|
+
initDataType:"cenc",keyId:f.keyId}]}else h=null;h=Bd(g,f.init||b||h);if(g=Tf.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),g=f.next();!g.done;g=f.next())e.push(g.value)}return e}
|
|
216
|
+
var Tf=(new Map).set("com.widevine.alpha",function(b){return(b=R.Gc(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=R.Gc(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Gc(b.textContent);b=Rf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=hc(b.value,!0);return(b=R.Td(b,"WRMHEADER"))?Sf(b):""});function Of(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Uf(d.value))&&c.push(d);return c}
|
|
217
|
+
function Uf(b){var c=b.getAttribute("schemeIdUri"),d=R.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=R.zd(b,"urn:mpeg:cenc:2013","pssh").map(R.cc);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new G(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Gc(b),keyId:null}})}catch(g){throw new G(2,4,4007);}return{node:b,ae:c,keyId:d,init:0<f.length?f:null}};function Vf(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
|
|
207
218
|
window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
|
|
208
|
-
function
|
|
209
|
-
1],"t",
|
|
210
|
-
function
|
|
211
|
-
function
|
|
212
|
-
4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
R.prototype.yb=function(){try{if(this.b){var b=this.K.getUint32(this.a,!0);var c=this.K.getUint32(this.a+4,!0)}else c=this.K.getUint32(this.a,!1),b=this.K.getUint32(this.a+4,!1)}catch(d){Sf()}if(2097151<c)throw new D(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};R.prototype.readUint64=R.prototype.yb;R.prototype.Xa=function(b){this.a+b>this.K.byteLength&&Sf();var c=new Uint8Array(this.K.buffer,this.K.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Xa;
|
|
217
|
-
R.prototype.L=function(b){this.a+b>this.K.byteLength&&Sf();this.a+=b};R.prototype.skip=R.prototype.L;R.prototype.$d=function(b){this.a<b&&Sf();this.a-=b};R.prototype.rewind=R.prototype.$d;R.prototype.seek=function(b){(0>b||b>this.K.byteLength)&&Sf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.ad=function(){for(var b=this.a;this.sa()&&0!=this.K.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.K.buffer,this.K.byteOffset+b,this.a-b);this.a+=1;return wc(b)};
|
|
218
|
-
R.prototype.readTerminatedString=R.prototype.ad;function Sf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z("shaka.util.Mp4Parser",S);S.prototype.H=function(b,c){var d=Tf(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.H;S.prototype.ea=function(b,c){var d=Tf(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ea;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;
|
|
219
|
-
S.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.sa()&&!this.a;)this.mc(0,d,c)};S.prototype.parse=S.prototype.parse;
|
|
220
|
-
S.prototype.mc=function(b,c,d){var e=c.ba(),f=c.F(),g=c.F();switch(f){case 0:f=c.K.byteLength-e;break;case 1:f=c.yb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.F(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.K.byteLength&&(g=c.K.byteLength);g-=c.ba();c=0<g?c.Xa(g):new Uint8Array(0);c=new R(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.L(Math.min(e+f-c.ba(),c.K.byteLength-c.ba()))};
|
|
221
|
-
S.prototype.parseNext=S.prototype.mc;function Uf(b){for(;b.reader.sa()&&!b.parser.a;)b.parser.mc(b.start,b.reader,b.partialOkay)}S.children=Uf;function Vf(b){for(var c=b.reader.F();0<c&&!b.parser.a;--c)b.parser.mc(b.start,b.reader,b.partialOkay)}S.sampleDescription=Vf;function Wf(b){return function(c){b(c.reader.Xa(c.reader.K.byteLength-c.reader.ba()))}}S.allData=Wf;function Tf(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
|
|
222
|
-
function Xf(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Xf;function Yf(b,c,d,e){var f,g=(new S).ea("sidx",function(b){f=Zf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);}
|
|
223
|
-
function Zf(b,c,d,e){var f=[];e.reader.L(4);var g=e.reader.F();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.F();var k=e.reader.F()}else h=e.reader.yb(),k=e.reader.yb();e.reader.L(2);var l=e.reader.Mb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.F(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.F();e.reader.L(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};T.prototype.find=T.prototype.find;
|
|
219
|
+
function Wf(b,c){var d=Xf(b,c,"timescale"),e=1;d&&(e=R.nc(d)||1);d=Xf(b,c,"duration");(d=R.nc(d||""))&&(d/=e);var f=Xf(b,c,"startNumber"),g=Number(Xf(b,c,"presentationTimeOffset"))||0,h=R.vb(f||"");if(null==f||null==h)h=1;var k=Yf(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.S.duration||Infinity;k=R.R(k,"S");for(var m=[],n=0,q=0;q<k.length;++q){var w=k[q],x=R.J(w,"t",R.vb),B=R.J(w,"d",R.vb);w=R.J(w,"r",R.parseInt);null!=x&&(x-=g);if(!B)break;x=null!=x?x:n;w=w||0;if(0>w)if(q+1<k.length){w=R.J(k[q+
|
|
220
|
+
1],"t",R.vb);if(null==w)break;else if(x>=w)break;w=Math.ceil((w-x)/B)-1}else{if(Infinity==l)break;else if(x/f>=l)break;w=Math.ceil((l*f-x)/B)-1}0<m.length&&x!=n&&(m[m.length-1].end=x/f);for(var C=0;C<=w;++C)n=x+B,m.push({start:x/f,end:n/f,eg:x}),x=n}f=m}return{timescale:e,Z:d,Za:h,la:g/e||0,sd:g,N:f}}function Xf(b,c,d){return[c(b.B),c(b.ca),c(b.ja)].filter(zd.Ga).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
|
|
221
|
+
function Yf(b,c,d){return[c(b.B),c(b.ca),c(b.ja)].filter(zd.Ga).map(function(b){return R.ac(b,d)}).reduce(function(b,c){return b||c})}
|
|
222
|
+
function Zf(b,c,d,e,f,g){for(var h=R.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=R.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return Ab(new G(2,4,4028));if("onLoad"!=k)return Ab(new G(2,4,4027));var n=Ad([e],[h]);return f.request(0,Tb(n,c)).U(function(e){e=R.Sd(e.data,b.tagName);if(!e)return Ab(new G(2,
|
|
223
|
+
4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return $f(b,c,d,n[0],f,g+1)})}
|
|
224
|
+
function $f(b,c,d,e,f,g){g=void 0===g?0:g;if(R.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Zf(b,c,d,e,f,g);d&&(h=h.U(void 0,function(){return $f(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==R.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push($f(l,c,d,e,f,g)))}return Fb(h).U(function(){return b})};function ag(b,c,d){this.c=b;this.b=c;this.a=d}A("shaka.media.InitSegmentReference",ag);ag.prototype.Ac=function(){return this.c()};ag.prototype.createUris=ag.prototype.Ac;ag.prototype.Lc=function(){return this.b};ag.prototype.getStartByte=ag.prototype.Lc;ag.prototype.Kc=function(){return this.a};ag.prototype.getEndByte=ag.prototype.Kc;function S(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}A("shaka.media.SegmentReference",S);S.prototype.ba=function(){return this.position};
|
|
225
|
+
S.prototype.getPosition=S.prototype.ba;S.prototype.Mc=function(){return this.startTime};S.prototype.getStartTime=S.prototype.Mc;S.prototype.Ge=function(){return this.endTime};S.prototype.getEndTime=S.prototype.Ge;S.prototype.Ac=function(){return this.c()};S.prototype.createUris=S.prototype.Ac;S.prototype.Lc=function(){return this.b};S.prototype.getStartByte=S.prototype.Lc;S.prototype.Kc=function(){return this.a};S.prototype.getEndByte=S.prototype.Kc;function bg(b,c,d,e){var f,g=(new Q).fa("sidx",function(b){f=cg(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new G(2,3,3004);}
|
|
226
|
+
function cg(b,c,d,e){var f=[];e.reader.L(4);var g=e.reader.F();if(0==g)throw new G(2,3,3005);if(0==e.version){var h=e.reader.F();var k=e.reader.F()}else h=e.reader.yb(),k=e.reader.yb();e.reader.L(2);var l=e.reader.Mb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.F(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.F();e.reader.L(4);if(1==n)throw new G(2,3,3006);f.push(new S(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}A("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};T.prototype.find=T.prototype.find;
|
|
224
227
|
T.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};T.prototype.offset=T.prototype.offset;
|
|
225
|
-
T.prototype.
|
|
226
|
-
T.prototype.Dc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.Dc;function
|
|
227
|
-
function
|
|
228
|
-
function
|
|
229
|
-
|
|
230
|
-
}if(null==h)throw new
|
|
231
|
-
function
|
|
232
|
-
function
|
|
228
|
+
T.prototype.Tc=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new S(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new S(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};T.prototype.merge=T.prototype.Tc;
|
|
229
|
+
T.prototype.Dc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.Dc;function dg(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new S(d.position,d.startTime,c,d.c,d.b,d.a)}};function eg(b){this.b=b;this.a=new P(b,0);fg||(fg=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var fg;eg.prototype.sa=function(){return this.a.sa()};
|
|
230
|
+
function gg(b){var c=hg(b);if(7<c.length)throw new G(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=hg(b);a:{for(e=0;e<fg.length;e++)if(Jc(d,fg[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.ba();else{if(8==d.length&&d[1]&224)throw new G(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.ba()+d<=b.b.byteLength?d:b.b.byteLength-b.a.ba();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.ba(),d);b.a.L(d);return new ig(c,e)}
|
|
231
|
+
function hg(b){var c=b.a.ka(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new G(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.ka();return e}function ig(b,c){this.id=b;this.a=c}function jg(b){if(8<b.a.byteLength)throw new G(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new G(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function kg(){}
|
|
232
|
+
kg.prototype.parse=function(b,c,d,e){var f;c=new eg(new DataView(c));if(440786851!=gg(c).id)throw new G(2,3,3008);var g=gg(c);if(408125543!=g.id)throw new G(2,3,3009);c=g.a.byteOffset;g=new eg(g.a);for(f=null;g.sa();){var h=gg(g);if(357149030==h.id){f=h;break}}if(!f)throw new G(2,3,3010);g=new eg(f.a);f=1E6;for(h=null;g.sa();){var k=gg(g);if(2807729==k.id)f=jg(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new G(2,3,3003);
|
|
233
|
+
}if(null==h)throw new G(2,3,3011);g=f/1E9;f=h*g;b=gg(new eg(new DataView(b)));if(475249515!=b.id)throw new G(2,3,3007);return lg(b,c,g,f,d,e)};function lg(b,c,d,e,f,g){function h(){return f}var k=[];b=new eg(b.a);for(var l=null,m=null;b.sa();){var n=gg(b);if(187==n.id){var q=mg(n);q&&(n=d*q.fg,q=c+q.Df,null!=l&&k.push(new S(k.length,l-g,n-g,h,m,q-1)),l=n,m=q)}}null!=l&&k.push(new S(k.length,l-g,e-g,h,m,null));return k}
|
|
234
|
+
function mg(b){var c=new eg(b.a);b=gg(c);if(179!=b.id)throw new G(2,3,3013);b=jg(b);c=gg(c);if(183!=c.id)throw new G(2,3,3012);c=new eg(c.a);for(var d=0;c.sa();){var e=gg(c);if(241==e.id){d=jg(e);break}}return{fg:b,Df:d}};function ng(b,c){var d=Yf(b,c,"Initialization");if(!d)return null;var e=b.B.oa,f=d.getAttribute("sourceURL");f&&(e=Ad(b.B.oa,[f]));f=0;var g=null;if(d=R.J(d,"range",R.oc))f=d.start,g=d.end;return new ag(function(){return e},f,g)}
|
|
235
|
+
function og(b,c){var d=Number(Xf(b,pg,"presentationTimeOffset"))||0,e=Xf(b,pg,"timescale"),f=1;e&&(f=R.nc(e)||1);d=d/f||0;e=ng(b,pg);var g=b.B.contentType;f=b.B.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new G(2,4,4006);if("webm"==f&&!e)throw new G(2,4,4005);g=Yf(b,pg,"RepresentationIndex");var h=Xf(b,pg,"indexRange"),k=b.B.oa;h=R.oc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=Ad(b.B.oa,[l]));h=R.J(g,"range",R.oc,h)}if(!h)throw new G(2,4,4002);f=qg(b,c,e,k,h.start,h.end,
|
|
233
236
|
f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,la:d}}
|
|
234
|
-
function
|
|
235
|
-
b.S.start),f=new T(h),g&&b.kb&&(c[g]=f));b.kb&&b.S.
|
|
236
|
-
function
|
|
237
|
-
function
|
|
238
|
-
d,g.la)}else g.Z?(e||(b.presentationTimeline.
|
|
239
|
-
findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,la:g.la}}function
|
|
240
|
-
function
|
|
241
|
-
function
|
|
242
|
-
U.Af=function(){var b={};if(
|
|
243
|
-
U.create=function(b,c,d,e){return t(function g(){var h,k;return
|
|
244
|
-
U.He=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return
|
|
245
|
-
U.Oe=function(b,c,d){return t(function f(){var g,h,k;return
|
|
246
|
-
W.prototype.Rb=function(b){this.m=b};W.prototype.setStatic=W.prototype.Rb;W.prototype.
|
|
247
|
-
W.prototype.sb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.
|
|
248
|
-
W.prototype.notifyMaxSegmentDuration=W.prototype.
|
|
237
|
+
function qg(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.kb||!b.S.Qc,n=b.S.start,q=b.S.duration,w=c,x=null;return{createSegmentIndex:function(){var b=[w(e,f,g),"webm"==h?w(d.c(),d.b,d.a):null];w=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?bg(c,f,e,k):(new kg).parse(c,b,e,k);l.sb(c,n);x=new T(c);m&&dg(x,q)})},findSegmentPosition:function(b){return x.find(b)},getSegmentReference:function(b){return x.get(b)}}}function pg(b){return b.Ob};function rg(b,c){var d=ng(b,sg);var e=tg(b);var f=Wf(b,sg),g=f.Za;0==g&&(g=1);var h=0;f.Z?h=f.Z*(g-1):f.N&&0<f.N.length&&(h=f.N[0].start);e={Z:f.Z,startTime:h,Za:g,la:f.la,N:f.N,qb:e};if(!e.Z&&!e.N&&1<e.qb.length)throw new G(2,4,4002);if(!e.Z&&!b.S.duration&&!e.N&&1==e.qb.length)throw new G(2,4,4002);if(e.N&&0==e.N.length)throw new G(2,4,4002);g=f=null;b.ja.id&&b.B.id&&(g=b.ja.id+","+b.B.id,f=c[g]);h=ug(b.S.duration,e.Za,b.B.oa,e);f?(f.Tc(h),g=b.presentationTimeline.Hb(),f.Dc(g-b.S.start)):(b.presentationTimeline.sb(h,
|
|
238
|
+
b.S.start),f=new T(h),g&&b.kb&&(c[g]=f));b.kb&&b.S.Qc||dg(f,b.S.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,la:e.la}}function sg(b){return b.Ja}
|
|
239
|
+
function ug(b,c,d,e){var f=e.qb.length;e.N&&e.N.length!=e.qb.length&&(f=Math.min(e.N.length,e.qb.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.qb[k],m=Ad(d,[l.cf]),n=void 0;n=null!=e.Z?h+e.Z:e.N?e.N[k].end:h+b;g.push(new S(k+c,h,n,function(b){return b}.bind(null,m),l.start,l.end));h=n}return g}
|
|
240
|
+
function tg(b){return[b.B.Ja,b.ca.Ja,b.ja.Ja].filter(zd.Ga).map(function(b){return R.R(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.Fd&&(b.Fd=!0);var d=c.getAttribute("media");c=R.J(c,"mediaRange",R.oc,{start:0,end:null});return{cf:d,start:c.start,end:c.end}})};function vg(b,c,d,e){var f=wg(b);var g=Wf(b,xg);var h=Xf(b,xg,"media"),k=Xf(b,xg,"index");g={Z:g.Z,timescale:g.timescale,Za:g.Za,la:g.la,sd:g.sd,N:g.N,Sc:h,Jb:k};h=g.Jb?1:0;h+=g.N?1:0;h+=g.Z?1:0;if(0==h)throw new G(2,4,4002);1!=h&&(g.Jb&&(g.N=null),g.Z=null);if(!g.Jb&&!g.Sc)throw new G(2,4,4002);if(g.Jb){d=b.B.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new G(2,4,4006);if("webm"==d&&!f)throw new G(2,4,4005);e=Vf(g.Jb,b.B.id,null,b.bandwidth||null,null);e=Ad(b.B.oa,[e]);b=qg(b,c,f,e,0,null,
|
|
241
|
+
d,g.la)}else g.Z?(e||(b.presentationTimeline.Vc(g.Z),b.presentationTimeline.Wc(b.S.start)),b=yg(b,g)):(h=c=null,b.ja.id&&b.B.id&&(h=b.ja.id+","+b.B.id,c=d[h]),k=zg(b,g),e=!b.kb||!b.S.Qc,c?(e&&dg(new T(k),b.S.duration),c.Tc(k),d=b.presentationTimeline.Hb(),c.Dc(d-b.S.start)):(b.presentationTimeline.sb(k,b.S.start),c=new T(k),h&&b.kb&&(d[h]=c)),e&&dg(c,b.S.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
|
|
242
|
+
findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,la:g.la}}function xg(b){return b.Qb}
|
|
243
|
+
function yg(b,c){var d=b.S.duration,e=c.Z,f=c.Za,g=c.timescale,h=c.Sc,k=b.bandwidth||null,l=b.B.id,m=b.B.oa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new S(b,c,n,function(){var d=Vf(h,l,b+f,k,c*g);return Ad(m,[d])},0,null)}}}
|
|
244
|
+
function zg(b,c){for(var d=[],e=0;e<c.N.length;e++){var f=e+c.Za;d.push(new S(f,c.N[e].start,c.N[e].end,function(b,c,d,e,f,n){b=Vf(b,c,f,d,n);return Ad(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Sc,b.B.id,b.bandwidth||null,b.B.oa,f,c.N[e].eg+c.sd),0,null))}return d}function wg(b){var c=Xf(b,xg,"initialization");if(!c)return null;var d=b.B.id,e=b.bandwidth||null,f=b.B.oa;return new ag(function(){var b=Vf(c,d,null,e,null);return Ad(f,[b])},0,null)};var U={wb:{},Lb:{},ed:function(b,c){U.Lb[b]=c}};A("shaka.media.ManifestParser.registerParserByExtension",U.ed);U.Nb=function(b,c){U.wb[b]=c};A("shaka.media.ManifestParser.registerParserByMime",U.Nb);
|
|
245
|
+
U.Af=function(){var b={};if(sc()){for(var c in U.wb)b[c]=!0;for(var d in U.Lb)b[d]=!0}c={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};d=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var e=d.next();!e.done;e=d.next())e=e.value,b[e]=sc()?!!U.wb[e]:tc(e);for(var f in c)b[f]=sc()?!!U.Lb[f]:tc(c[f]);return b};
|
|
246
|
+
U.create=function(b,c,d,e){return t(function g(){var h,k;return z(g,function(g){switch(g.j){case 1:return y(g,2),u(g,U.He(b,c,d,e),4);case 4:return h=g.o,g["return"](new h);case 2:throw k=Ca(g),k.severity=2,k;}})})};
|
|
247
|
+
U.He=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return z(g,function(g){switch(g.j){case 1:h=U;if(e&&(k=h.wb[e.toLowerCase()]))return g["return"](k);if(l=h.getExtension(b))if(m=h.Lb[l])return g["return"](m);if(e){g.A(2);break}return u(g,h.Oe(b,c,d),3);case 3:if(e=g.o)if(n=U.wb[e])return g["return"](n);case 2:throw new G(2,4,4E3,b);}})})};
|
|
248
|
+
U.Oe=function(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:return g=Tb([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.o,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};U.getExtension=function(b){b=(new cb(b)).ia.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()};U.isSupported=function(b,c){return sc()?c in U.wb||U.getExtension(b)in U.Lb?!0:!1:!1};function W(b,c,d){this.f=b;this.pc=c;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.l=0;this.m=!0;this.i=0;this.s=void 0===d?!0:d}A("shaka.media.PresentationTimeline",W);W.prototype.Y=function(){return this.g};W.prototype.getDuration=W.prototype.Y;W.prototype.wa=function(b){this.g=b};W.prototype.setDuration=W.prototype.wa;W.prototype.Te=function(){return this.f};W.prototype.getPresentationStartTime=W.prototype.Te;W.prototype.ce=function(b){this.l=b};W.prototype.setClockOffset=W.prototype.ce;
|
|
249
|
+
W.prototype.Rb=function(b){this.m=b};W.prototype.setStatic=W.prototype.Rb;W.prototype.md=function(b){this.h=b};W.prototype.setSegmentAvailabilityDuration=W.prototype.md;W.prototype.Qf=function(b){this.pc=b};W.prototype.setDelay=W.prototype.Qf;W.prototype.Fe=function(){return this.pc};W.prototype.getDelay=W.prototype.Fe;
|
|
250
|
+
W.prototype.sb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.Wc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1E3-this.b-this.a)}};W.prototype.notifySegments=W.prototype.sb;W.prototype.Wc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};W.prototype.notifyMinSegmentStartTime=W.prototype.Wc;W.prototype.Vc=function(b){this.a=Math.max(this.a,b)};
|
|
251
|
+
W.prototype.notifyMaxSegmentDuration=W.prototype.Vc;W.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};W.prototype.offset=W.prototype.offset;W.prototype.V=function(){return Infinity==this.g&&!this.m};W.prototype.isLive=W.prototype.V;W.prototype.Va=function(){return Infinity!=this.g&&!this.m};W.prototype.isInProgress=W.prototype.Va;W.prototype.Hb=function(){if(Infinity==this.h)return this.i;var b=this.nb()-this.h;return Math.max(this.i,b)};
|
|
249
252
|
W.prototype.getSegmentAvailabilityStart=W.prototype.Hb;W.prototype.de=function(b){this.i=b};W.prototype.setUserSeekStart=W.prototype.de;W.prototype.nb=function(){return this.V()||this.Va()?Math.min(Math.max(0,(Date.now()+this.l)/1E3-this.a-this.f),this.g):this.g};W.prototype.getSegmentAvailabilityEnd=W.prototype.nb;W.prototype.Gb=function(b){var c=Math.max(this.c,this.i);if(Infinity==this.h)return c;var d=this.nb()-this.h;b=Math.min(d+b,this.za());return Math.max(c,b)};
|
|
250
|
-
W.prototype.getSafeSeekRangeStart=W.prototype.Gb;W.prototype.mb=function(){return this.Gb(0)};W.prototype.getSeekRangeStart=W.prototype.mb;W.prototype.za=function(){var b=this.V()||this.Va()?this.pc:0;return Math.max(0,this.nb()-b)};W.prototype.getSeekRangeEnd=W.prototype.za;W.prototype.he=function(){return null==this.f||null!=this.b?!1:!0};W.prototype.usingPresentationStartTime=W.prototype.he;function
|
|
251
|
-
p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.l=[];this.m={};null!=this.i&&(this.i.stop(),this.i=null);return this.g.destroy()};p.update=function(){
|
|
252
|
-
function
|
|
253
|
-
function
|
|
254
|
-
m.Ba);
|
|
255
|
-
wb=null;if(
|
|
256
|
-
!isNaN(b.b.availabilityWindowOverride)&&(V=b.b.availabilityWindowOverride);null==V&&(V=Infinity);da.
|
|
257
|
-
function
|
|
258
|
-
b.streams[0],d=b.
|
|
259
|
-
function
|
|
260
|
-
0,f={id:b.h++,language:g.language||"und",primary:g.
|
|
261
|
-
p.uf=function(b,c){b.ca=
|
|
262
|
-
m=b.getAttribute("value"):n=!0});k=
|
|
263
|
-
q.set("CC1","und")}if(n)return null;e=
|
|
264
|
-
c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(
|
|
265
|
-
p.xf=function(b,c,d,e,f,g,h,k,l){b.B=
|
|
266
|
-
0,null)},initSegmentReference:null,la:0}}}catch(
|
|
267
|
-
height:b.B.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.B.emsgSchemeIdUris,roles:h,channelsCount:b.B.
|
|
268
|
-
function
|
|
269
|
-
function
|
|
270
|
-
"AudioChannelConfiguration");m=
|
|
271
|
-
function
|
|
272
|
-
16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function
|
|
273
|
-
function
|
|
274
|
-
function
|
|
275
|
-
c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return
|
|
276
|
-
return 0})}p.wf=function(b,c,d){var e=
|
|
277
|
-
p.Hf=function(b,c,d){b=
|
|
278
|
-
|
|
279
|
-
function
|
|
280
|
-
h.name&&(h.a.push(new
|
|
281
|
-
function
|
|
282
|
-
|
|
283
|
-
p.start=function(b,c){var d=this;return t(function f(){var g,h;return
|
|
284
|
-
p.update=function(){if(this.f!=
|
|
285
|
-
function
|
|
286
|
-
function
|
|
287
|
-
3*b.C),b.b.Rb(!1)):(b.b=new W(null,0),b.b.Rb(!0));
|
|
288
|
-
h,
|
|
289
|
-
function
|
|
290
|
-
e.
|
|
291
|
-
function
|
|
292
|
-
(
|
|
293
|
-
g.Ab:1==l.length?(Ga=
|
|
294
|
-
function
|
|
295
|
-
|
|
296
|
-
function
|
|
297
|
-
function
|
|
253
|
+
W.prototype.getSafeSeekRangeStart=W.prototype.Gb;W.prototype.mb=function(){return this.Gb(0)};W.prototype.getSeekRangeStart=W.prototype.mb;W.prototype.za=function(){var b=this.V()||this.Va()?this.pc:0;return Math.max(0,this.nb()-b)};W.prototype.getSeekRangeEnd=W.prototype.za;W.prototype.he=function(){return null==this.f||null!=this.b?!1:!0};W.prototype.usingPresentationStartTime=W.prototype.he;function Ag(b,c,d,e){b=Tb(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function Bg(){var b=this;this.a=this.b=null;this.f=[];this.c=null;this.l=[];this.h=1;this.m={};this.s=0;this.v=new Va(5);this.i=new D(function(){Cg(b)});this.g=new Ob}A("shaka.dash.DashParser",Bg);p=Bg.prototype;p.configure=function(b){this.b=b};p.start=function(b,c){var d=this;return t(function f(){var g;return z(f,function(f){switch(f.j){case 1:return d.f=[b],d.a=c,u(f,Dg(d),2);case 2:g=f.o;d.a&&Eg(d,g);if(!d.a)throw new G(2,7,7001);return f["return"](d.c)}})})};
|
|
254
|
+
p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.l=[];this.m={};null!=this.i&&(this.i.stop(),this.i=null);return this.g.destroy()};p.update=function(){Dg(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};p.onExpirationUpdated=function(){};
|
|
255
|
+
function Dg(b){var c=Date.now(),d=b.a.networkingEngine.request(0,Tb(b.f,b.b.retryParameters));Pb(b.g,d);return d.promise.then(function(c){if(b.a)return c.uri&&!b.f.includes(c.uri)&&b.f.unshift(c.uri),Fg(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Wa(b.v,1,d);return d})}function Fg(b,c,d){c=R.Sd(c,"MPD");if(!c)throw new G(2,4,4001,d);c=$f(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);Pb(b.g,c);return c.promise.then(function(c){return Gg(b,c,d)})}
|
|
256
|
+
function Gg(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,B,C,E,F,V,Y,ma,Aa,da,na,wa,ja,Ta,Ba,tb,Ga,db;return z(f,function(f){switch(f.j){case 1:l=zd;m=R;n=[d];q=m.R(c,"Location").map(m.cc).filter(l.Ga);0<q.length&&(w=Ad(n,q),n=b.f=w);x=m.R(c,"BaseURL").map(m.cc);B=Ad(n,x);C=b.b.dash.ignoreMinBufferTime;E=0;C||(E=m.J(c,"minBufferTime",m.Ba));b.s=m.J(c,"minimumUpdatePeriod",m.Ba,-1);F=m.J(c,"availabilityStartTime",m.vf);V=m.J(c,"timeShiftBufferDepth",m.Ba);Y=m.J(c,"suggestedPresentationDelay",
|
|
257
|
+
m.Ba);ma=m.J(c,"maxSegmentDuration",m.Ba);Aa=c.getAttribute("type")||"static";b.c?da=b.c.presentationTimeline:(na=Math.max(b.b.dash.defaultPresentationDelay,1.5*E),wa=null!=Y?Y:na,da=new W(F,wa,b.b.dash.autoCorrectDrift));ja={kb:"static"!=Aa,presentationTimeline:da,ja:null,S:null,ca:null,B:null,bandwidth:0,Fd:!1};for(var uc=ja,ub=B,Eb=R.J(c,"mediaPresentationDuration",R.Ba),vb=[],Ha=0,vc=R.R(c,"Period"),fb=0;fb<vc.length;fb++){var Ia=vc[fb];Ha=R.J(Ia,"start",R.Ba,Ha);var wd=R.J(Ia,"duration",R.Ba),
|
|
258
|
+
wb=null;if(fb!=vc.length-1){var eb=R.J(vc[fb+1],"start",R.Ba);null!=eb&&(wb=eb-Ha)}else null!=Eb&&(wb=Eb-Ha);null==wb&&(wb=wd);Ia=Hg(b,uc,ub,{start:Ha,duration:wb,node:Ia,Qc:null==wb||fb==vc.length-1});vb.push(Ia);wd=uc.ja.id;b.l.includes(wd)||(b.l.push(wd),b.c&&(b.a.filterNewPeriod(Ia),b.c.periods.push(Ia)));if(null==wb){Ha=null;break}Ha+=wb}null==b.c&&b.a.filterAllPeriods(vb);null!=Eb?(g=vb,h=Eb,k=!1):(g=vb,h=Ha,k=!0);Ta=h;Ba=g;da.Rb("static"==Aa);"static"!=Aa&&k||da.wa(Ta||Infinity);(tb=da.V())&&
|
|
259
|
+
!isNaN(b.b.availabilityWindowOverride)&&(V=b.b.availabilityWindowOverride);null==V&&(V=Infinity);da.md(V);da.Vc(ma||1);if(b.c){f.A(0);break}b.c={presentationTimeline:da,periods:Ba,offlineSessionIds:[],minBufferTime:E||0};if(!da.he()){f.A(0);break}Ga=m.R(c,"UTCTiming");return u(f,Ig(b,B,Ga),4);case 4:db=f.o;if(!b.a)return f["return"]();da.ce(db);v(f)}})})}
|
|
260
|
+
function Hg(b,c,d,e){c.ja=Jg(e.node,null,d);c.S=e;c.ja.id||(c.ja.id="__shaka_period_"+e.start);R.R(e.node,"EventStream").forEach(b.wf.bind(b,e.start,e.duration));d=R.R(e.node,"AdaptationSet").map(b.uf.bind(b,c)).filter(zd.Ga);if(c.kb){c=[];for(var f=r(d),g=f.next();!g.done;g=f.next()){g=r(g.value.Gf);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new G(2,4,4018);}var k=d.filter(function(b){return!b.qd});d.filter(function(b){return b.qd}).forEach(function(b){var c=
|
|
261
|
+
b.streams[0],d=b.qd;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Kg(k,"video");f=Kg(k,"audio");if(!c.length&&!f.length)throw new G(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Lg(b,f[g],c[h],d);b=Kg(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Kg(b,c){return b.filter(function(b){return b.contentType==c})}
|
|
262
|
+
function Lg(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<qd(f,g).length:1){g=qd(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.h++,language:c.language,primary:c.Rc||d.Rc,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
|
|
263
|
+
0,f={id:b.h++,language:g.language||"und",primary:g.Rc,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
|
|
264
|
+
p.uf=function(b,c){b.ca=Jg(c,b.ja,null);var d=!1,e=R.R(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(zd.Ga),g=void 0,h="text"==b.ca.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,n=!1;R.R(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
|
|
265
|
+
m=b.getAttribute("value"):n=!0});k=R.R(c,"Accessibility");var q=new Map;e={};k=r(k);for(l=k.next();!l.done;e={Db:e.Db},l=k.next()){var w=l.value;l=w.getAttribute("schemeIdUri");w=w.getAttribute("value");"urn:scte:dash:cc:cea-608:2015"==l||"urn:scte:dash:cc:cea-708:2015"==l?(e.Db=1,null!=w?w.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Db,b.Db+=2;q.set(d,M(c))}}(e)):
|
|
266
|
+
q.set("CC1","und")):"urn:mpeg:dash:role:2011"==l&&null!=w&&(f.push(w),"captions"==w&&(g="caption"))}if(n)return null;e=R.R(c,"ContentProtection");var x=Nf(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=M(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=R.R(c,"Representation");f=k.map(this.xf.bind(this,b,x,g,e,l,d,f,q)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new G(2,4,4003);}b.ca.contentType&&"application"!=b.ca.contentType||(b.ca.contentType=Mg(f[0].mimeType,
|
|
267
|
+
f[0].codecs),f.forEach(function(c){c.type=b.ca.contentType}));f.forEach(function(b){x.drmInfos.forEach(function(c){b.keyId&&c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(zd.Ga);return{id:b.ca.id||"__fake__"+this.h++,contentType:b.ca.contentType,language:e,Rc:d,streams:f,drmInfos:x.drmInfos,qd:m,Gf:h}};
|
|
268
|
+
p.xf=function(b,c,d,e,f,g,h,k,l){b.B=Jg(l,b.ca,null);if(!Ng(b.B))return null;b.bandwidth=R.J(l,"bandwidth",R.nc)||0;var m=b.B.contentType;m="text"==m||"application"==m;try{var n=this.Hf.bind(this);if(b.B.Ob)var q=og(b,n);else if(b.B.Ja)q=rg(b,this.m);else if(b.B.Qb)q=vg(b,n,this.m,!!this.c);else{var w=b.B.oa,x=b.S.duration||0;q={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<x?1:null},getSegmentReference:function(b){return 1!=b?null:new S(1,0,x,function(){return w},
|
|
269
|
+
0,null)},initSegmentReference:null,la:0}}}catch(B){if(m&&4002==B.code)return null;throw B;}l=R.R(l,"ContentProtection");l=Qf(l,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.h++,originalId:b.B.id,createSegmentIndex:q.createSegmentIndex,findSegmentPosition:q.findSegmentPosition,getSegmentReference:q.getSegmentReference,initSegmentReference:q.initSegmentReference,presentationTimeOffset:q.la,mimeType:b.B.mimeType,codecs:b.B.codecs,frameRate:b.B.frameRate,bandwidth:b.bandwidth,width:b.B.width,
|
|
270
|
+
height:b.B.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ca.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.B.emsgSchemeIdUris,roles:h,channelsCount:b.B.Xc,closedCaptions:k}};function Cg(b){t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=0,y(d,2),u(d,Dg(b),4);case 4:e=d.o;za(d,3);break;case 2:f=Ca(d),b.a&&(f.severity=1,b.a.onError(f));case 3:if(!b.a)return d["return"]();Eg(b,e);v(d)}})})}
|
|
271
|
+
function Eg(b,c){0>b.s||b.i.O(Math.max(3,b.s-c,Xa(b.v)))}
|
|
272
|
+
function Jg(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Xc:null};d=d||c.oa;var e=R.vb,f=R.Ae,g=R.R(b,"BaseURL").map(R.cc),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=R.J(b,"frameRate",f)||c.frameRate;var m=R.R(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=R.R(b,
|
|
273
|
+
"AudioChannelConfiguration");m=Og(m)||c.Xc;h||(h=Mg(k,l));return{oa:Ad(d,g),Ob:R.ac(b,"SegmentBase")||c.Ob,Ja:R.ac(b,"SegmentList")||c.Ja,Qb:R.ac(b,"SegmentTemplate")||c.Qb,width:R.J(b,"width",e)||c.width,height:R.J(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),Xc:m}}
|
|
274
|
+
function Og(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
|
|
275
|
+
16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Ng(b){var c=b.Ob?1:0;c+=b.Ja?1:0;c+=b.Qb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Ob&&(b.Ja=null),b.Qb=null);return!0}
|
|
276
|
+
function Pg(b,c,d,e){c=Ad(c,[d]);c=Tb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Pb(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=Ac(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
|
|
277
|
+
function Ig(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return zd.ye(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Pg(this,c,b,"HEAD");case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return Pg(this,
|
|
278
|
+
c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return $a("NTP UTCTiming scheme is not supported"),Promise.reject();default:return $a("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){$a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
|
|
279
|
+
return 0})}p.wf=function(b,c,d){var e=R.vb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=R.J(d,"timescale",e)||1;R.R(d,"Event").forEach(function(d){var k=R.J(d,"presentationTime",e)||0,m=R.J(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
|
|
280
|
+
p.Hf=function(b,c,d){b=Ag(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Pb(this.g,b);return b.promise.then(function(b){return b.data})};function Mg(b,c){return ae(oc(b,c))?"text":b.split("/")[0]}U.ed("mpd",Bg);U.Nb("application/dash+xml",Bg);function Qg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Rg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Rg.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Sg(b,c){this.name=b;this.value=c}
|
|
281
|
+
Rg.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Tg(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Ug(b,c){this.b=c;this.a=b};var Vg={lb:function(b,c){return b.filter(function(b){return b.name==c})},Ra:function(b,c){var d=Vg.lb(b,c);return d.length?d[0]:null},Hc:function(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})},zc:function(b,c){return Ad([b],[c])[0]},Pc:function(b){return/^#(?!EXT)/m.test(b)}};function Wg(b){this.b=b;this.a=0}function Xg(b){Yg(b,/[ \t]+/gm)}function Yg(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Jf:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Jf}function Zg(b){return b.a==b.b.length?null:(b=Yg(b,/[^ \t\n]*/gm))?b[0]:null};function $g(){this.a=0}
|
|
282
|
+
function ah(b,c,d){c=Ac(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new G(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!Vg.Pc(e[f])){var g=bh(b,e[f]);--b.a;if(ch.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(Vg.Pc(e[g]))g+=1;else{var h=bh(b,e[g]);if(dh.includes(h.name)){if(1!=c)throw new G(2,4,4017);e=e.splice(g,e.length-g);b=eh(b,d,e,f);return new Qg(d,c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==
|
|
283
|
+
h.name&&(h.a.push(new Sg("URI",e[g])),g+=1)}return new Qg(d,c,f)}function eh(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=bh(b,d),ch.includes(d.name)?e.push(d):g.push(d);else{if(Vg.Pc(d))return[];d=Vg.zc(c,d.trim());f.push(new Ug(d,g));g=[]}});return f}
|
|
284
|
+
function bh(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new G(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Wg(g);var k;(k=Yg(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=Yg(g,l);)e.push(new Sg(k[1],k[2]||k[3]))}return new Rg(d,f,e,h)}var ch="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),dh="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function fh(b){try{var c=fh.parse(b);return Cb({uri:b,ad:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Ab(d)}}A("shaka.net.DataUriPlugin",fh);
|
|
285
|
+
fh.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new G(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new G(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Gc(c).buffer;else{if(e)throw new G(2,1,1005,b);b=Dc(c)}return{data:b,contentType:d[0]}};Sb("data",fh);function gh(){var b=this;this.c=this.g=null;this.$=1;this.D=new Map;this.T=new Set;this.a=new Map;this.b=null;this.v="";this.s=new $g;this.P=0;this.h=new D(function(){hh(b)});this.f=ih;this.m=null;this.C=0;this.G=Infinity;this.i=new Ob;this.M=[];this.l=new Map;this.W=!1}A("shaka.hls.HlsParser",gh);p=gh.prototype;p.configure=function(b){this.c=b};
|
|
286
|
+
p.start=function(b,c){var d=this;return t(function f(){var g,h;return z(f,function(f){switch(f.j){case 1:return d.g=c,u(f,jh(d,b),2);case 2:return g=f.o,d.v=g.uri,u(f,kh(d,g.data),3);case 3:return h=d.P,0<h&&d.h.O(h),f["return"](d.m)}})})};p.stop=function(){this.h&&(this.h.stop(),this.h=null);var b=[];this.i&&(b.push(this.i.destroy()),this.i=null);this.c=this.g=null;this.D.clear();this.T.clear();this.a.clear();this.m=null;return Promise.all(b)};
|
|
287
|
+
p.update=function(){if(this.f!=lh.Oa){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(mh(this,d.value));return Promise.all(b)}};
|
|
288
|
+
function mh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,B;return z(e,function(e){switch(e.j){case 1:return f=Vg,g=lh,h=c.pe,u(e,jh(b,h),2);case 2:k=e.o;l=ah(b.s,k.data,k.uri);if(1!=l.type)throw new G(2,4,4017);n=(m=f.Ra(l.a,"EXT-X-MEDIA-SEQUENCE"))?Number(m.value):0;q=c.stream;return u(e,nh(b,c.tc,l,n,q.mimeType,q.codecs),3);case 3:w=e.o;c.Pb.a=w;x=w[w.length-1];if(B=f.Ra(l.a,"EXT-X-ENDLIST"))oh(b,g.Oa),b.b.wa(x.endTime);v(e)}})})}p.onExpirationUpdated=function(){};
|
|
289
|
+
function kh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,B;return z(e,function(e){switch(e.j){case 1:f=ah(b.s,c,b.v);if(0!=f.type)throw new G(2,4,4022);return u(e,ph(b,f),2);case 2:g=e.o;if(!b.g)throw new G(2,7,7001);if(b.W&&0==g.variants.length)throw new G(2,4,4034);b.g.filterAllPeriods([g]);h=Infinity;k=0;l=Infinity;for(var E=r(b.a.values()),F=E.next();!F.done;F=E.next())m=F.value,h=Math.min(h,m.Uc),k=Math.max(k,m.Uc),"text"!=m.stream.type&&(l=Math.min(l,m.duration));b.f!=lh.Oa?(b.b=new W(0,
|
|
290
|
+
3*b.C),b.b.Rb(!1)):(b.b=new W(null,0),b.b.Rb(!0));qh(b);if(b.f!=lh.Oa){b.P=b.G;n=lh;b.f==n.td&&(q=b.b.pc,isNaN(b.c.availabilityWindowOverride)||(q=b.c.availabilityWindowOverride),b.b.md(q));for(w=0;95443.7176888889<=k;)w+=95443.7176888889,k-=95443.7176888889;if(w)for(E=r(b.a.values()),F=E.next();!F.done;F=E.next())x=F.value,95443.7176888889>x.Uc&&(x.stream.presentationTimeOffset=-w,x.Pb.offset(w))}else for(b.b.wa(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())B=F.value,B.stream.presentationTimeOffset=
|
|
291
|
+
h,B.Pb.offset(-h),dg(B.Pb,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}
|
|
292
|
+
function ph(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,B,C;return z(e,function(e){switch(e.j){case 1:return f=Vg,g=zd,h=c.a,k=f.lb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==rh(b,"TYPE")}.bind(b)),m=l.map(function(b){var c=this;return t(function ma(){var e;return z(ma,function(f){switch(f.j){case 1:return y(f,2),u(f,sh(c,b),4);case 4:return f["return"](f.o);case 2:e=Ca(f);if(c.c.hls.ignoreTextStreamFailures)return f["return"](null);throw e;}})})}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==
|
|
293
|
+
rh(b,"TYPE")}),th(b,n),u(e,Promise.all(m),2);case 2:return q=e.o,w=f.lb(h,"EXT-X-STREAM-INF"),x=w.map(function(b){return uh(this,b,c)}.bind(b)),u(e,Promise.all(x),3);case 3:return B=e.o,C=B.reduce(g.yc,[]),C=C.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:C,textStreams:q.filter(function(b){return null!=b})})}})})}
|
|
294
|
+
function uh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,B,C,E,F,V,Y,ma,Aa,da,na,wa,ja,Ta,Ba,tb,Ga,db,eb;return z(f,function(f){switch(f.j){case 1:g=Cd;h=Vg;k=Tg(c,"CODECS","avc1.42E01E,mp4a.40.2");l=vh(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;w=Tg(c,"FRAME-RATE");x=Number(rh(c,"BANDWIDTH"));m&&(B=m.value.split("x"),n=B[0],q=B[1]);C=h.lb(d.a,"EXT-X-MEDIA");C=C.filter(function(b){return"CLOSED-CAPTIONS"!=rh(b,"TYPE")});C=C.filter(function(b){var c=Tg(b,"URI")||"";return"SUBTITLES"==
|
|
295
|
+
(Tg(b,"TYPE")||"")||""!=c});E=Tg(c,"AUDIO");F=Tg(c,"VIDEO");E?C=h.Hc(C,"AUDIO",E):F&&(C=h.Hc(C,"VIDEO",F));if(V=wh(g.qa,l)){if(Y=Tg(c,"SUBTITLES"))if(ma=h.Hc(C,"SUBTITLES",Y),ma.length&&(Aa=b.D.get(ma[0].id)))Aa.stream.codecs=V;Lb(l,V)}da=C.map(function(b){return xh(this,b,l)}.bind(b));na=[];wa=[];return u(f,Promise.all(da),2);case 2:Ta=f.o;Ta=Ta.filter(function(b){return null!=b});E?na=Ta:F&&(wa=Ta);tb=!1;na.length||wa.length?na.length?(db=rh(c,"URI"),eb=na[0].tc,db==eb?(Ba=g.Ab,tb=!0):Ba=g.Na):
|
|
296
|
+
Ba=g.Ab:1==l.length?(Ga=wh(g.Na,l),Ba=m||w||Ga?g.Na:g.Ab):(Ba=g.Na,l=[l.join(",")]);if(tb){f.A(3);break}return u(f,yh(b,c,l,Ba),4);case 4:ja=f.o;case 3:if(ja)ja.stream.type==g.Ab?na=[ja]:wa=[ja];else if(null===ja)return f["return"]([]);wa&&zh(wa);na&&zh(na);return f["return"](Ah(b,na,wa,x,n,q,w))}})})}function zh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
|
|
297
|
+
function Ah(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var w=q?q.stream:null,x=l?l.drmInfos:null,B=q?q.drmInfos:null;q=(q?q.tc:"")+" - "+(l?l.tc:"");var C=void 0;if(n&&w)if(x.length&&B.length?0<qd(x,B).length:1)C=qd(x,
|
|
298
|
+
B);else continue;else n?C=x:w&&(C=B);b.T.has(q)||(n=Bh(b,n,w,e,C),k.push(n),b.T.add(q))}}return k}function Bh(b,c,d,e,f){return{id:b.$++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function sh(b,c){return t(function e(){var f;return z(e,function(e){switch(e.j){case 1:return rh(c,"TYPE"),u(e,xh(b,c,[]),2);case 2:return f=e.o,e["return"](f.stream)}})})}
|
|
299
|
+
function th(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;rh(e,"TYPE");var f=Tg(e,"LANGUAGE")||"und";f=M(f);var g=rh(e,"GROUP-ID");e=rh(e,"INSTREAM-ID");b.l.get(g)||b.l.set(g,new Map);b.l.get(g).set(e,f)}}
|
|
300
|
+
function xh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,B,C;return z(f,function(f){switch(f.j){case 1:g=rh(c,"URI");if(b.a.has(g))return f["return"](b.a.get(g));h=rh(c,"TYPE").toLowerCase();k=Cd;"subtitles"==h&&(h=k.qa);l=M(Tg(c,"LANGUAGE","und"));m=Tg(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");w=Tg(c,"CHANNELS");if("audio"==h)if(w){var E=w.split("/")[0];E=parseInt(E,10)}else E=null;else E=null;x=E;B=!!n||!!q;return u(f,Ch(b,g,d,h,l,B,m,x,null),2);case 2:C=f.o;if(null==
|
|
298
301
|
C)return f["return"](null);if(b.a.has(g))return f["return"](b.a.get(g));b.D.set(c.id,C);b.a.set(g,C);return f["return"](C)}})})}
|
|
299
|
-
function
|
|
300
|
-
function
|
|
301
|
-
da)return b.W=!0,n["return"](null);
|
|
302
|
-
findSegmentPosition:ub.find.bind(ub),getSegmentReference:ub.get.bind(ub),initSegmentReference:Eb,presentationTimeOffset:0,mimeType:C,codecs:
|
|
303
|
-
function
|
|
304
|
-
function
|
|
305
|
-
function
|
|
306
|
-
function
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
function
|
|
310
|
-
case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.A(6);break}return u(k,
|
|
311
|
-
function
|
|
312
|
-
function
|
|
313
|
-
function
|
|
314
|
-
function
|
|
315
|
-
function
|
|
316
|
-
var
|
|
317
|
-
function
|
|
318
|
-
var
|
|
319
|
-
U.Nb("application/x-mpegurl",
|
|
320
|
-
|
|
321
|
-
function
|
|
322
|
-
|
|
323
|
-
function
|
|
324
|
-
function
|
|
325
|
-
d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.h&&e&&b.a(b.b,d)}}else if(0!=f||b.h){g=e.start(f);var h=b.v.za();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new
|
|
326
|
-
function
|
|
327
|
-
function
|
|
328
|
-
function
|
|
329
|
-
h.b.currentTime,c=h.a.mb(),d=h.a.za();3>d-c&&(c=d-3);b<c&&(b=
|
|
330
|
-
function
|
|
331
|
-
function
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
function
|
|
336
|
-
function
|
|
337
|
-
function
|
|
338
|
-
function
|
|
339
|
-
!0):(
|
|
340
|
-
function
|
|
341
|
-
function
|
|
342
|
-
function
|
|
343
|
-
function
|
|
344
|
-
function
|
|
302
|
+
function yh(b,c,d,e){return t(function g(){var h,k,l,m,n;return z(g,function(g){switch(g.j){case 1:h=Cd;k=rh(c,"URI");if(b.a.has(k))return g["return"](b.a.get(k));l=Tg(c,"CLOSED-CAPTIONS");m=null;e==h.Na&&l&&"NONE"!=l&&(m=b.l.get(l));return u(g,Ch(b,k,d,e,"und",!1,null,null,m),2);case 2:n=g.o;if(null==n)return g["return"](null);if(b.a.has(k))return g["return"](b.a.get(k));b.a.set(k,n);return g["return"](n)}})})}
|
|
303
|
+
function Ch(b,c,d,e,f,g,h,k,l){return t(function n(){var q,w,x,B,C,E,F,V,Y,ma,Aa,da,na,wa,ja,Ta,Ba,tb,Ga,db,eb,uc,ub,Eb,vb,Ha;return z(n,function(n){switch(n.j){case 1:return q=Vg,w=q.zc(b.v,c),B="",u(n,jh(b,w),2);case 2:E=n.o;w=E.uri;x=ah(b.s,E.data,w);if(1!=x.type)throw new G(2,4,4017);F=[];x.segments.forEach(function(b){b=q.lb(b.b,"EXT-X-KEY");F.push.apply(F,b)});V=!1;Y=[];ma=null;for(var fb=r(F),Ia=fb.next();!Ia.done;Ia=fb.next())if(Aa=Ia.value,da=rh(Aa,"METHOD"),"NONE"!=da){V=!0;if("AES-128"==
|
|
304
|
+
da)return b.W=!0,n["return"](null);na=rh(Aa,"KEYFORMAT");if(ja=(wa=Dh[na])?wa(Aa):null)ja.keyIds.length&&(ma=ja.keyIds[0]),Y.push(ja)}if(V&&!Y.length)throw new G(2,4,4026);Eh(b,x);B=Fh(e,d);return u(n,Gh(b,e,B,x),3);case 3:return C=Ta=n.o,tb=(Ba=q.Ra(x.a,"EXT-X-MEDIA-SEQUENCE"))?Number(Ba.value):0,u(n,nh(b,c,x,tb,C,B),4);case 4:return Ga=n.o,db=Ga[0].startTime,eb=Ga[Ga.length-1].endTime,uc=eb-db,ub=new T(Ga),Eb=Hh(x),vb=void 0,"text"==e&&(vb="subtitle"),Ha={id:b.$++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),
|
|
305
|
+
findSegmentPosition:ub.find.bind(ub),getSegmentReference:ub.get.bind(ub),initSegmentReference:Eb,presentationTimeOffset:0,mimeType:C,codecs:B,kind:vb,encrypted:V,keyId:ma,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},n["return"]({stream:Ha,Pb:ub,drmInfos:Y,tc:c,pe:w,Uc:db,qg:eb,duration:uc})}})})}
|
|
306
|
+
function Eh(b,c){var d=lh,e=Vg.Ra(c.a,"EXT-X-PLAYLIST-TYPE"),f=Vg.Ra(c.a,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?oh(b,d.Oa):(e?oh(b,d.td):oh(b,d.ke),d=Ih(c.a,"EXT-X-TARGETDURATION"),d=Number(d.value),b.C=Math.max(d,b.C),b.G=Math.min(d,b.G))}
|
|
307
|
+
function Hh(b){var c=Vg.lb(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new G(2,4,4020);c=c[0];var d=rh(c,"URI"),e=Vg.zc(b.b,d);b=0;d=null;if(c=Tg(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new ag(function(){return[e]},b,d)}
|
|
308
|
+
function Jh(b,c,d,e){var f=c.b,g=c.a;c=Ih(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Vg.Ra(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new S(d,e,c,function(){return[g]},h,k)}function qh(b){b.b&&(b.M.forEach(function(c){b.b.sb(c,0)}),b.M=[])}
|
|
309
|
+
function nh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,w,x,B,C,E,F,V;return z(k,function(k){switch(k.j){case 1:return l=d.segments,m=[],n=l[0].a,q=Jh(null,l[0],e,0),w=Hh(d),u(k,Kh(b,c,w,q,f,g),2);case 2:x=k.o;n.split("/").pop();for(var Y=0;Y<l.length;++Y)B=l[Y],C=m[m.length-1],E=0==Y?x:C.endTime,F=e+Y,V=Jh(C,B,F,E),m.push(V);b.M.push(m);qh(b);return k["return"](m)}})})}
|
|
310
|
+
function Lh(b,c){return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:return f=Qb,g=Ag(c.c(),c.b,c.b+2048-1,b.c.retryParameters),h=Ag(c.c(),c.b,c.a,b.c.retryParameters),y(e,2),u(e,Mh(b,g,f.ud),4);case 4:return k=e.o,e["return"](k);case 2:l=Ca(e);if(7001==l.code)throw l;$a("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",g.uris[0]);return u(e,Mh(b,h,f.ud),5);
|
|
311
|
+
case 5:return m=e.o,e["return"](m)}})})}
|
|
312
|
+
function Kh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,w,x,B,C,E;return z(k,function(k){switch(k.j){case 1:if(b.m&&(l=b.a.get(c),m=l.Pb,n=m.get(e.position)))return k["return"](n.startTime);if("audio/mpeg"==f)return k["return"](0);if("video/mp4"!=f&&"audio/mp4"!=f){k.A(2);break}q=[Lh(b,e)];d&&q.push(Lh(b,d));return u(k,Promise.all(q),3);case 3:return w=k.o,x=w[0],B=w[1]||w[0],k["return"](Nh(x.data,B.data));case 2:if("video/mp2t"!=f){k.A(4);break}return u(k,Lh(b,e),5);case 5:return C=k.o,k["return"](Oh(C.data));
|
|
313
|
+
case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.A(6);break}return u(k,Lh(b,e),7);case 7:return E=k.o,k["return"](Ph(f,g,E.data));case 6:if("video/webm"==f)return k["return"](null);throw new G(2,4,4030);}})})}
|
|
314
|
+
function Nh(b,c){var d=0;(new Q).H("moov",Hf).H("trak",Hf).H("mdia",Hf).fa("mdhd",function(b){b.reader.L(0==b.version?8:16);d=b.reader.F();b.parser.stop()}).parse(c,!0);if(!d)throw new G(2,4,4030);var e=0,f=!1;(new Q).H("moof",Hf).H("traf",Hf).fa("tfdt",function(b){e=(0==b.version?b.reader.F():b.reader.yb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new G(2,4,4030);return e}
|
|
315
|
+
function Oh(b){function c(){throw new G(2,4,4030);}b=new P(new DataView(b),0);for(var d=0,e=0;;)if(d=b.ba(),e=b.ka(),71!=e&&c(),b.Mb()&16384||c(),e=(b.ka()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.ka(),b.L(e)),1!=b.F()>>8)b.seek(d+188),e=b.ka(),71!=e&&(b.seek(d+192),e=b.ka()),71!=e&&(b.seek(d+204),e=b.ka()),71!=e&&c(),b.$d(1);else return b.L(3),d=b.ka()>>6,0!=d&&1!=d||c(),0==b.ka()&&c(),d=b.ka(),e=b.Mb(),b=b.Mb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
|
|
316
|
+
function Ph(b,c,d){b=oc(b,c);if(!ae(b))return 0;c=new Zd(null);be(c,b);return c.Mc(d)}function vh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=rc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function wh(b,c){for(var d=Qh[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}function Fh(b,c){if(1==c.length)return c[0];var d=wh(b,c);if(null!=d)return d;throw new G(2,4,4025,c);}
|
|
317
|
+
function Gh(b,c,d,e){return t(function g(){var h,k,l,m,n,q,w,x,B,C;return z(g,function(g){switch(g.j){case 1:h=Cd;k=Qb;l=e.segments[0].a;m=new cb(l);n=m.ia.split(".").pop();q=Rh[c];if(w=q[n])return g["return"](w);if(c==h.qa)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");x=Tb([l],b.c.retryParameters);x.method="HEAD";return u(g,Mh(b,x,k.ud),2);case 2:B=g.o;C=B.headers["content-type"];if(!C)throw new G(2,4,4021,n);return g["return"](C.split(";")[0])}})})}
|
|
318
|
+
function rh(b,c){var d=b.getAttribute(c);if(!d)throw new G(2,4,4023,c);return d.value}function Ih(b,c){var d=Vg.Ra(b,c);if(!d)throw new G(2,4,4024,c);return d}function jh(b,c){return Mh(b,Tb([c],b.c.retryParameters),Qb.ng)}
|
|
319
|
+
var Qh={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Rh={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
|
|
320
|
+
function hh(b){t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:if(!b.g)return d["return"]();y(d,2);return u(d,b.update(),4);case 4:e=b.P;b.h.O(e);za(d,0);break;case 2:f=Ca(d),f.severity=1,b.g.onError(f),b.h.O(.1),v(d)}})})}function oh(b,c){b.f=c;b.b&&b.b.Rb(b.f==lh.Oa);b.f!=lh.Oa||b.h.stop()}function Mh(b,c,d){if(!b.i)throw new G(2,7,7001);c=b.g.networkingEngine.request(d,c);Pb(b.i,c);return c.promise}
|
|
321
|
+
var Dh={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=rh(b,"METHOD");Qe("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=rh(b,"URI");c=fh.parse(c);c=new Uint8Array(c.data);c=Bd("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Tg(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},ih="VOD",lh={Oa:ih,ke:"EVENT",td:"LIVE"};U.ed("m3u8",gh);
|
|
322
|
+
U.Nb("application/x-mpegurl",gh);U.Nb("application/vnd.apple.mpegurl",gh);function Sh(){this.a=new Map}function Th(b,c,d){Uh(b,c).text=d}function Uh(b,c){b.a.has(c)||b.a.set(c,new Vh);return b.a.get(c)}function Vh(){this.text=this.variant=null};function Wh(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Wh.prototype.add=function(b){return Xh(this.a,b)?(this.b.add(b),!0):!1};function Xh(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Yh(d,e)&&Zh(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Yh(d,e)&&Zh(d.roles,e.roles)));return d?!1:!0}
|
|
323
|
+
Wh.prototype.values=function(){return this.b.values()};function Yh(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return rc(b)[0]}),e=c.codecs.split(",").map(function(b){return rc(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
|
|
324
|
+
function Zh(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function $h(b){this.a=b;this.b=new ai(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}$h.prototype.create=function(b){var c=this,d=b.filter(function(b){return Xh(c.a,b)});return d.length?new Wh(d[0],d):this.b.create(b)};function ai(b,c,d){this.c=b;this.b=c;this.a=d}
|
|
325
|
+
ai.prototype.create=function(b){var c=[];c=bi(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=ci(c,this.b),b.length&&(c=b));this.a&&(b=Je(c,this.a),b.length&&(c=b));b=new Wh(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Xh(b.a,d)&&b.add(d);return b};function bi(b,c){var d=M(c),e=xe(d,b.map(function(b){return we(b)}));return e?b.filter(function(b){return e==we(b)}):[]}
|
|
326
|
+
function ci(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function di(b,c){this.a=ei;this.b=(new Map).set(ei,c).set(fi,b)}var fi=0,ei=1;function gi(b,c){this.f=b;this.g=hi(b);this.b=b.a.currentTime;this.c=Date.now()/1E3;this.h=c;this.a=function(){}}gi.prototype.release=function(){this.f=null;this.a=function(){}};function ii(b,c){b.a=c}function ji(b){this.a=b}function hi(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function ki(b,c,d,e,f){var g=this;this.a=b;this.v=c;this.s=d;this.l=f;this.f=new L;this.i=!1;this.m=b.readyState;this.c=!1;this.b=e;this.h=!1;this.f.w(b,"waiting",function(){return li(g)});this.g=(new D(function(){li(g)})).La(.25)}ki.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.v=this.l=null};ki.prototype.Zc=function(){this.h=!0;li(this)};
|
|
327
|
+
function li(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.i)return}else b.i=!1;if(!b.a.paused){b.a.readyState!=b.m&&(b.c=!1,b.m=b.a.readyState);var c=b.s.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=xc("Edge/")||xc("Trident/")||xc("Tizen")||xc("CrKey")?.5:.1;for(var g=0;g<e.length;g++)if(e.start(g)>d&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;d=b.f;e=hi(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.b!=
|
|
328
|
+
d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.h&&e&&b.a(b.b,d)}}else if(0!=f||b.h){g=e.start(f);var h=b.v.za();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new J("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.l(d),b.s.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function mi(b){var c=this;this.c=b;this.a=new Set;this.b=(new D(function(){ni(c,!1)})).La(.25)}mi.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function ni(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function oi(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function pi(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function qi(b){this.c=b;this.a=null;this.b=function(){}}qi.prototype.release=function(){this.a=this.c=null;this.b=function(){}};qi.prototype.g=function(b){var c=this.a,d=this.c.periods;b=pi(d,b)||d[0];c!=b&&this.b(b);this.a=b};function ri(b,c){b.b=c};function si(b){var c=this;this.a=b;this.f=!1;this.c=this.a.ec();this.b=new D(function(){c.a.Id(.25*c.c)})}si.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};si.prototype.set=function(b){this.c=b;ti(this)};function ti(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.ec()!=c&&b.a.ld(c);return}catch(d){}b.b.La(.25);0!=b.a.ec()&&b.a.ld(0)};function ui(b,c,d){this.a=b;this.f=c;this.g=d;this.h=!1;this.b=new L;this.c=new vi(b);0<b.readyState?wi(this,d):xi(this,d)}ui.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.f=function(){};this.a=null};function yi(b){return b.h?b.a.currentTime:b.g}function xi(b,c){b.g=c;b.b.ea(b.a,"loadedmetadata");b.b.da(b.a,"loadedmetadata",function(){wi(b,c)})}
|
|
329
|
+
function wi(b,c){.001>Math.abs(b.a.currentTime-c)?zi(b):(b.b.da(b.a,"seeking",function(){zi(b)}),Ai(b.c,0==b.a.currentTime?c:b.a.currentTime))}function zi(b){b.h=!0;b.b.w(b.a,"seeking",function(){return b.f()})}function vi(b){var c=this;this.b=b;this.h=10;this.g=this.f=this.c=0;this.a=new D(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}vi.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
|
|
330
|
+
function Ai(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.h;b.b.currentTime=c;b.a.La(.1)};function Bi(b){function c(){null==d.c?d.f=!0:(d.b.da(d.a,"seeking",function(){d.f=!0}),d.a.currentTime=d.c)}var d=this;this.a=b;this.f=!1;this.c=null;this.b=new L;0==this.a.readyState?this.b.da(this.a,"loadedmetadata",c):c()}Bi.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};Bi.prototype.m=function(b){this.c=this.f?this.c:b};Bi.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0};Bi.prototype.s=function(){};
|
|
331
|
+
function Ci(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.C=c.minBufferTime||0;this.g=d;this.v=f;this.l=null;this.f=new ki(b,c.presentationTimeline,d,Di(b,d),g);this.c=new ui(b,function(){a:{var b=h.f;b.i=!0;b.h=!1;b.c=!1;var c=yi(h.c);b=Ei(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.l||h.l<c-1)){h.l=c;c=h.c;0<c.a.readyState?Ai(c.c,b):xi(c,b);b=void 0;break a}h.v();b=void 0}return b},Fi(this,e));this.i=(new D(function(){if(0!=h.b.readyState&&!h.b.paused){var b=
|
|
332
|
+
h.b.currentTime,c=h.a.mb(),d=h.a.za();3>d-c&&(c=d-3);b<c&&(b=Ei(h,b),h.b.currentTime=b)}})).La(.25)}Ci.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.f&&(this.f.release(),this.f=null);this.i&&(this.i.stop(),this.i=null);this.b=this.c=this.a=this.g=null;this.v=function(){}};Ci.prototype.m=function(b){var c=this.c;0<c.a.readyState?Ai(c.c,b):xi(c,b)};Ci.prototype.h=function(){var b=yi(this.c);return 0<this.b.readyState&&!this.b.paused?Gi(this,b):b};
|
|
333
|
+
function Fi(b,c){null==c?c=Infinity>b.a.Y()?b.a.mb():b.a.za():0>c&&(c=b.a.za()+c);return Hi(b,Gi(b,c))}Ci.prototype.s=function(){this.f.Zc()};function Hi(b,c){var d=b.a.Y();return c>=d?d-b.g.durationBackoff:c}function Ei(b,c){var d=vd.bind(null,b.b.buffered),e=Math.max(b.C,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.mb(),h=b.a.za(),k=b.a.Y();3>h-g&&(g=h-3);var l=b.a.Gb(e),m=b.a.Gb(f);e=b.a.Gb(e+f);return c>=k?Hi(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}
|
|
334
|
+
function Gi(b,c){var d=b.a.mb();if(c<d)return d;d=b.a.za();return c>d?d:c}function Di(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new gi(new ji(b),c.stallThreshold);ii(e,function(){b.currentTime+=d});return e};function Ii(){this.b=function(){};this.a=new Set}Ii.prototype.release=function(){this.b=function(){};this.a.clear()};function Ji(b,c){b.b=c};function Ki(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.i=[{bb:null,ab:Li,Ua:function(b,e){return c.a(b,e)}},{bb:Mi,ab:Li,Ua:function(b,e){return c.a(b,e)}},{bb:Ni,ab:Li,Ua:function(b,e){return c.a(b,e)}},{bb:Li,ab:Mi,Ua:function(b,e){return c.b(b,e)}},{bb:Li,ab:Ni,Ua:function(b,e){return c.b(b,e)}},{bb:Mi,ab:Ni,Ua:function(b,e){return c.c(b,e)}},{bb:Ni,ab:Mi,Ua:function(b,e){return c.c(b,e)}}]}
|
|
335
|
+
Ki.prototype.release=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Ki.prototype.g=function(b,c){for(var d=r(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Mi:b>e.endTime?Ni:Li;this.f.set(e,g);for(var h=r(this.i),k=h.next();!k.done;k=h.next())k=k.value,k.bb==f&&k.ab==g&&k.Ua(e,c)}};function Oi(b,c,d,e){b.a=c;b.b=d;b.c=e}var Mi=1,Li=2,Ni=3;function Pi(b,c){this.a=c;this.c=b;this.g=null;this.l=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.s=!1;this.G=null;this.D=this.f=this.m=!1;this.C=0}Pi.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Qi(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()};
|
|
336
|
+
Pi.prototype.configure=function(b){this.g=b;this.G=new xb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
|
|
337
|
+
Pi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return z(d,function(d){switch(d.j){case 1:return e=b.a.Sa(),f=Ri(b,e),g=b.a.Ld(b.c.periods[f]),g.variant||g.text?u(d,Si(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new G(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.gf&&b.a.gf();v(d)}})})};function Ti(b){return Ui(b,"audio")}function Vi(b){return Ui(b,"video")}
|
|
338
|
+
function Ui(b,c){var d=b.b.get(c);return d?d.Ia||d.stream:null}
|
|
339
|
+
function Wi(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x;return z(e,function(e){switch(e.j){case 1:return f=Cd,u(e,pe(b.a.I,f.qa),2);case 2:return b.C++,b.D=!1,g=b.C,h=b.a.I,k=new Map,l=new Set,k.set(f.qa,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,Xi(b,l),4);case 4:if(b.f)return e["return"]();n=(m=b.a.I.g.isTextVisible())||b.g.alwaysStreamText;b.C!=g||b.b.has(f.qa)||b.D||!n||(q=b.a.Sa(),w=Ri(b,q),x=Yi(c,w,0),b.b.set(f.qa,x),Zi(b,x,0));v(e)}})})}
|
|
340
|
+
function $i(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ia&&(aj(b,f,!1,0,!1),d.Ia=e)}else if(e=d.Ia)d.Ia=null,aj(b,e,!0,0,!1)}}function bj(b,c,d,e){c.video&&aj(b,c.video,d,e,!1);c.audio&&aj(b,c.audio,d,e,!1)}
|
|
341
|
+
function aj(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)Wi(b,c);else if(g){var h=cj(b,c),k=Array.from(b.b.values()).every(function(b){return b.pa==g.pa});d&&h!=g.pa&&k?b.b.forEach(function(c){dj(b,c)}):(g.Ia&&(c.trickModeVideo?(g.Ia=c,c=c.trickModeVideo):g.Ia=null),(k=b.h[h])&&k.zb&&(k=b.i.get(c.id))&&k.zb&&(g.stream!=c||f)&&("text"==c.type&&he(b.a.I,oc(c.mimeType,c.codecs)),g.stream=c,g.hc=!0,ej(b,g,h)&&g.Kb.abort(),d&&(g.Pa?g.uc=!0:g.Ha?(g.Ma=!0,g.Zb=e,g.uc=
|
|
342
|
+
!0):(Qi(g),fj(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})))))}}function ej(b,c,d){if(!c.Kb)return!1;var e=b.a.Sa(),f=le(b.a.I,c.type);d=(d=gj(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/g<f-e-Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal)||c.Kb.b.a>d?!0:!1}
|
|
343
|
+
function hj(b){function c(c){var f=b.a.I;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=ke(f,c),c=vd(c,d,e));return c}var d=b.a.Sa(),e=b.g.smallGapLimit,f=Ri(b,d);if(lc(b.b.values(),function(b){return b.pa==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,c(h)||dj(b,b.b.get(h));else lc(b.b.keys(),c)||b.b.forEach(function(c){dj(b,c)})}
|
|
344
|
+
function dj(b,c){c.Pa||c.Ma||(c.Ha?(c.Ma=!0,c.Zb=0):null==je(b.a.I,c.type)?null==c.Da&&Zi(b,c,0):(Qi(c),fj(b,c,!1,0)["catch"](function(c){if(b.a)b.a.onError(c)})))}
|
|
345
|
+
function Si(b,c,d,e,f){return t(function h(){var k,l,m,n,q,w,x;return z(h,function(h){switch(h.j){case 1:return k=b.a.Sa(),l=Ri(b,k),m=Cd,n=new Map,q=new Set,c&&(n.set(m.Ab,c),q.add(c)),d&&(n.set(m.Na,d),q.add(d)),e&&(n.set(m.qa,e),q.add(e)),w=b.a.I,x=b.g.forceTransmuxTS,u(h,w.init(n,x),2);case 2:if(b.f)return h["return"]();ij(b);return u(h,Xi(b,q),3);case 3:if(b.f)return h["return"]();n.forEach(function(c,d){if(!b.b.has(d)){var e=Yi(c,l,f);b.b.set(d,e);Zi(b,e,0)}});v(h)}})})}
|
|
346
|
+
function Yi(b,c,d){return{stream:b,type:b.type,pb:null,Aa:null,Ia:null,hc:!0,pa:c,endOfStream:!1,Ha:!1,Da:null,Ma:!1,Zb:0,uc:!1,Pa:!1,dd:!1,Ib:!1,Zd:d||0,Kb:null}}
|
|
347
|
+
function jj(b,c){var d=b.h[c];if(d)return d.promise;d={promise:new H,zb:!1};b.h[c]=d;for(var e=new Set,f=r(b.c.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=r(b.c.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.v=b.v.then(function(){if(!this.f)return Xi(this,e)}.bind(b)).then(function(){this.f||(this.h[c].promise.resolve(),this.h[c].zb=!0)}.bind(b))["catch"](function(b){this.f||
|
|
345
348
|
(this.h[c].promise["catch"](function(){}),this.h[c].promise.reject(),delete this.h[c],this.a.onError(b))}.bind(b));return d.promise}
|
|
346
|
-
function
|
|
347
|
-
b.i["delete"](l.id);throw k;case 3:q=r(c);for(
|
|
348
|
-
function
|
|
349
|
-
function
|
|
350
|
-
|
|
351
|
-
function
|
|
352
|
-
function
|
|
353
|
-
function
|
|
354
|
-
7001==b.code?(c.Ha=!1,c.Da=null,
|
|
355
|
-
function
|
|
356
|
-
function
|
|
357
|
-
|
|
358
|
-
function
|
|
359
|
-
function
|
|
360
|
-
function
|
|
361
|
-
l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new
|
|
362
|
-
function
|
|
363
|
-
function
|
|
364
|
-
function
|
|
365
|
-
function
|
|
366
|
-
|
|
367
|
-
e=Date.now();if(100<e-
|
|
368
|
-
|
|
369
|
-
d);k(h)}catch(E){m(E)}};f.onerror=function(c){m(new
|
|
370
|
-
Sb("https",
|
|
371
|
-
function
|
|
372
|
-
function
|
|
373
|
-
function
|
|
374
|
-
|
|
375
|
-
function
|
|
376
|
-
function
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
p.updateManifestExpiration=function(b,c){var d=
|
|
380
|
-
p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return
|
|
381
|
-
function
|
|
382
|
-
function
|
|
383
|
-
function
|
|
384
|
-
function
|
|
385
|
-
function
|
|
386
|
-
e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function
|
|
387
|
-
p.updateManifestExpiration=function(b,c){var d=
|
|
388
|
-
p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return
|
|
389
|
-
function
|
|
390
|
-
function
|
|
391
|
-
p.init=function(){var b=this,c=new
|
|
392
|
-
new
|
|
393
|
-
p.destroy=function(){var b=this;return t(function d(){return
|
|
394
|
-
p.erase=function(){var b=this;return t(function d(){return
|
|
395
|
-
function
|
|
396
|
-
function
|
|
397
|
-
function
|
|
398
|
-
function
|
|
399
|
-
e.value,g=
|
|
400
|
-
function
|
|
401
|
-
language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=
|
|
402
|
-
p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return
|
|
349
|
+
function Xi(b,c){return t(function e(){var f,g,h,k,l,m,n;return z(e,function(e){switch(e.j){case 1:f=[];for(var q=r(c),x=q.next();!x.done;x=q.next())g=x.value,(h=b.i.get(g.id))?f.push(h.promise):(b.i.set(g.id,{promise:new H,zb:!1}),f.push(g.createSegmentIndex()));y(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();za(e,3);break;case 2:k=Ca(e);if(b.f)return e["return"]();e=r(c);for(x=e.next();!x.done;x=e.next())l=x.value,b.i.get(l.id).promise["catch"](function(){}),b.i.get(l.id).promise.reject(),
|
|
350
|
+
b.i["delete"](l.id);throw k;case 3:q=r(c);for(x=q.next();!x.done;x=q.next())m=x.value,n=b.i.get(m.id),n.zb||(n.promise.resolve(),n.zb=!0);v(e)}})})}function ij(b){var c=b.c.presentationTimeline.Y();Infinity>c?b.a.I.wa(c):b.a.I.wa(Math.pow(2,32))}
|
|
351
|
+
function kj(b,c){if(!b.f&&!c.Ha&&null!=c.Da&&!c.Pa)if(c.Da=null,c.Ma)fj(b,c,c.uc,c.Zb);else{try{var d=lj(b,c);null!=d&&(Zi(b,c,d),c.Ib=!1)}catch(e){mj(b,e);return}d=Array.from(b.b.values());nj(b,c);b.s&&d.every(function(b){return b.endOfStream})&&b.a.I.endOfStream().then(function(){if(!this.f){var b=this.a.I.Y();0!=b&&b<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.wa(b)}}.bind(b))}}
|
|
352
|
+
function lj(b,c){if(oj(c))return b.a.I.rc(c.stream.originalId||""),null;var d=b.a.Sa(),e=pj(b,c,d),f=cj(b,c.stream),g=Ri(b,e),h=me(b.a.I,c.type,d),k=Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.l;if(e>=b.c.presentationTimeline.Y())return c.endOfStream=!0,"video"==c.type&&(e=b.b.get("text"))&&"application/cea-608"==e.stream.mimeType&&(e.endOfStream=!0),null;c.endOfStream=!1;c.pa=g;if(g!=f)return null;if(h>=k)return.5;g=le(b.a.I,c.type);g=gj(b,c,d,g,f);if(!g)return 1;var l=
|
|
353
|
+
Infinity;Array.from(b.b.values()).forEach(function(c){oj(c)||(c=pj(b,c,d),l=Math.min(l,c))});if(e>=l+b.c.presentationTimeline.a)return 1;c.Zd=0;qj(b,c,d,f,g);return null}function pj(b,c,d){if(!c.pb||!c.Aa)return Math.max(d,c.Zd);d=cj(b,c.pb);return b.c.periods[d].startTime+c.Aa.endTime}
|
|
354
|
+
function gj(b,c,d,e,f){if(c.Aa&&c.stream==c.pb)return rj(b,c,f,c.Aa.position+1);c.Aa?(d=cj(b,c.pb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Aa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=rj(b,c,f,Math.max(0,d-1)));return g||rj(b,c,f,d)}
|
|
355
|
+
function rj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Hb();e=e.nb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
|
|
356
|
+
function qj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=sj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ha=!0;c.hc=!1;k=tj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return uj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ha=!1,c.dd=!1,c.Ma||this.a.Zc(),Zi(this,c,0),vj(this,h))}.bind(b))["catch"](function(b){this.f||this.m||(c.Ha=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"):
|
|
357
|
+
7001==b.code?(c.Ha=!1,c.Da=null,Zi(this,c,0)):3017==b.code?wj(this,c,b):(c.Ib=!0,b.severity=2,mj(this,b)))}.bind(b))}function wj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.dd})){var e=Math.round(100*b.l);if(20<e)b.l-=.2;else if(4<e)b.l-=.04;else{c.Ib=!0;b.m=!0;b.a.onError(d);return}c.dd=!0}Zi(b,c,4)}
|
|
358
|
+
function sj(b,c,d,e,f){if(!c.hc)return Promise.resolve();d=qe(b.a.I,c.type,b.c.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=tj(b,c,c.stream.initSegmentReference).then(function(b){if(!this.f)return ne(this.a.I,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.hc=!0;return Promise.reject(b)});return Promise.all([d,b])}
|
|
359
|
+
function uj(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new Q).fa("emsg",b.M.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return xj(b,c,d).then(function(){if(!this.f)return ne(this.a.I,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.pb=f,c.Aa=g,Promise.resolve()}.bind(b))}
|
|
360
|
+
Pi.prototype.M=function(b,c,d,e){var f=e.reader.bd(),g=e.reader.bd(),h=e.reader.F(),k=e.reader.F(),l=e.reader.F(),m=e.reader.F();e=e.reader.Xa(e.reader.K.byteLength-e.reader.ba());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.hf();else this.a.onEvent(new J("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
|
|
361
|
+
function xj(b,c,d){var e=Math.max(b.g.bufferBehind,b.c.presentationTimeline.a),f=je(b.a.I,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.I.remove(c.type,f,f+d).then(function(){}.bind(b))}
|
|
362
|
+
function vj(b,c){if(!b.s){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.s=d.every(function(b){return"text"==b.type?!0:!b.Ma&&!b.Pa&&b.Aa});if(b.s){d=cj(b,c);b.h[d]||jj(b,d).then(function(){this.f||this.a.Kd()}.bind(b))["catch"](zd.ic);for(d=0;d<b.c.periods.length;++d)jj(b,d)["catch"](zd.ic);b.a.sf&&b.a.sf()}}}
|
|
363
|
+
function nj(b,c){var d=cj(b,c.stream);if(c.pa!=d){var e=c.pa,f=Array.from(b.b.values());f.every(function(b){return b.pa==e||oj(b)})&&f.every(yj)&&jj(b,e).then(function(){if(!this.f&&f.every(function(b){var c=yj(b),d=cj(this,b.stream);return oj(b)?!0:c&&b.pa==e&&d!=e}.bind(this))){var b=this.c.periods[e],c=this.a.Ld(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=r(this.b.keys());for(c=
|
|
364
|
+
l.next();!c.done;c=l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new G(2,5,5005));return}l=r(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.b.has(c))if("text"==c)Si(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new G(2,5,5005));return}b=r(Array.from(this.b.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(aj(this,l,!1,0,!1),Zi(this,this.b.get(c),0)):this.b["delete"](c);this.a.Kd()}}.bind(b))["catch"](zd.ic)}}
|
|
365
|
+
function oj(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}function yj(b){return!b.Ha&&null==b.Da&&!b.Ma&&!b.Pa}function Ri(b,c){var d=pi(b.c.periods,c+Dd);return d?b.c.periods.indexOf(d):0}
|
|
366
|
+
function cj(b,c){for(var d=b.c.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=r(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=r(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}function tj(b,c,d){d=Ag(d.c(),d.b,d.a,b.g.retryParameters);b=b.a.rb.request(1,d);c.Kb=b;return b.promise.then(function(b){c.Kb=null;return b.data})}
|
|
367
|
+
function fj(b,c,d,e){return t(function g(){var h,k,l;return z(g,function(g){switch(g.j){case 1:return c.Ma=!1,c.uc=!1,c.Zb=0,c.Pa=!0,e?(k=b.a.Sa(),l=b.a.I.Y(),h=b.a.I.remove(c.type,k+e,l)):h=pe(b.a.I,c.type).then(function(){if(!this.f&&d)return this.a.I.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.pb=null;c.Aa=null;c.Pa=!1;c.endOfStream=!1;Zi(b,c,0);v(g)}})})}
|
|
368
|
+
function Zi(b,c,d){c.Da=(new sb(function(){return t(function f(){var d;return z(f,function(f){switch(f.j){case 1:return y(f,2),u(f,kj(b,c),4);case 4:za(f,0);break;case 2:d=Ca(f);if(b.a)b.a.onError(d);v(f)}})})})).O(d)}function Qi(b){null!=b.Da&&(b.Da.stop(),b.Da=null)}function mj(b,c){zb(b.G).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function zj(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return{uri:f||e,ad:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=Cc(c)}catch(h){}throw new G(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function Aj(b,c,d,e){var f=new Aj.b;mc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new Aj.a,h={vd:!1,ge:!1};b=Aj.l(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new I(b,function(){h.vd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new D(function(){h.ge=!0;g.abort()});k.O(c/1E3);b["finally"](function(){k.stop()})}return b}A("shaka.net.HttpFetchPlugin",Aj);
|
|
369
|
+
Aj.l=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,w,x,B,C,E,F,V,Y,ma;return z(h,function(h){switch(h.j){case 1:return k=Aj.g,l=Aj.c,w=q=0,x=Date.now(),y(h,2),u(h,k(b,d),4);case 4:return m=h.o,B=m.clone().body.getReader(),E=(C=m.headers.get("Content-Length"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return z(ja,function(h){switch(h.j){case 1:return y(h,2),u(h,B.read(),4);case 4:d=h.o;za(h,3);break;case 2:return Ca(h),h["return"]();case 3:d.done||(q+=d.value.byteLength);
|
|
370
|
+
e=Date.now();if(100<e-x||d.done)f(e-x,q-w,E-q),w=q,x=e;d.done?b.close():(b.enqueue(d.value),c());v(h)}})})}c()},new l({start:F}),u(h,m.arrayBuffer(),5);case 5:n=h.o;za(h,3);break;case 2:V=Ca(h);if(e.vd)throw new G(1,1,7001,b,c);if(e.ge)throw new G(1,1,1003,b,c);throw new G(1,1,1002,b,V,c);case 3:return Y={},ma=m.headers,ma.forEach(function(b,c){Y[c.trim()]=b}),h["return"](zj(Y,n,m.status,b,m.url,c))}})})};
|
|
371
|
+
Aj.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};Aj.isSupported=Aj.isSupported;Aj.g=window.fetch;Aj.a=window.AbortController;Aj.c=window.ReadableStream;Aj.b=window.Headers;Aj.isSupported()&&(Sb("http",Aj,2),Sb("https",Aj,2));function Bj(b,c,d,e){var f=new Bj.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new G(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=zj(f,c.response,c.status,b,c.responseURL,
|
|
372
|
+
d);k(h)}catch(E){m(E)}};f.onerror=function(c){m(new G(1,1,1002,b,c,d))};f.ontimeout=function(){m(new G(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new I(k,function(){f.abort();return Promise.resolve()})}A("shaka.net.HttpXHRPlugin",Bj);Bj.f=window.XMLHttpRequest;Sb("http",Bj,1);
|
|
373
|
+
Sb("https",Bj,1);function Cj(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function Dj(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}Cj.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function Ej(b,c){this.g=b;this.b=new Map;this.c=!1;this.f=c;this.a=new Cj}Ej.prototype.destroy=function(){this.c=!0;return Promise.all(this.b.values()).then(function(){},function(){})};
|
|
374
|
+
function Fj(b,c,d,e,f){var g=Dj(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return t(function k(){var c;return z(k,function(e){switch(e.j){case 1:return u(e,Gj(b,d),2);case 2:c=e.o;if(b.c)throw new G(2,9,7001);b.a.close(g,c.byteLength);var k=b.a;b.f(0==k.b?0:k.f/k.b,b.a.a);return e["return"](f(c))}})})}))}function Hj(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:return u(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}
|
|
375
|
+
function Gj(b,c){return t(function e(){var f,g;return z(e,function(e){switch(e.j){case 1:return f=b.g.request(1,c),u(e,f.promise,2);case 2:return g=e.o,e["return"](g.data)}})})};function Ij(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new H;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}Ij.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
|
|
376
|
+
function Jj(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}Ij.prototype.store=function(){return this.b};Ij.prototype.promise=function(){return this.a};function Kj(b){this.b=b;this.a=[]}Kj.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Lj(b,c){return Mj(b,c,"readonly")}function Nj(b,c){return Mj(b,c,"readwrite")}function Mj(b,c,d){d=b.b.transaction([c],d);var e=new Ij(d,c);b.a.push(e);e.promise().then(function(){Lb(b.a,e)},function(){Lb(b.a,e)});return e};function Oj(b){this.a=new Kj(b)}Oj.prototype.destroy=function(){return this.a.destroy()};Oj.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=Lj(b.a,"session-ids"),f=[],u(d,Jj(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Oj.prototype.add=function(b){var c=Nj(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
|
|
377
|
+
Oj.prototype.remove=function(b){var c=this;return t(function e(){var f;return z(e,function(e){switch(e.j){case 1:return f=Nj(c.a,"session-ids"),u(e,Jj(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Pj(){this.a=new Map}Pj.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Pj.prototype.init=function(){var b=this;Qj.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
|
|
378
|
+
function Rj(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{ua:e,aa:d},aa:b})})});if(c)return c;throw new G(2,9,9013,"Could not find a cell that supports add-operations");}function Sj(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({ua:e,aa:d},b)})})}
|
|
379
|
+
function Tj(b,c,d){b=b.a.get(c);if(!b)throw new G(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new G(2,9,9013,"Could not find cell with name "+d);return c}function Uj(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Vj(b){var c=Array.from(b.a.keys());if(!c.length)throw new G(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
|
|
380
|
+
Pj.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return z(d,function(d){switch(d.j){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Qj,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.A(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function Wj(b,c){Qj.set(b,c)}A("shaka.offline.StorageMuxer.register",Wj);A("shaka.offline.StorageMuxer.unregister",function(b){Qj["delete"](b)});
|
|
381
|
+
var Qj=new Map;function Xj(b){this.a=new Kj(b)}p=Xj.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return Yj("segment")};p.removeSegments=function(b,c){return Zj(this,"segment",b,c)};p.getSegments=function(b){return ak(this,"segment",b).then(function(b){return b.map(bk)})};p.addManifests=function(){return Yj("manifest")};
|
|
382
|
+
p.updateManifestExpiration=function(b,c){var d=Nj(this.a,"manifest"),e=d.store(),f=new H;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new G(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};p.removeManifests=function(b,c){return Zj(this,"manifest",b,c)};p.getManifests=function(b){return ak(this,"manifest",b).then(function(b){return b.map(ck)})};
|
|
383
|
+
p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=Lj(b.a,"manifest"),f=new Map,u(d,Jj(e,function(b,d){f.set(b,ck(d))}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};function Yj(b){return Promise.reject(new G(2,9,9011,"Cannot add new value to "+b))}function Zj(b,c,d,e){b=Nj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
|
|
384
|
+
function ak(b,c,d){b=Lj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new G(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
|
|
385
|
+
function ck(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(dk),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function dk(b){ek(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(fk)}}
|
|
386
|
+
function fk(b){var c=b.$e?gk(b.$e):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(hk),variantIds:b.variantIds}}function hk(b){var c=gk(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
|
|
387
|
+
function bk(b){return{data:b.data}}function gk(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new G(2,9,9004,"Could not parse uri "+b);}
|
|
388
|
+
function ek(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
|
|
389
|
+
e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function ik(b,c,d,e){this.a=new Kj(b);this.c=c;this.b=d;this.f=e}p=ik.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return this.f};p.addSegments=function(b){return jk(this,this.c,b)};p.removeSegments=function(b,c){return kk(this,this.c,b,c)};p.getSegments=function(b){return lk(this,this.c,b)};p.addManifests=function(b){return jk(this,this.b,b)};
|
|
390
|
+
p.updateManifestExpiration=function(b,c){var d=Nj(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return kk(this,this.b,b,c)};p.getManifests=function(b){return lk(this,this.b,b)};
|
|
391
|
+
p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return e=Lj(b.a,b.b),f=new Map,u(d,Jj(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
|
|
392
|
+
function jk(b,c,d){if(b.f)return Promise.reject(new G(1,9,9011,"Cannot add new value to "+c));b=Nj(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function kk(b,c,d,e){b=Nj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
|
|
393
|
+
function lk(b,c,d){b=Lj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new G(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function mk(){this.g=this.c=this.b=this.a=this.f=null}p=mk.prototype;
|
|
394
|
+
p.init=function(){var b=this,c=new H,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Xj(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ik(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ik(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
|
|
395
|
+
new Oj(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new G(2,9,9001,d.error));b.preventDefault()};return c};
|
|
396
|
+
p.destroy=function(){var b=this;return t(function d(){return z(d,function(d){switch(d.j){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.A(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),v(d)}})})};p.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};p.getEmeSessionCell=function(){return this.g};
|
|
397
|
+
p.erase=function(){var b=this;return t(function d(){return z(d,function(d){switch(d.j){case 1:if(!b.a){d.A(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.A(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.A(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,nk(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
|
|
398
|
+
function nk(){var b=new H,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new G(2,9,9001,c.error));d.preventDefault()};return b}Wj("idb",function(){return window.indexedDB?new mk:null});function ok(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}ok.prototype.ua=function(){return this.g};ok.prototype.aa=function(){return this.f};ok.prototype.key=function(){return this.c};ok.prototype.toString=function(){return this.b};
|
|
399
|
+
function pk(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new ok(c,d,e,Number(b[4])):null};function qk(b,c){this.b=b;this.a=c}function rk(b,c){var d=new W(null,0);d.wa(c.duration);var e=c.periods.map(function(c){return sk(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
|
|
400
|
+
function sk(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=tk(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return uk(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return vk(b,d,c)});d.sb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
|
|
401
|
+
function tk(b,c,d){for(var e=new Set,f=r(c),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(d);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(e=c.next();!e.done;e=c.next())for(e=
|
|
402
|
+
e.value,g=uk(b,e),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;d=r(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=uk(b,e),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
|
|
403
|
+
function uk(b,c){var d=c.segments.map(function(c,d){return vk(b,d,c)}),e=new T(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
|
|
404
|
+
language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=wk(b,c.initSegmentKey));return d}function vk(b,c,d){var e=new ok("segment",b.b,b.a,d.dataKey);return new S(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function wk(b,c){var d=new ok("segment",b.b,b.a,c);return new ag(function(){return[d.toString()]},0,null)};function xk(){this.a=null}p=xk.prototype;p.configure=function(){};
|
|
405
|
+
p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:f=pk(b);c.a=f;if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new G(2,1,9004,f)));g=new Pj;ya(e,2);return u(e,g.init(),4);case 4:return u(e,Tj(g,f.ua(),f.aa()),5);case 5:return h=e.o,u(e,h.getManifests([f.key()]),6);case 6:return k=e.o,l=k[0],m=new qk(f.ua(),f.aa()),e["return"](rk(m,l));case 2:return Da(e),u(e,g.destroy(),7);case 7:Ea(e,0)}})})};p.stop=function(){return Promise.resolve()};
|
|
403
406
|
p.update=function(){};
|
|
404
|
-
p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return
|
|
405
|
-
f.A(3)}})})};U.Nb("application/x-offline-manifest",
|
|
406
|
-
Sb("offline",
|
|
407
|
-
function
|
|
408
|
-
u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return
|
|
409
|
-
function
|
|
410
|
-
function
|
|
411
|
-
function
|
|
412
|
-
function
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
function
|
|
416
|
-
function
|
|
417
|
-
function
|
|
418
|
-
function
|
|
419
|
-
rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};
|
|
420
|
-
bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
|
|
421
|
-
|
|
422
|
-
function
|
|
423
|
-
|
|
424
|
-
function
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
d.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
X.
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
X.prototype.
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
function
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
function
|
|
442
|
-
function
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
function
|
|
446
|
-
b
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
return
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
function
|
|
456
|
-
function
|
|
457
|
-
function
|
|
458
|
-
function
|
|
459
|
-
|
|
460
|
-
|
|
407
|
+
p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return z(f,function(f){switch(f.j){case 1:return g=d.a,h=new Pj,y(f,2,3),u(f,h.init(),5);case 5:return u(f,Tj(h,g.ua(),g.aa()),6);case 6:return k=f.o,u(f,k.getManifests([g.key()]),7);case 7:l=f.o;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Da(f),u(f,h.destroy(),10);case 10:Ea(f,0);break;case 2:Ca(f),
|
|
408
|
+
f.A(3)}})})};U.Nb("application/x-offline-manifest",xk);function yk(b){var c=pk(b);return c&&"manifest"==c.a?yk.h(b):c&&"segment"==c.a?yk.i(c.key(),c):Ab(new G(2,1,9004,b))}A("shaka.offline.OfflineScheme",yk);yk.h=function(b){b={uri:b,ad:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Cb(b)};yk.i=function(b,c){var d=new Pj;return Cb(void 0).U(function(){return d.init()}).U(function(){return Tj(d,c.ua(),c.aa())}).U(function(b){return b.getSegments([c.key()])}).U(function(b){return{uri:c,ad:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})};
|
|
409
|
+
Sb("offline",yk);function zk(b,c,d){return t(function f(){var g,h,k,l,m,n;return z(f,function(f){switch(f.j){case 1:g=[];for(var q=[],x=r(d),B=x.next();!B.done;B=x.next()){B=B.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,Ak(F.info,B)){F.sessionIds.push(B.sessionId);C=!0;break}C||q.push({info:B,sessionIds:[B.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=Bk(b,c,l);return u(f,m,5);case 5:n=f.o;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f["return"](g)}})})}
|
|
410
|
+
function Bk(b,c,d){return t(function f(){var g,h;return z(f,function(f){switch(f.j){case 1:return g=new Lc({rb:c,onError:function(){},kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),y(f,2),g.configure(b),u(f,Tc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Ca(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return y(f,6),u(f,$c(g),8);case 8:za(f,7);break;case 6:return Ca(f),
|
|
411
|
+
u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return z(n,function(c){switch(c.j){case 1:return y(c,2),u(c,cd(g,b),4);case 4:h.push(b);za(c,0);break;case 2:Ca(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
|
|
412
|
+
function Ak(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Nb(b.audioCapabilities,c.audioCapabilities,d)&&Nb(b.videoCapabilities,c.videoCapabilities,d)};function Ck(b,c){var d=Dk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.l=!0;this.m=Promise.resolve().then(function(){return Ek(e)})}Ck.prototype.destroy=function(){var b=this;return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:return b.l=!1,b.b&&b.b.abort(),Fk(b),u(d,b.m,2);case 2:b.a&&b.a.ta.Wa();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.ta.Wa();b.a=null;b.f=[];b.g=null;v(d)}})})};
|
|
413
|
+
function Gk(b,c){var d={tb:function(){},jc:function(){},Wa:function(){},onError:function(){},lc:function(){},sg:function(){}};b.f.push({create:c,ta:d});b.b&&b.b.abort();Fk(b);return d}
|
|
414
|
+
function Ek(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:if(b.l){if(0==b.f.length||b.a&&!b.a.Ta)var e=!1;else{b.a&&(b.a.ta.Wa(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.ta.tb(),b.a={node:g.node,payload:g.payload,Ta:g.Ta,ta:e.ta}):e.ta.lc();e=!0}e?e=Promise.resolve():b.a?e=Hk(b):(b.g.ff(b.c),b.h=new H,e=b.h);return u(d,e,1)}d.A(0)}})})}
|
|
415
|
+
function Hk(b){return t(function d(){var e,f;return z(d,function(d){switch(d.j){case 1:return b.c=b.g.Pe(b.c,b.i,b.a.node,b.a.payload),y(d,2),b.b=b.g.ze(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.ta.jc(),b.a=null);za(d,0);break;case 2:e=Ca(d);if(7001==e.code)b.a.ta.Wa();else b.a.ta.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.o,v(d)}})})}function Fk(b){b.h&&(b.h.resolve(),b.h=null)};function Ik(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}A("shaka.text.SimpleTextDisplayer",Ik);Ik.prototype.remove=function(b,c){if(!this.a)return!1;Jk(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};Ik.prototype.remove=Ik.prototype.remove;
|
|
416
|
+
Ik.prototype.append=function(b){for(var c=Kk,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};Ik.prototype.append=Ik.prototype.append;Ik.prototype.destroy=function(){this.a&&Jk(this.a,function(){return!0});this.a=null;return Promise.resolve()};Ik.prototype.destroy=Ik.prototype.destroy;
|
|
417
|
+
Ik.prototype.isTextVisible=function(){return"showing"==this.a.mode};Ik.prototype.isTextVisible=Ik.prototype.isTextVisible;Ik.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};Ik.prototype.setTextVisibility=Ik.prototype.setTextVisibility;
|
|
418
|
+
function Kk(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
|
|
419
|
+
function Jk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Lk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Jb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Jb(m)),l=Lk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}A("shaka.util.ConfigUtils.mergeConfigObjects",Lk);
|
|
420
|
+
function Mk(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}A("shaka.util.ConfigUtils.convertToConfigObject",Mk);function Nk(){}A("shaka.util.PlayerConfiguration",Nk);
|
|
421
|
+
function Ok(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:yb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(b){return b},fairPlayTransform:!0},e={retryParameters:yb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,
|
|
422
|
+
autoCorrectDrift:!0},hls:{ignoreTextStreamFailures:!1}},f={retryParameters:yb(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};xc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},
|
|
423
|
+
h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
|
|
424
|
+
minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Pk(b,h.preferredAudioLanguage)};return h}
|
|
425
|
+
function Qk(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Lk(b,c,d||Ok(),e,"")}Nk.mergeConfigObjects=Qk;
|
|
426
|
+
function Pk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=xe(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
|
|
427
|
+
2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Rk(){this.a=null;this.b=[]}function Sk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Tk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
|
|
428
|
+
function Uk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Vk(){this.b=this.c=null;this.a=[]};function Wk(){this.f=this.l=this.b=this.h=this.i=this.g=this.m=NaN;this.a=new Rk;this.c=new Vk};function X(b,c){var d=this;Ib.call(this);this.h=Xk;this.a=null;this.eb=!1;this.i=new L;this.vc=this.l=this.Bb=this.c=this.m=this.f=this.Sb=this.P=this.Tb=this.W=this.gb=this.s=this.D=this.g=this.G=null;this.Hd=1E9;this.Wb=new Set;this.ib=!0;this.Ea=null;this.Dd=!1;this.Bd=0;this.na=null;this.$=new Sh;this.b=Yk(this);this.Xb={width:Infinity,height:Infinity};this.v=null;this.Ub=new ai(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.ma=this.b.preferredTextLanguage;
|
|
429
|
+
this.cb=this.b.preferredTextRole;c&&c(this);this.G=Zk(this);this.i.w(window,"online",function(){d.gd()});this.C={name:"detach"};this.M={name:"attach"};this.Fa={name:"unload"};this.Ec={name:"manifest-parser"};this.Cc={name:"manifest"};this.fb={name:"media-source"};this.wc={name:"drm-engine"};this.T={name:"load"};this.Ic={name:"src-equals-drm-engine"};this.hb={name:"src-equals"};var e=new Map;e.set(this.M,function(b,c){return Db($k(d,b,c))});e.set(this.C,function(b){b.u&&(d.i.ea(b.u,"error"),b.u=null);
|
|
430
|
+
d.a=null;b=Promise.resolve();return Db(b)});e.set(this.Fa,function(b){return Db(al(d,b))});e.set(this.fb,function(b){b=bl(d,b);return Db(b)});e.set(this.Ec,function(b,c){var e=cl(d,b,c);return Db(e)});e.set(this.Cc,function(b){return dl(d,b)});e.set(this.wc,function(){var b=el(d);return Db(b)});e.set(this.T,function(b,c){return Db(fl(d,b,c))});e.set(this.Ic,function(b){b=gl(d,b);return Db(b)});e.set(this.hb,function(b,c){return hl(d,b,c)});this.jb=new Ck(this.C,{Pe:function(b,c,e,k){var f=null;b==
|
|
431
|
+
d.C&&(f=e==d.C?d.C:d.M);b==d.M&&(f=e==d.C||c.u!=k.u?d.C:e==d.M?d.M:e==d.fb||e==d.T?d.fb:e==d.hb?d.Ic:null);b==d.fb&&(f=e==d.T&&c.u==k.u?d.Ec:d.Fa);b==d.Ec&&(f=il(d.T,d.Cc,d.Fa,e,c,k));b==d.Cc&&(f=il(d.T,d.wc,d.Fa,e,c,k));b==d.wc&&(f=il(d.T,d.T,d.Fa,e,c,k));b==d.Ic&&(f=e==d.hb&&c.u==k.u?d.hb:d.Fa);if(b==d.T||b==d.hb)f=d.Fa;b==d.Fa&&(f=k.u&&c.u==k.u?d.M:d.C);return f},ze:function(b,c,h){d.dispatchEvent(new J("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return z(h,
|
|
432
|
+
function(c){switch(c.j){case 1:return u(c,al(d,b),2);case 2:return c["return"](b.u?d.M:d.C)}})})},ff:function(b){d.dispatchEvent(new J("onstateidle",{state:b.name}))}});b&&this.Cb(b,!0)}Ua(X,Ib);A("shaka.Player",X);
|
|
433
|
+
X.prototype.destroy=function(){var b=this;return t(function d(){var e;return z(d,function(d){switch(d.j){case 1:if(b.h==jl)return d["return"]();b.h=jl;e=Gk(b.jb,function(){return{node:b.C,payload:Dk(),Ta:!1}});return u(d,new Promise(function(b){e.tb=function(){};e.jc=function(){b()};e.Wa=function(){b()};e.onError=function(){b()};e.lc=function(){b()}}),2);case 2:return u(d,b.jb.destroy(),3);case 3:b.i&&(b.i.release(),b.i=null);b.vc=null;b.l=null;b.b=null;if(!b.G){d.A(0);break}return u(d,b.G.destroy(),
|
|
434
|
+
5);case 5:b.G=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version="v2.5.5";var kl=["2","5"];Re=new function(b){this.a=b;this.c=Se;this.b=Te}(new Pe(Number(kl[0]),Number(kl[1])));var ll=["output-restricted","internal-error"],ml={};X.registerSupportPlugin=function(b,c){ml[b]=c};
|
|
435
|
+
X.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?sc()?!0:tc("application/x-mpegurl"):!1};
|
|
436
|
+
X.probeSupport=function(){return od().then(function(b){for(var c=U.Af(),d={},e=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),f=
|
|
437
|
+
e.next();!f.done;f=e.next()){f=f.value;d[f]=sc()?ae(f)?!0:MediaSource.isTypeSupported(f)||Fd(f):tc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in ml)b[h]=ml[h]();return b})};X.prototype.Cb=function(b,c){c=void 0===c?!0:c;if(this.h==jl)return Promise.reject(nl());var d=Dk();d.u=b;sc()||(c=!1);var e=c?this.fb:this.M,f=Gk(this.jb,function(){return{node:e,payload:d,Ta:!1}});f.tb=function(){};return ol(f)};X.prototype.attach=X.prototype.Cb;
|
|
438
|
+
X.prototype.detach=function(){var b=this;if(this.h==jl)return Promise.reject(nl());var c=Gk(this.jb,function(){return{node:b.C,payload:Dk(),Ta:!1}});c.tb=function(){};return ol(c)};X.prototype.detach=X.prototype.detach;X.prototype.rd=function(b){var c=this;b=void 0===b?!0:b;if(this.h==jl)return Promise.reject(nl());sc()||(b=!1);var d=Dk(),e=Gk(this.jb,function(e){var f=e.u&&b?c.fb:e.u?c.M:c.C;d.u=e.u;return{node:f,payload:d,Ta:!1}});e.tb=function(){};return ol(e)};X.prototype.unload=X.prototype.rd;
|
|
439
|
+
X.prototype.load=function(b,c,d){if(this.h==jl)return Promise.reject(nl());this.dispatchEvent(new J("loading"));var e=Dk();e.uri=b;e.od=Date.now()/1E3;d&&"string"!=typeof d&&(Qe("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.ya=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=pl(e)?this.hb:this.T,g=Gk(this.jb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ta:!0}});g.tb=function(){};
|
|
440
|
+
return new Promise(function(b,c){g.lc=function(){return c(new G(2,7,7002))};g.jc=function(){return b()};g.Wa=function(){return c(nl())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load;
|
|
441
|
+
function pl(b){if(b.ya)return!1;if(!sc())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[U.getExtension(b)]);return c?tc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function $k(b,c,d){null==c.u&&(c.u=d.u,b.i.w(c.u,"error",function(){var c=ql(b);c&&b.Ka(c)}));b.a=c.u;return Promise.resolve()}
|
|
442
|
+
function al(b,c){return t(function e(){return z(e,function(e){switch(e.j){case 1:b.h!=jl&&(b.h=Xk);b.dispatchEvent(new J("unloading"));c.ya=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.ea(c.u,"loadeddata"),b.i.ea(c.u,"playing"),b.i.ea(c.u,"pause"),b.i.ea(c.u,"ended"),b.i.ea(c.u,"ratechange"));b.gb&&(b.gb.release(),b.gb=null);b.Tb&&(b.Tb.stop(),b.Tb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.l){e.A(4);break}return u(e,b.l.stop(),4);case 4:if(!b.f){e.A(6);
|
|
443
|
+
break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.s&&(b.s.release(),b.s=null);if(!b.D){e.A(8);break}return u(e,b.D.destroy(),9);case 9:b.D=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute("src"),c.u.load());if(!b.g){e.A(10);break}return u(e,b.g.destroy(),11);case 11:b.g=null;case 10:b.$.a.clear(),b.Bb=null,b.P=null,b.Wb.clear(),b.c=null,b.v=null,b.xc=null,b.ib=!0,rl(b),v(e)}})})}
|
|
444
|
+
function bl(b,c){return t(function e(){var f,g,h,k;return z(e,function(e){switch(e.j){case 1:return f=window.muxjs?new sd:new td,g=b.b.textDisplayFactory,h=new g,b.xc=g,k=new ee(c.u,f,h),u(e,k.s,2);case 2:b.D=k,v(e)}})})}
|
|
445
|
+
function cl(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:c.ya=d.ya;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.G;b.Bb=g;if(c.ya){b.m=c.ya();f.A(2);break}k=b;return u(f,U.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.o;case 2:b.m.configure(b.b.manifest),v(f)}})})}
|
|
446
|
+
function dl(b,c){var d=c.uri,e=b.G;b.Sb=new Ii;Ji(b.Sb,function(c){sl(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Fc(c)},filterAllPeriods:function(c){return tl(b,c)},onTimelineRegionAdded:function(c){var d=b.Sb;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ka(c)}};
|
|
447
|
+
return new I(Promise.resolve().then(function(){return t(function h(){var c;return z(h,function(e){switch(e.j){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.c=e.o;b.dispatchEvent(new J("manifestparsed"));if(0==b.c.periods.length)throw new G(2,4,4014);ul(b.c.periods);v(e)}})})}),function(){return b.m.stop()})}
|
|
448
|
+
function el(b){return t(function d(){return z(d,function(d){switch(d.j){case 1:return b.g=new Lc({rb:b.G,onError:function(d){b.Ka(d)},kc:function(d){vl(b,d)},onExpirationUpdated:function(d,e){wl(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.g.configure(b.b.drm),u(d,Sc(b.g,oi(b.c.periods),b.c.offlineSessionIds),2);case 2:tl(b,b.c.periods),v(d)}})})}
|
|
449
|
+
function fl(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x;return z(f,function(f){switch(f.j){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.Bb=h,b.v=new Wk,k=function(){return xl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.W.set(c)},b.i.w(g,"playing",k),b.i.w(g,"pause",k),b.i.w(g,"ended",k),b.i.w(g,"ratechange",l),m=b.b.abrFactory,b.l&&b.vc==m||(b.vc=m,b.l=new m,b.l.configure(b.b.abr)),yl(b,b.c.periods),b.Ub=new ai(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount),
|
|
450
|
+
b.ma=b.b.preferredTextLanguage,zl(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.g.Cb(g),2);case 2:return b.l.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}Al(b,g,c,!0);b.f&&(bj(b.f,c,d,f),Bl(b))}),b.s=Cl(b,c.startTime),b.gb=Dl(b),b.W=new si({ec:function(){return c.u.playbackRate},ld:function(b){c.u.playbackRate=b},Id:function(b){c.u.currentTime+=b}}),
|
|
451
|
+
n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),El(b,n),b.f=Fl(b),b.f.configure(b.b.streaming),Gl(b),b.h=Hl,b.dispatchEvent(new J("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.s.h(),w=Il(b,q),b.s.m(w)),b.c.periods.forEach(b.Fc.bind(b)),Jl(b),Bl(b),x=Kl(b)||b.c.periods[0],x.variants.some(function(b){return b.primary}),Ll(b,x.variants),b.i.da(g,"loadeddata",function(){b.v.b=Date.now()/1E3-d.od}),v(f)}})})}
|
|
452
|
+
function gl(b,c){return t(function e(){var f,g;return z(e,function(e){switch(e.j){case 1:return f=Cd,b.g=new Lc({rb:b.G,onError:function(c){b.Ka(c)},kc:function(c){vl(b,c)},onExpirationUpdated:function(c,e){wl(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.g.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,
|
|
453
|
+
presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Sc(b.g,[g],[]),2);case 2:return u(e,b.g.Cb(c.u),0)}})})}
|
|
454
|
+
function hl(b,c,d){function e(){return xl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Bb=c.uri;b.v=new Wk;b.s=new Bi(c.u);null!=c.startTime&&b.s.m(c.startTime);b.W=new si({ec:function(){return c.u.playbackRate},ld:function(b){c.u.playbackRate=b},Id:function(b){c.u.currentTime+=b}});El(b,b.b.streaming.rebufferingGoal);b.i.w(c.u,"playing",e);b.i.w(c.u,"pause",e);b.i.w(c.u,"ended",e);b.i.da(c.u,"loadeddata",function(){b.v.b=Date.now()/1E3-d.od});b.a.audioTracks&&(b.i.w(b.a.audioTracks,"addtrack",function(){return Jl(b)}),
|
|
455
|
+
b.i.w(b.a.audioTracks,"removetrack",function(){return Jl(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.i.w(f,"addtrack",function(){return Jl(b)});b.i.w(f,"removetrack",function(){return Jl(b)})}c.u.src=c.uri;b.h=Ml;b.dispatchEvent(new J("streaming"));var g=new H;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(ql(b)):(b.i.da(b.a,"loadeddata",function(){g.resolve()}),b.i.da(b.a,"error",function(){g.reject(ql(b))}));return new I(g,function(){g.reject(new G(2,7,7001));
|
|
456
|
+
return Promise.resolve()})}function ul(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}
|
|
457
|
+
function Gl(b){function c(b){var c="";b.video&&(c=rc(b.video.codecs)[0]);var d="";b.audio&&(d=rc(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=Je(d,b.b.preferredAudioChannelCount);var e=new Hb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
|
|
458
|
+
f?!0:!1})})}function Zk(b){return new K(function(c,d){b.l&&b.l.segmentDownloaded(c,d)})}function Cl(b,c){return new Ci(b.a,b.c,b.b.streaming,c,function(){b.gb&&ni(b.gb,!0);b.f&&hj(b.f)},function(c){return b.dispatchEvent(c)})}
|
|
459
|
+
function Dl(b){var c=new qi(b.c);ri(c,function(){Jl(b)});var d=new Ki(b.Sb);Oi(d,function(c){sl(b,"timelineregionenter",c)},function(c){sl(b,"timelineregionexit",c)},function(c,d){d||(sl(b,"timelineregionenter",c),sl(b,"timelineregionexit",c))});var e=new mi(b.a);e.a.add(c);e.a.add(d);return e}
|
|
460
|
+
function El(b,c){b.P=new di(c,Math.min(.5,c/2));b.P.a=fi;rl(b);b.Tb=(new D(function(){switch(b.h){case Ml:var c=b.a.ended?!0:ud(b.a.buffered)>=b.a.duration-.1;break;case Hl:a:if(b.a.ended||ie(b.D))c=!0;else{if(b.c.presentationTimeline.V()){var e=b.c.presentationTimeline.nb();if(ud(b.a.buffered)>=e){c=!0;break a}}c=!1}break;default:c=!1}var f=xd(b.a.buffered,b.a.currentTime);e=b.P;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?ei:fi;e.a=f;c!=f&&rl(b)})).La(.25)}
|
|
461
|
+
function Fl(b){return new Pi(b.c,{Sa:function(){return b.s.h()},getBandwidthEstimate:function(){return b.l.getBandwidthEstimate()},I:b.D,rb:b.G,Ld:b.df.bind(b),Kd:b.te.bind(b),onError:b.Ka.bind(b),onEvent:function(c){return b.dispatchEvent(c)},hf:b.jf.bind(b),Zc:b.qf.bind(b)})}X.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Mk(b,c));var d=Qk(this.b,b,Yk(this));Nl(this);return d};X.prototype.configure=X.prototype.configure;
|
|
462
|
+
function Nl(b){b.m&&b.m.configure(b.b.manifest);b.g&&b.g.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.Fc.bind(b))}catch(g){b.Ka(g)}var c=Ti(b.f),d=Vi(b.f),e=Kl(b);c=Me(c,d,e.variants);b.l&&c&&c.allowedByApplication&&c.allowedByKeySystem?Ll(b,e.variants):Ol(b,e)}if(b.D&&(e=b.b.textDisplayFactory,b.xc!=e)){c=new e;d=b.D;var f=d.g;d.g=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.xc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&aj(e,c.stream,!0,
|
|
463
|
+
0,!0))}b.l&&(b.l.configure(b.b.abr),b.b.abr.enabled&&!b.ib?b.l.enable():b.l.disable(),Pl(b))}X.prototype.getConfiguration=function(){var b=Yk(this);Qk(b,this.b,Yk(this));return b};X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.If=function(){for(var b in this.b)delete this.b[b];Qk(this.b,Yk(this),Yk(this));Nl(this)};X.prototype.resetConfiguration=X.prototype.If;X.prototype.Je=function(){return this.h};X.prototype.getLoadMode=X.prototype.Je;X.prototype.Ne=function(){return this.a};
|
|
464
|
+
X.prototype.getMediaElement=X.prototype.Ne;X.prototype.Fb=function(){return this.G};X.prototype.getNetworkingEngine=X.prototype.Fb;X.prototype.bc=function(){return this.Bb};X.prototype.getAssetUri=X.prototype.bc;X.prototype.Me=function(){Qe("getManifestUri",'Please use "getAssetUri" instead.');return this.bc()};X.prototype.getManifestUri=X.prototype.Me;X.prototype.V=function(){return this.c?this.c.presentationTimeline.V():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.V;
|
|
461
465
|
X.prototype.Va=function(){return this.c?this.c.presentationTimeline.Va():!1};X.prototype.isInProgress=X.prototype.Va;X.prototype.af=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.af;
|
|
462
466
|
X.prototype.Kf=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.mb(),end:b.za()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};X.prototype.seekRange=X.prototype.Kf;X.prototype.keySystem=function(){return this.g?this.g.keySystem():""};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.g?this.g.a:null};X.prototype.drmInfo=X.prototype.drmInfo;
|
|
463
|
-
X.prototype.dc=function(){return this.g?this.g.dc():Infinity};X.prototype.getExpiration=X.prototype.dc;X.prototype.
|
|
464
|
-
X.prototype.trickPlay=X.prototype.bg;X.prototype.ue=function(){this.h==
|
|
465
|
-
X.prototype.
|
|
466
|
-
X.prototype.ob=function(){if(this.c&&this.
|
|
467
|
-
X.prototype.
|
|
468
|
-
X.prototype.Mf=function(){
|
|
469
|
-
X.prototype.gg=function(){
|
|
470
|
-
X.prototype.Of=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=
|
|
471
|
-
c.next())d=d.value,
|
|
472
|
-
X.prototype.Lf=function(b,c){if(this.c&&this.
|
|
473
|
-
X.prototype.Nf=function(b,c){if(this.c&&this.
|
|
467
|
+
X.prototype.dc=function(){return this.g?this.g.dc():Infinity};X.prototype.getExpiration=X.prototype.dc;X.prototype.Oc=function(){return this.P?this.P.a==fi:!1};X.prototype.isBuffering=X.prototype.Oc;X.prototype.Qe=function(){if(this.W){var b=this.W;b=b.f?0:b.c}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Qe;X.prototype.bg=function(b){0==b?$a("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(b),this.h==Hl&&$i(this.f,1<Math.abs(b)))};
|
|
468
|
+
X.prototype.trickPlay=X.prototype.bg;X.prototype.ue=function(){this.h==Ml&&this.W.set(1);this.h==Hl&&(this.W.set(1),$i(this.f,!1))};X.prototype.cancelTrickPlay=X.prototype.ue;
|
|
469
|
+
X.prototype.Nc=function(){if(this.c&&this.s){for(var b=Ql(this),c=[],d=r(Rl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ce(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=Ge(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};X.prototype.getVariantTracks=X.prototype.Nc;
|
|
470
|
+
X.prototype.ob=function(){if(this.c&&this.s){for(var b=Sl(this),c=[],d=r(Tl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=De(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=Ge(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};X.prototype.getTextTracks=X.prototype.ob;
|
|
471
|
+
X.prototype.hd=function(b){if(this.c&&this.f){var c=Kl(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(Ul(this,c,d,!1),Vl(this,d),this.ma=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Ee(d)==b.id?d.mode=this.eb?"showing":"hidden":d.mode="disabled";Wl(this)}};X.prototype.selectTextTrack=X.prototype.hd;
|
|
472
|
+
X.prototype.Mf=function(){Qe("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.ob().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.hd(b[0])};X.prototype.selectEmbeddedTextTrack=X.prototype.Mf;
|
|
473
|
+
X.prototype.gg=function(){Qe("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.ob().filter(function(b){return b.active})[0];return b?"application/cea-608"==b.mimeType:!1};X.prototype.usingEmbeddedTextTrack=X.prototype.gg;
|
|
474
|
+
X.prototype.Of=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=Kl(this);this.b.abr.enabled&&$a("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&He(f)&&(Al(this,e,f,!1),Xl(this,f,c,d),this.Ub=new $h(f),Ll(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
|
|
475
|
+
c.next())d=d.value,Ee(d)==b.id&&(d.enabled=!0);Yl(this)}};X.prototype.selectVariantTrack=X.prototype.Of;X.prototype.Ee=function(){return Zl(this.Nc())};X.prototype.getAudioLanguagesAndRoles=X.prototype.Ee;X.prototype.Xe=function(){return Zl(this.ob())};X.prototype.getTextLanguagesAndRoles=X.prototype.Xe;X.prototype.De=function(){return Array.from($l(this.Nc()))};X.prototype.getAudioLanguages=X.prototype.De;X.prototype.We=function(){return Array.from($l(this.ob()))};X.prototype.getTextLanguages=X.prototype.We;
|
|
476
|
+
X.prototype.Lf=function(b,c){if(this.c&&this.s){var d=Kl(this);this.Ub=new ai(b,c||"",0);Ol(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);Yl(this)}};X.prototype.selectAudioLanguage=X.prototype.Lf;
|
|
477
|
+
X.prototype.Nf=function(b,c){if(this.c&&this.s){var d=Kl(this);this.ma=b;this.cb=c||"";var e=Ke(d.textStreams,this.ma,this.cb)[0]||null;e&&(Ul(this,d,e,!1),(this.b.streaming.alwaysStreamText||this.gc())&&Vl(this,e))}else(d=this.ob().filter(function(c){return c.language==b})[0])&&this.hd(d)};X.prototype.selectTextLanguage=X.prototype.Nf;
|
|
474
478
|
X.prototype.gc=function(){var b=this.eb;return this.c?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};X.prototype.isTextTrackVisible=X.prototype.gc;
|
|
475
|
-
X.prototype.Rf=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return
|
|
476
|
-
e.A(2);break}l=
|
|
477
|
-
X.prototype.Ue=function(){if(!this.V())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};X.prototype.getPresentationStartTimeAsDate=X.prototype.Ue;X.prototype.
|
|
478
|
-
X.prototype.getStats=function(){if(this.h!=
|
|
479
|
-
NaN,c.m=b.video.width||NaN,c.g=d);b=this.l.getBandwidthEstimate();this.v.f=b}var e=this.v;b=e.m;c=e.g;d=e.l;var f=e.h,g=e.i,h=e.f,k=e.b,l=
|
|
480
|
-
bufferingTime:n,stateHistory:q,switchHistory:
|
|
481
|
-
X.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,x,
|
|
482
|
-
findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Wb.add(E);m.textStreams.push(E);return u(l,
|
|
483
|
-
X.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.
|
|
484
|
-
X.prototype.Le=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Le;function
|
|
485
|
-
function
|
|
486
|
-
function
|
|
479
|
+
X.prototype.Rf=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:f=c.eb;g=b;if(f==g)return e["return"]();c.eb=g;if(c.h!=Hl){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),w=n.next();!w.done;w=n.next())k=w.value,"disabled"!=k.mode&&(k.mode=b?"showing":"hidden")}e.A(2);break}c.D.g.setTextVisibility(b);if(c.b.streaming.alwaysStreamText){e.A(2);break}if(!b){n=c.f;n.D=!0;if(w=n.b.get("text"))Qi(w),n.b["delete"]("text");
|
|
480
|
+
e.A(2);break}l=Kl(c);m=Ke(l.textStreams,c.ma,c.cb);if(!(0<m.length)){e.A(2);break}return u(e,Wi(c.f,m[0]),2);case 2:am(c),v(e)}})})};X.prototype.setTextTrackVisibility=X.prototype.Rf;X.prototype.Se=function(){if(!this.V())return null;if(this.c)return new Date(1E3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};X.prototype.getPlayheadTimeAsDate=X.prototype.Se;
|
|
481
|
+
X.prototype.Ue=function(){if(!this.V())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};X.prototype.getPresentationStartTimeAsDate=X.prototype.Ue;X.prototype.Jc=function(){var b={total:[],audio:[],video:[],text:[]};this.h==Ml&&(b.total=yd(this.a.buffered));this.h==Hl&&this.D.Jc(b);return b};X.prototype.getBufferedInfo=X.prototype.Jc;
|
|
482
|
+
X.prototype.getStats=function(){if(this.h!=Hl&&this.h!=Ml)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};xl(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.v,d=Number(b.totalVideoFrames);c.i=Number(b.droppedVideoFrames);c.h=d}if(this.h==Hl){if(b=Ql(this))this.v.l=b.bandwidth;b&&b.video&&(c=this.v,d=b.video.height||
|
|
483
|
+
NaN,c.m=b.video.width||NaN,c.g=d);b=this.l.getBandwidthEstimate();this.v.f=b}var e=this.v;b=e.m;c=e.g;d=e.l;var f=e.h,g=e.i,h=e.f,k=e.b,l=Tk(e.a,"playing"),m=Tk(e.a,"paused"),n=Tk(e.a,"buffering"),q=Uk(e.a),w=[];e=r(e.c.a);for(var x=e.next();!x.done;x=e.next())x=x.value,w.push({timestamp:x.timestamp,id:x.id,type:x.type,fromAdaptation:x.fromAdaptation,bandwidth:x.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,pauseTime:m,
|
|
484
|
+
bufferingTime:n,stateHistory:q,switchHistory:w}};X.prototype.getStats=X.prototype.getStats;
|
|
485
|
+
X.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,w,x,B,C,E,F;return z(l,function(l){switch(l.j){case 1:if(h.h==Ml)throw Error("State error!");if(h.h!=Hl)throw Error("State error!");m=Kl(h);n=Cd;q=h.c.periods.indexOf(m);w=q+1;x=w>=h.c.periods.length?h.c.presentationTimeline.Y():h.c.periods[w].startTime;B=x-m.startTime;if(Infinity==B)throw new G(1,4,4033);C=new S(1,0,B,function(){return[b]},0,null);E={id:h.Hd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),
|
|
486
|
+
findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Wb.add(E);m.textStreams.push(E);return u(l,Wi(h.f,E),2);case 2:return(F=Ui(h.f,"text"))&&Th(h.$,m,F),h.Wb["delete"](E),Ol(h,m),Jl(h),l["return"](De(E))}})})};
|
|
487
|
+
X.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.kd=function(b,c){this.Xb.width=b;this.Xb.height=c};X.prototype.setMaxHardwareResolution=X.prototype.kd;X.prototype.gd=function(){if(this.h==Hl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Ib&&(d.Ib=!1,Zi(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.gd;X.prototype.Ke=function(){return this.c};X.prototype.getManifest=X.prototype.Ke;
|
|
488
|
+
X.prototype.Le=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Le;function Al(b,c,d,e){Uh(b.$,c).variant=d;b=b.v.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Ul(b,c,d,e){Th(b.$,c,d);b=b.v.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))}
|
|
489
|
+
function Yk(b){var c=Ok();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.V()&&d.includes(c.code)&&(c.severity=1,b.gd())};c.textDisplayFactory=function(){return new Ik(b.a)};return c}
|
|
490
|
+
function yl(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Hd++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
|
|
487
491
|
codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=r(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}
|
|
488
|
-
function
|
|
489
|
-
p.Fc=function(b){var c=this.f?
|
|
490
|
-
function
|
|
491
|
-
function
|
|
492
|
-
function
|
|
493
|
-
p.df=function(b){try{this.ib=!0;this.l.disable();
|
|
494
|
-
n=M(k.language),q=M(b.language);l=
|
|
495
|
-
p.jf=function(){this.m&&this.m.update&&this.m.update()};p.qf=function(){this.
|
|
496
|
-
function
|
|
497
|
-
function
|
|
498
|
-
function
|
|
499
|
-
function
|
|
500
|
-
restrictedKeyStatuses:k});}function
|
|
501
|
-
function
|
|
502
|
-
function
|
|
503
|
-
function
|
|
504
|
-
function
|
|
505
|
-
function
|
|
506
|
-
function
|
|
507
|
-
function
|
|
508
|
-
function
|
|
509
|
-
function
|
|
510
|
-
Z.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=
|
|
511
|
-
e&&
|
|
512
|
-
Z.prototype.store=function(b,c,d){var e=this;return
|
|
492
|
+
function tl(b,c){var d=b.f?Ti(b.f):null,e=b.f?Vi(b.f):null;c.forEach(Ae.bind(null,b.g,d,e));d=Mb(c,function(b){return b.variants.some(He)});if(0==d)throw new G(2,4,4032);if(d<c.length)throw new G(2,4,4011);c.forEach(function(b){ze(b.variants,this.b.restrictions,this.Xb)&&this.f&&Kl(this)==b&&Jl(this);bm(this,b.variants)}.bind(b))}p=X.prototype;
|
|
493
|
+
p.Fc=function(b){var c=this.f?Ti(this.f):null,d=this.f?Vi(this.f):null;Ae(this.g,c,d,b);c=b.variants;if(!c.some(He))throw new G(2,4,4011);bm(this,b.variants);ze(c,this.b.restrictions,this.Xb)&&this.f&&Kl(this)==b&&Jl(this);if(b=this.g?this.g.a:null)for(c=r(c),d=c.next();!d.done;d=c.next()){d=r(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=r(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,bd(this.g,f.initDataType,f.initData)}}};
|
|
494
|
+
function Xl(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.ib?(b.Ea=c,b.Dd=d,b.Bd=e):(bj(b.f,c,d,e),Yl(b))}function Vl(b,c){b.ib?b.na=c:(aj(b.f,c,!0,0,!1),Wl(b))}function Il(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Ti(b.f),f=Vi(b.f),g=Kl(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
|
|
495
|
+
function rl(b){var c=b.Oc();if(b.v&&b.P&&b.s){var d=b.W;d.f=c;ti(d);xl(b)}b.dispatchEvent(new J("buffering",{buffering:c}))}function xl(b){if(b.v&&b.P){var c=b.v.a;b.P.a==fi?Sk(c,"buffering"):b.a.paused?Sk(c,"paused"):b.a.ended?Sk(c,"ended"):Sk(c,"playing")}}function Ll(b,c){try{bm(b,c)}catch(e){return b.Ka(e),null}var d=c.filter(function(b){return He(b)});d=b.Ub.create(d);b.l.setVariants(Array.from(d.values()));return b.l.chooseVariant()}
|
|
496
|
+
function Ol(b,c){var d=Ll(b,c.variants);d&&(Al(b,c,d,!0),Xl(b,d,!0));(d=Ke(c.textStreams,b.ma,b.cb)[0]||null)&&(b.b.streaming.alwaysStreamText||b.gc())&&(Ul(b,c,d,!0),Vl(b,d));Bl(b)}
|
|
497
|
+
p.df=function(b){try{this.ib=!0;this.l.disable();Pl(this);var c=Ll(this,b.variants),d=Ke(b.textStreams,this.ma,this.cb)[0]||null;this.Ea&&(b.variants.includes(this.Ea)&&(c=this.Ea),this.Ea=null);this.na&&(b.textStreams.includes(this.na)&&(d=this.na),this.na=null);c&&Al(this,b,c,!0);d&&Ul(this,b,d,!0);var e=this.f,f=e.b.get("video");if(f)var g=e.c.periods[f.pa];else{var h=e.b.get("audio");g=h?e.c.periods[h.pa]:null}var k=c?c.audio:null;if(!g&&d){var l;if(l=k){b=d;var m=M(this.b.preferredTextLanguage),
|
|
498
|
+
n=M(k.language),q=M(b.language);l=te(q,m)&&!te(n,q)}l&&(this.eb=!0);this.eb&&this.D.g.setTextVisibility(!0);am(this)}return this.b.streaming.alwaysStreamText||this.gc()?{variant:c,text:d}:{variant:c,text:null}}catch(w){return this.Ka(w),{variant:null,text:null}}};p.te=function(){this.ib=!1;this.b.abr.enabled&&(this.l.enable(),Pl(this));this.Ea&&(bj(this.f,this.Ea,this.Dd,this.Bd),Yl(this),this.Ea=null);this.na&&(aj(this.f,this.na,!0,0,!1),Wl(this),this.na=null)};
|
|
499
|
+
p.jf=function(){this.m&&this.m.update&&this.m.update()};p.qf=function(){this.s&&this.s.s()};function Bl(b){cm(b,new J("adaptation"))}function Jl(b){cm(b,new J("trackschanged"))}function Yl(b){cm(b,new J("variantchanged"))}function Wl(b){cm(b,new J("textchanged"))}function am(b){cm(b,new J("texttrackvisibility"))}function Pl(b){cm(b,new J("abrstatuschanged",{rg:b.b.abr.enabled}))}p.Ka=function(b){if(this.h!=jl){var c=new J("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};
|
|
500
|
+
function sl(b,c,d){b.dispatchEvent(new J(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function ql(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new G(2,3,3016,c,d,b.a.error.message)}
|
|
501
|
+
function vl(b,c){if(b.f){var d=Kl(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){Ne(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!ll.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Ti(b.f);var h=Vi(b.f);(f=Me(f,h,d.variants))&&!f.allowedByKeySystem&&Ol(b,d);e&&(Jl(b),Ll(b,d.variants))}}
|
|
502
|
+
function wl(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new J("expirationupdated"))}function zl(b,c,d){0<c&&(b.V()||b.de(c));d<b.Y()&&(b.V()||b.wa(d))}
|
|
503
|
+
function bm(b,c){var d=b.g?nc(b.g.T):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=r(c),m=l.next();!m.done;m=l.next()){m=m.value;var n=[];m.audio&&n.push(m.audio);m.video&&n.push(m.video);n=r(n);for(var q=n.next();!q.done;q=n.next())if(q=q.value,q.keyId){var w=d[e?"00":q.keyId];w?ll.includes(w)&&(k.includes(w)||k.push(w)):h.includes(q.keyId)||h.push(q.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new G(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
|
|
504
|
+
restrictedKeyStatuses:k});}function cm(b,c){t(function e(){return z(e,function(e){switch(e.j){case 1:return u(e,Promise.resolve(),2);case 2:b.h!=jl&&b.dispatchEvent(c),v(e)}})})}function $l(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(M(d.language)):c.add("und");return c}
|
|
505
|
+
function Zl(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=M(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
|
|
506
|
+
function Rl(b){b=Kl(b);return null==b?[]:b.variants.filter(function(b){return He(b)})}function Tl(b){var c=Kl(b);return null==c?[]:c.textStreams.filter(function(c){return!b.Wb.has(c)})}function Kl(b){var c=b.s.h(),d=null;b=r(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Ql(b){var c=Kl(b);return Uh(b.$,c).variant}
|
|
507
|
+
function Sl(b){var c=Kl(b);if(null==c)return null;if(!Uh(b.$,c).text){var d=Ke(c.textStreams,b.ma,b.cb);d.length&&Th(b.$,c,d[0])}return Uh(b.$,c).text}function nl(){return new G(2,7,7E3)}function il(b,c,d,e,f,g){return e==b&&f.u==g.u&&f.uri==g.uri&&f.mimeType==g.mimeType&&f.ya==g.ya?c:d}function Dk(){return{ya:null,u:null,mimeType:null,startTime:null,od:null,uri:null}}
|
|
508
|
+
function ol(b){return new Promise(function(c,d){b.Wa=function(){return d(nl())};b.jc=function(){return c()};b.onError=function(b){return d(b)};b.lc=function(){return d(nl())}})}var jl=0,Xk=1,Hl=2,Ml=3;X.LoadMode={DESTROYED:jl,NOT_LOADED:Xk,MEDIA_SOURCE:Hl,SRC_EQUALS:Ml};function dm(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.Y();c=em(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function fm(b,c){var d=sk(new qk(b.ua(),b.aa()),c.periods[0],new W(null,0)),e=c.appMetadata||{};d=em(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
|
|
509
|
+
function em(b){var c=[],d=Ie(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(Ce(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(De(d.value));return c};function gm(){this.a={}}function hm(b,c,d){d=d.endTime-d.startTime;return im(b,c)*d}function im(b,c){var d=b.a[c];null==d&&(d=0);return d};function jm(b){this.a=!1;this.b=new H;this.c=b}jm.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function km(b,c){for(var d={width:Infinity,height:Infinity},e=r(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return ye(b,c,d)})}function lm(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ge(b.audio));b.video&&(c=c&&ge(b.video));return c})}
|
|
510
|
+
function mm(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return pd(c,b)})}function nm(b){var c=new om;b.periods.forEach(function(b,d){var e=pm(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else qm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return rm(c,new sm(b))})}
|
|
511
|
+
function tm(b,c){var d=new om;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return rm(d,new sm(b))}));c(b);d=pm(b.variants)})}function sm(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function om(){this.a=[]}om.prototype.add=function(b){rm(this,b)||this.a.push(b)};function qm(b,c){b.a=b.a.filter(function(b){return rm(c,b)})}
|
|
512
|
+
function rm(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function pm(b){var c=new om;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new sm(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=X)throw new G(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Fb()):(this.a=Ok(),this.b=new K);this.f=!1;this.c=[];this.g=[];var d=!b;this.h=new jm(function(){return t(function f(){var b;return z(f,function(f){switch(f.j){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.A(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,v(f)}})})})}A("shaka.offline.Storage",Z);
|
|
513
|
+
function um(){if(sc())a:{var b=r(Qj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}Z.support=um;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;
|
|
514
|
+
Z.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Mk(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);
|
|
515
|
+
e&&Qe("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return Qk(this.a,b)};Z.prototype.configure=Z.prototype.configure;Z.prototype.getConfiguration=function(){var b=Ok();Qk(b,this.a,Ok());return b};Z.prototype.getConfiguration=Z.prototype.getConfiguration;Z.prototype.Fb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.Fb;
|
|
516
|
+
Z.prototype.store=function(b,c,d){var e=this;return vm(this,wm(this,b,c||{},function(){return t(function g(){var c,k;return z(g,function(g){switch(g.j){case 1:return d&&"string"!=typeof d?(Qe("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,U.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.o,g["return"](k)}})})}))};Z.prototype.store=Z.prototype.store;Z.prototype.Ve=function(){return this.f};
|
|
513
517
|
Z.prototype.getStoreInProgress=Z.prototype.Ve;
|
|
514
|
-
function
|
|
515
|
-
g.
|
|
516
|
-
function
|
|
517
|
-
|
|
518
|
-
function
|
|
519
|
-
function
|
|
520
|
-
function
|
|
521
|
-
function
|
|
522
|
-
u(k,b.qc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return
|
|
523
|
-
function
|
|
524
|
-
function
|
|
525
|
-
if(g)throw g;return f["return"](m);case 3:return
|
|
526
|
-
function
|
|
527
|
-
function
|
|
518
|
+
function wm(b,c,d,e){return t(function g(){var h,k,l,m,n,q,w,x,B,C;return z(g,function(g){switch(g.j){case 1:xm();if(b.f)return g["return"](Promise.reject(new G(2,9,9006)));b.f=!0;return u(g,ym(b,c,e),2);case 2:h=g.o;zm(b);k=!h.presentationTimeline.V()&&!h.presentationTimeline.Va();if(!k)throw new G(2,9,9005,c);l=null;m=new Pj;q=n=null;y(g,3,4);return u(g,Am(b,h,function(b){q=q||b}),6);case 6:l=g.o;zm(b);if(q)throw q;Bm(b,h,l);return u(g,m.init(),7);case 7:return zm(b),u(g,Rj(m),8);case 8:return n=
|
|
519
|
+
g.o,zm(b),u(g,Cm(b,n.aa,l,h,c,d),9);case 9:w=g.o;zm(b);if(q)throw q;return u(g,n.aa.addManifests([w]),10);case 10:return x=g.o,zm(b),B=new ok("manifest",n.path.ua,n.path.aa,x[0]),g["return"](fm(B,w));case 4:return Da(g),b.f=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.A(12);break}return u(g,l.destroy(),12);case 12:Ea(g,0);break;case 3:C=Ca(g);if(!n){g.A(14);break}return u(g,n.aa.removeSegments(b.c,function(){}),14);case 14:throw q||C;}})})}
|
|
520
|
+
function Bm(b,c,d){km(c,b.a.restrictions);lm(c);mm(c,d);nm(c);tm(c,function(c){for(var d=[],e=r(c.variants),h=e.next();!h.done;h=e.next())d.push(Ce(h.value));e=r(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(De(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
|
|
521
|
+
Dm(c)}function Cm(b,c,d,e,f,g){return t(function k(){var l,m,n,q;return z(k,function(k){switch(k.j){case 1:return l=dm(f,e,g),m=new Ej(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),ya(k,2),q=n=Em(b,m,c,d,e,f,g),u(k,Hj(m),4);case 4:return q.size=k.o,k["return"](n);case 2:return Da(k),u(k,m.destroy(),5);case 5:Ea(k,0)}})})}Z.prototype.remove=function(b){return vm(this,Fm(this,b))};Z.prototype.remove=Z.prototype.remove;
|
|
522
|
+
function Fm(b,c){return t(function e(){var f,g,h,k,l,m;return z(e,function(e){switch(e.j){case 1:xm();f=pk(c);if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new G(2,9,9004,c)));g=f;h=new Pj;ya(e,2);return u(e,h.init(),4);case 4:return u(e,Tj(h,g.ua(),g.aa()),5);case 5:return k=e.o,u(e,k.getManifests([g.key()]),6);case 6:return l=e.o,m=l[0],u(e,Promise.all([Gm(b,m,h),Hm(b,k,g,m)]),2);case 2:return Da(e),u(e,h.destroy(),8);case 8:Ea(e,0)}})})}
|
|
523
|
+
function Im(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:oc(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:oc(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Gm(b,c,d){return t(function f(){return z(f,function(f){switch(f.j){case 1:return u(f,Jm(b.b,b.a.drm,d,c),0)}})})}
|
|
524
|
+
function Hm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Km(e),h=g.length+1,k=0,l=fm(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.Ff=function(){return vm(this,Lm(this))};Z.prototype.removeEmeSessions=Z.prototype.Ff;
|
|
525
|
+
function Lm(b){return t(function d(){var e,f,g,h,k,l,m,n,q;return z(d,function(d){switch(d.j){case 1:return xm(),e=b.b,f=b.a.drm,g=new Pj,h=!1,ya(d,2),u(d,g.init(),4);case 4:k=[];Uj(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(q=n.next();!q.done;m={qc:m.qc},q=n.next())m.qc=q.value,l=l.then(function(b){return function(){return t(function C(){var d,g;return z(C,function(k){switch(k.j){case 1:return u(k,b.qc.getAll(),2);case 2:return d=k.o,u(k,zk(f,e,d),3);case 3:return g=k.o,
|
|
526
|
+
u(k,b.qc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return Da(d),u(d,g.destroy(),6);case 6:Ea(d,3);break;case 3:return d["return"](!h)}})})}Z.prototype.list=function(){return vm(this,Mm())};Z.prototype.list=Z.prototype.list;
|
|
527
|
+
function Mm(){return t(function c(){var d,e,f;return z(c,function(c){switch(c.j){case 1:return xm(),d=[],e=new Pj,ya(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),Sj(e,function(c,e){f=f.then(function(){return t(function m(){var f;return z(m,function(g){switch(g.j){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.o,f.forEach(function(e,f){var g=fm(new ok("manifest",c.ua,c.aa,f),e);d.push(g)}),v(g)}})})})}),u(c,f,2);case 2:return Da(c),u(c,e.destroy(),6);case 6:Ea(c,3);break;case 3:return c["return"](d)}})})}
|
|
528
|
+
function ym(b,c,d){return t(function f(){var g,h,k,l,m,n;return z(f,function(f){switch(f.j){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.o,l.configure(b.a.manifest),zm(b),ya(f,3),u(f,l.start(c,k),5);case 5:return m=f.o,zm(b),n=Nm(m),u(f,Promise.all(Array.from(n).map(function(b){return b.createSegmentIndex()})),6);case 6:zm(b);
|
|
529
|
+
if(g)throw g;return f["return"](m);case 3:return Da(f),u(f,l.stop(),7);case 7:Ea(f,0)}})})}function Am(b,c,d){return t(function f(){var g,h,k;return z(f,function(f){switch(f.j){case 1:return g=new Lc({rb:b.b,onError:d,kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=oi(c.periods),k=b.a,g.configure(k.drm),u(f,Qc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,$c(g),3);case 3:return u(f,ad(g),4);case 4:return f["return"](g)}})})}
|
|
530
|
+
function Em(b,c,d,e,f,g,h){var k=new gm,l=f.periods.map(function(e){return Om(b,c,d,k,f,e)}),m=e.a,n=gd(e);if(m&&b.a.offline.usePersistentLicense){if(!n.length)throw new G(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.Y(),size:0,expiration:e.dc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?n:[],drmInfo:m,appMetadata:h}}
|
|
531
|
+
function Om(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Nm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Pm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
|
|
528
532
|
k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
|
|
529
|
-
function
|
|
530
|
-
l,
|
|
531
|
-
function
|
|
532
|
-
function
|
|
533
|
-
function
|
|
534
|
-
0)}})})}function
|
|
535
|
-
function
|
|
536
|
-
|
|
537
|
-
"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",
|
|
538
|
-
function
|
|
539
|
-
function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",
|
|
540
|
-
function
|
|
541
|
-
function
|
|
542
|
-
|
|
543
|
-
function
|
|
533
|
+
function Pm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Hb();var k=g.id;Qm(g,f,function(f){var l=Ag(f.c(),f.b,f.a,b.a.streaming.retryParameters);Fj(c,k,
|
|
534
|
+
l,hm(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=Ag(f.c(),f.b,f.a,b.a.streaming.retryParameters),Fj(c,k,f,.5*im(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}
|
|
535
|
+
function Qm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function zm(b){if(b.h.a)throw new G(2,9,7001);}function xm(){if(!um())throw new G(2,9,9E3);}function vm(b,c){return t(function e(){return z(e,function(e){switch(e.j){case 1:return b.g.push(c),ya(e,2),u(e,c,4);case 4:return e["return"](e.o);case 2:Da(e),Lb(b.g,c),Ea(e,0)}})})}
|
|
536
|
+
function Km(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return z(c,function(c){switch(c.j){case 1:return d=new Pj,ya(c,2),u(c,d.erase(),2);case 2:return Da(c),u(c,d.destroy(),5);case 5:Ea(c,0)}})})};
|
|
537
|
+
function Jm(b,c,d,e){return t(function g(){var h,k,l;return z(g,function(g){switch(g.j){case 1:if(!e.drmInfo)return g["return"]();h=Vj(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Im(e,!1),videoCapabilities:Im(e,!0)}});return u(g,zk(c,b,k),2);case 2:return l=g.o,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
|
|
538
|
+
0)}})})}function Nm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Dm(b){if(0==b.periods.length)throw new G(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Rm(c.value)}
|
|
539
|
+
function Rm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}ml.offline=um;A("shaka.polyfill.installAll",function(){for(var b=0;b<Sm.length;++b)Sm[b].re()});var Sm=[];function Tm(b,c){c=c||0;for(var d={priority:c,re:b},e=0;e<Sm.length;e++)if(Sm[e].priority<c){Sm.splice(e,0,d);return}Sm.push(d)}A("shaka.polyfill.register",Tm);function Um(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
|
|
540
|
+
Tm(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
|
|
541
|
+
"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Um);document.addEventListener("webkitfullscreenerror",Um);document.addEventListener("mozfullscreenchange",Um);document.addEventListener("mozfullscreenerror",Um);document.addEventListener("MSFullscreenChange",Um);document.addEventListener("MSFullscreenError",Um)}});Tm(function(){xc("CrKey")&&delete window.indexedDB});function Vm(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,b,c,d)}Tm(function(){xc("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Vm)});Tm(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});Tm(function(){});function Wm(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function Xm(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
|
|
542
|
+
function Ym(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.Ed=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].xd=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
|
|
543
|
+
function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",Zm,!1);c||(this.addEventListener("sourceclose",$m,!1),c=!0);return e}}function Zm(b){var c=b.target,d=c.mediaSource_;if(d.Ed){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.xd=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].xd)return;d.Ed=!1}}
|
|
544
|
+
function $m(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",Zm,!1);b.removeEventListener("sourceclose",$m,!1)}function an(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:b(c)}}function bn(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=rc(c)[0]&&b(c)}}
|
|
545
|
+
function cn(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,n=!1;d=e.split(",").filter(function(b){c.test(b)&&(n=!0);/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});n&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var q in g)f+="; "+q+'="'+g[q]+'"';return cast.__platform__.canDisplayType(f)}}
|
|
546
|
+
Tm(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)cn();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;an();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))Wm();else if(b.includes("Version/10"))Wm(),Ym();else if(b.includes("Version/11")||b.includes("Version/12"))Wm(),Xm()}else xc("Tizen")&&bn()});function dn(b,c){try{var d=new en(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
|
|
547
|
+
function en(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
|
|
544
548
|
WebKitMediaKeys.isTypeSupported(this.keySystem,m)&&(e.audioCapabilities.push(l),h=!0)}if(f.videoCapabilities)for(f=r(f.videoCapabilities),l=f.next();!l.done;l=f.next())k=l.value,k.contentType&&(g=!0,l=k.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(e.videoCapabilities.push(k),h=!0));g||(h=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));e=h?e:null}if(e){this.a=e;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;
|
|
545
|
-
throw d;}
|
|
546
|
-
|
|
547
|
-
function
|
|
548
|
-
p.generateRequest=function(b,c){this.a=new
|
|
549
|
-
p.close=function(){try{this.
|
|
550
|
-
function
|
|
551
|
-
function
|
|
552
|
-
|
|
553
|
-
function
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
function
|
|
559
|
-
p.
|
|
560
|
-
|
|
561
|
-
function
|
|
562
|
-
p.
|
|
563
|
-
|
|
564
|
-
function
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
function Dn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
|
|
549
|
+
throw d;}en.prototype.createMediaKeys=function(){var b=new fn(this.keySystem);return Promise.resolve(b)};en.prototype.getConfiguration=function(){return this.a};function gn(b){var c=this.mediaKeys;c&&c!=b&&hn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?hn(b,this):Promise.resolve()}function fn(b){this.b=new WebKitMediaKeys(b);this.a=new L}
|
|
550
|
+
fn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new jn(this.b,b)};fn.prototype.setServerCertificate=function(b){b&&new Uint8Array(b);return Promise.resolve(!0)};
|
|
551
|
+
function hn(b,c){b.a.Ya();if(!c)return Promise.resolve();b.a.w(c,"webkitneedkey",kn);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.da(c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function jn(b){Ib.call(this);this.b=null;this.g=b;this.c=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new H;this.keyStatuses=new ln}Ua(jn,Ib);p=jn.prototype;
|
|
552
|
+
p.generateRequest=function(b,c){this.a=new H;try{this.b=this.g.createSession("video/mp4",new Uint8Array(c)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.Wf.bind(this)),this.f.w(this.b,"webkitkeyadded",this.Uf.bind(this)),this.f.w(this.b,"webkitkeyerror",this.Vf.bind(this)),mn(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.c=new H;try{this.b.update(new Uint8Array(b))}catch(c){this.c.reject(c)}return this.c};
|
|
553
|
+
p.close=function(){try{this.b.close(),this.closed.resolve(),this.f.Ya()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function kn(b){var c=new Event("encrypted");c.initDataType="cenc";c.initData=b.initData;this.dispatchEvent(c)}
|
|
554
|
+
p.Wf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new J("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.Uf=function(){this.c&&(mn(this,"usable"),this.c.resolve(),this.c=null)};
|
|
555
|
+
p.Vf=function(){var b=Error("EME PatchedMediaKeysApple key error");b.errorCode=this.b.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.c)this.c.reject(b),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:mn(this,"output-not-allowed");break;default:mn(this,"internal-error")}};function mn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new J("keystatuseschange"))}
|
|
556
|
+
function ln(){this.size=0;this.a=void 0}var nn;p=ln.prototype;p.forEach=function(b){this.a&&b(this.a,nn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=nn;return this.a&&Jc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
|
|
557
|
+
Tm(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(nn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=gn,window.MediaKeys=fn,window.MediaKeySystemAccess=en,navigator.requestMediaKeySystemAccess=dn)});function on(b,c){try{var d=new pn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
|
|
558
|
+
function pn(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
|
|
559
|
+
0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}pn.prototype.createMediaKeys=function(){var b=new qn(this.keySystem);return Promise.resolve(b)};
|
|
560
|
+
pn.prototype.getConfiguration=function(){return this.a};function rn(b){var c=this.mediaKeys;c&&c!=b&&sn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?sn(b,this):Promise.resolve()}function qn(b){this.a=new MSMediaKeys(b);this.b=new L}qn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new tn(this.a,b)};qn.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
|
|
561
|
+
function sn(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}b.b.Ya();if(!c)return Promise.resolve();b.b.w(c,"msneedkey",un);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function tn(b){Ib.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new H;this.keyStatuses=new vn}Ua(tn,Ib);p=tn.prototype;
|
|
562
|
+
p.generateRequest=function(b,c){this.a=new H;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),this.f.w(this.c,"mskeymessage",this.nf.bind(this)),this.f.w(this.c,"mskeyadded",this.lf.bind(this)),this.f.w(this.c,"mskeyerror",this.mf.bind(this)),wn(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.b=new H;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
|
|
563
|
+
p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.Ya()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function un(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=xn(b.initData);this.dispatchEvent(c)}}
|
|
564
|
+
function xn(b){if(!b)return b;var c=new Lf(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=r(d);for(d=e.next();!d.done;c={fc:c.fc},d=e.next())c.fc=d.value,b.some(function(b){return function(c){return Jc(c,b.fc)}}(c))||b.push(c.fc);c=0;e=r(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=r(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
|
|
565
|
+
p.nf=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new J("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.lf=function(){this.a?(wn(this,"usable"),this.a.resolve(),this.a=null):this.b&&(wn(this,"usable"),this.b.resolve(),this.b=null)};
|
|
566
|
+
p.mf=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:wn(this,"output-not-allowed");break;default:wn(this,"internal-error")}};function wn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new J("keystatuseschange"))}
|
|
567
|
+
function vn(){this.size=0;this.a=void 0}var yn;p=vn.prototype;p.forEach=function(b){this.a&&b(this.a,yn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=yn;return this.a&&Jc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
|
|
568
|
+
Tm(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(yn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rn,window.MediaKeys=qn,window.MediaKeySystemAccess=pn,navigator.requestMediaKeySystemAccess=on)});function zn(){return Promise.reject(Error("The key system specified is not supported."))}function An(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Bn(){throw new TypeError("Illegal constructor.");}Bn.prototype.createSession=function(){};Bn.prototype.setServerCertificate=function(){};function Cn(){throw new TypeError("Illegal constructor.");}Cn.prototype.getConfiguration=function(){};Cn.prototype.createMediaKeys=function(){};
|
|
569
|
+
Tm(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=zn,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=An,window.MediaKeys=Bn,window.MediaKeySystemAccess=Cn)},-10);var Dn="";function En(b){var c=Dn;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function Fn(b,c){try{var d=new Gn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Hn(b){var c=this.mediaKeys;c&&c!=b&&In(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&In(b,this);return Promise.resolve()}
|
|
570
|
+
function Gn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
|
|
568
571
|
h.audioCapabilities[m];if(n.contentType){l=!0;var q=n.contentType.split(";")[0];f.canPlayType(q,this.a)&&(k.audioCapabilities.push(n),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)n=h.videoCapabilities[m],n.contentType&&(l=!0,f.canPlayType(n.contentType,this.a)&&(k.videoCapabilities.push(n),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
|
|
569
|
-
e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}
|
|
570
|
-
function
|
|
571
|
-
p.setServerCertificate=function(){return Promise.resolve(!1)};p.tf=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.Zf=function(b){var c=
|
|
572
|
-
p.Xf=function(b){if(b=
|
|
573
|
-
p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?
|
|
574
|
-
function
|
|
575
|
-
(new
|
|
576
|
-
p.
|
|
577
|
-
function
|
|
578
|
-
p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=
|
|
579
|
-
p.has=function(b){var c=
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
function
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new
|
|
586
|
-
var F,V;if(F=
|
|
587
|
-
for(g=0;g<f.length;g++)(q=
|
|
588
|
-
var
|
|
589
|
-
function
|
|
590
|
-
function
|
|
591
|
-
e,"#");
|
|
592
|
-
function
|
|
593
|
-
d,f,"fontFamily"))b.fontFamily=g;(g=
|
|
594
|
-
|
|
595
|
-
function
|
|
596
|
-
b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Lb(b.textDecoration,"overline")}}function
|
|
597
|
-
function
|
|
598
|
-
function
|
|
599
|
-
function
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
new
|
|
603
|
-
"up");
|
|
604
|
-
function
|
|
605
|
-
c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=
|
|
606
|
-
function
|
|
607
|
-
|
|
608
|
-
(k.duration=b.F());d&512&&(k.sampleSize=b.F());d&1024&&b.L(4);d&2048&&(k.
|
|
609
|
-
k<b.sampleSize)});return h.filter(
|
|
572
|
+
e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}Gn.prototype.createMediaKeys=function(){var b=new Jn(this.a);return Promise.resolve(b)};Gn.prototype.getConfiguration=function(){return this.b};function Jn(b){this.g=b;this.b=null;this.a=new L;this.c=[];this.f={}}
|
|
573
|
+
function In(b,c){b.b=c;b.a.Ya();var d=Dn;c&&(b.a.w(c,d+"needkey",b.tf.bind(b)),b.a.w(c,d+"keymessage",b.Zf.bind(b)),b.a.w(c,d+"keyadded",b.Xf.bind(b)),b.a.w(c,d+"keyerror",b.Yf.bind(b)))}p=Jn.prototype;p.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Kn(c,this.g,b);this.c.push(b);return b};
|
|
574
|
+
p.setServerCertificate=function(){return Promise.resolve(!1)};p.tf=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.Zf=function(b){var c=Ln(this,b.sessionId);c&&(b=new J("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
|
|
575
|
+
p.Xf=function(b){if(b=Ln(this,b.sessionId))Mn(b,"usable"),b.a&&b.a.resolve(),b.a=null};p.Yf=function(b){var c=Ln(this,b.sessionId);c&&c.handleError(b)};function Ln(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Kn(b,c,d){Ib.call(this);this.f=b;this.h=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new H;this.keyStatuses=new Nn}Ua(Kn,Ib);p=Kn.prototype;
|
|
576
|
+
p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Mn(this,"output-restricted"):1==c?Mn(this,"expired"):Mn(this,"internal-error"))};
|
|
577
|
+
function On(b,c,d){if(b.h)return Promise.reject(Error("The session is already initialized."));b.h=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(Dc("LOAD_SESSION|"+d));else{var f=Dc("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new H;var h=En("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
|
|
578
|
+
(new D(function(){try{b.f[h](b.c,e)}catch(l){b.b.reject(l),b.b=null}})).O(.01)}return b.b}
|
|
579
|
+
p.nd=function(b,c){if(this.a)this.a.then(this.nd.bind(this,b,c))["catch"](this.nd.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=Ac(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Gc(e.keys[0].k);e=Gc(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=En("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
|
|
580
|
+
function Mn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new J("keystatuseschange"))}p.generateRequest=function(b,c){return On(this,c,null)};p.load=function(b){return"persistent-license"==this.g?On(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new H;this.nd(c,b);return c};
|
|
581
|
+
p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=En("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Nn(){this.size=0;this.a=void 0}var Pn;p=Nn.prototype;p.forEach=function(b){this.a&&b(this.a,Pn)};p.get=function(b){if(this.has(b))return this.a};
|
|
582
|
+
p.has=function(b){var c=Pn;return this.a&&Jc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
|
|
583
|
+
Tm(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Dn="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Pn=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Fn;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Hn;window.MediaKeys=Jn;window.MediaKeySystemAccess=
|
|
584
|
+
Gn}});function Qn(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
|
|
585
|
+
function Rn(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Sn(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
|
|
586
|
+
Tm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=Rn,document.exitPictureInPicture=Sn,document.addEventListener("webkitpresentationmodechanged",Qn,!0))}});Tm(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function Tn(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Tm(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=Tn)}});function Un(b,c,d){return new window.TextTrackCue(b,c,d)}function Vn(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}Tm(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Un;else if(6==b)window.VTTCue=Vn;else{try{var c=!!Un(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Un)}}});function Wn(){}Wn.prototype.parseInit=function(){};
|
|
587
|
+
Wn.prototype.parseMedia=function(b,c){var d=Ac(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(Y){throw new G(2,2,2005);}if(g){if(g=g.getElementsByTagName("tt")[0]){var h=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var m=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","tickRate");
|
|
588
|
+
d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new G(2,2,2005);if("default"!=d&&"preserve"!=d)throw new G(2,2,2005);d="default"==d;h=new Xn(h,k,l,m);k=Yn(g.getElementsByTagName("metadata")[0]);l=Yn(g.getElementsByTagName("styling")[0]);m=Yn(g.getElementsByTagName("layout")[0]);for(var n=[],q=0;q<m.length;q++){var w=m[q],x=l,B=f;var C=new Kd;var E=w.getAttribute("xml:id");if(E){C.id=E;E=null;B&&(E=Zn.exec(B)||$n.exec(B));B=E?Number(E[1]):null;E=E?Number(E[2]):null;
|
|
589
|
+
var F,V;if(F=ao(w,x,"extent"))F=(V=Zn.exec(F))||$n.exec(F),null!=F&&(C.width=null!=B?100*Number(F[1])/B:Number(F[1]),C.height=null!=E?100*Number(F[2])/E:Number(F[2]),C.widthUnits=V||null!=B?Xd:0,C.heightUnits=V||null!=E?Xd:0);if(w=ao(w,x,"origin"))F=(V=Zn.exec(w))||$n.exec(w),null!=F&&(C.viewportAnchorX=null!=E?100*Number(F[1])/E:Number(F[1]),C.viewportAnchorY=null!=B?100*Number(F[2])/B:Number(F[2]),C.viewportAnchorUnits=V||null!=B?Xd:0)}else C=null;C&&n.push(C)}f=Yn(g.getElementsByTagName("body")[0]);
|
|
590
|
+
for(g=0;g<f.length;g++)(q=bo(f[g],c.periodStart,h,k,l,m,n,d))&&e.push(q)}return e};
|
|
591
|
+
var Zn=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,co=/^(\d+px|\d+em)$/,$n=/^(\d+)px (\d+)px$/,eo=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,fo=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,go=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,ho=/^(\d*(?:\.\d*)?)f$/,io=/^(\d*(?:\.\d*)?)t$/,jo=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,ko={left:Pd,center:"center",right:"end",start:Pd,end:"end"},lo={left:"line-left",center:"center",right:"line-right"};
|
|
592
|
+
function Yn(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=Yn(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function mo(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)mo(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
|
|
593
|
+
function bo(b,c,d,e,f,g,h,k){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;mo(b,k);k=no(b.getAttribute("begin"),d);var l=no(b.getAttribute("end"),d);d=no(b.getAttribute("dur"),d);var m=b.textContent;null==l&&null!=d&&(l=k+d);if(null==k||null==l)throw new G(2,2,2001);c=new Id(k+c,l+c,m);if((g=oo(b,"region",g,""))&&g.getAttribute("xml:id")){var n=g.getAttribute("xml:id");h=h.filter(function(b){return b.id==n});c.region=h[0]}e=oo(b,"smpte:backgroundImage",
|
|
594
|
+
e,"#");po(c,b,g,e,f);return c}
|
|
595
|
+
function po(b,c,d,e,f){"rtl"==qo(c,d,f,"direction")&&(b.direction="rtl");var g=qo(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=Jd);if(g=qo(c,d,f,"textAlign"))b.positionAlign=lo[g],b.lineAlign=ko[g],b.textAlign=Td[g.toUpperCase()];if(g=qo(c,d,f,"displayAlign"))b.displayAlign=Ud[g.toUpperCase()];if(g=qo(c,d,f,"color"))b.color=g;if(g=qo(c,d,f,"backgroundColor"))b.backgroundColor=g;if(g=qo(c,
|
|
596
|
+
d,f,"fontFamily"))b.fontFamily=g;(g=qo(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=qo(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=qo(c,d,f,"lineHeight"))&&g.match(co)&&(b.lineHeight=g);(g=qo(c,d,f,"fontSize"))&&g.match(co)&&(b.fontSize=g);if(g=qo(c,d,f,"fontStyle"))b.fontStyle=Wd[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent.trim();"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage="data:image/png;base64,"+e)}(d=ao(d,f,"textDecoration"))&&
|
|
597
|
+
ro(b,d);(c=so(c,f,"textDecoration"))&&ro(b,c)}
|
|
598
|
+
function ro(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&Lb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&Lb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
|
|
599
|
+
b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Lb(b.textDecoration,"overline")}}function qo(b,c,d,e){return(b=so(b,d,e))?b:ao(c,d,e)}function ao(b,c,d){for(var e=Yn(b),f=0;f<e.length;f++){var g=R.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=oo(b,"style",c,""))?R.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
|
|
600
|
+
function so(b,c,d){return(b=oo(b,"style",c,""))?R.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function oo(b,c,d,e){if(!b||1>d.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(e+d[b].getAttribute("xml:id")==c){f=d[b];break}return f}
|
|
601
|
+
function no(b,c){var d=null;if(eo.test(b)){d=eo.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else fo.test(b)?d=to(fo,b):go.test(b)?d=to(go,b):ho.test(b)?(d=ho.exec(b),d=Number(d[1])/c.frameRate):io.test(b)?(d=io.exec(b),d=Number(d[1])/c.a):jo.test(b)&&(d=to(jo,b));return d}
|
|
602
|
+
function to(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function Xn(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}$d["application/ttml+xml"]=Wn;function uo(){this.a=new Wn}uo.prototype.parseInit=function(b){var c=!1;(new Q).H("moov",Hf).H("trak",Hf).H("mdia",Hf).H("minf",Hf).H("stbl",Hf).fa("stsd",If).H("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new G(2,2,2007);};uo.prototype.parseMedia=function(b,c){var d=!1,e=[];(new Q).H("mdat",Jf(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new G(2,2,2007);return e};$d['application/mp4; codecs="stpp"']=uo;
|
|
603
|
+
$d['application/mp4; codecs="stpp.TTML.im1t"']=uo;function vo(){}vo.prototype.parseInit=function(){};
|
|
604
|
+
vo.prototype.parseMedia=function(b,c){var d=Ac(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new G(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);if(f&&g){e=wo(new Wg(f[1]));if(null==e)throw new G(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=
|
|
605
|
+
new Wg(h[f]),l=new Kd;Zg(k);Xg(k);for(var m=Zg(k);m;){var n=l,q=m;(m=/^id=(.*)$/.exec(q))?n.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(q))?n.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(q))?(n.height=Number(m[1]),n.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.regionAnchorX=Number(m[1]),n.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(q)&&(n.scroll=
|
|
606
|
+
"up");Xg(k);m=Zg(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;q=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));n=new Wg(m[0]);var w=wo(n),x=Yg(n,/[ \t]+--\x3e[ \t]+/g),B=wo(n);if(null==w||null==x||null==B)throw new G(2,2,2001);m=new Id(w+q,B+q,m.slice(1).join("\n").trim());Xg(n);for(q=Zg(n);q;)xo(m,q,h),Xg(n),q=Zg(n);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
|
|
607
|
+
function xo(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Md:b.textAlign=Td[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
|
|
608
|
+
c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=yo(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=Vd[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=Od,b.line=Number(d[1]),d[2]&&(b.lineAlign=Vd[d[2].toUpperCase()])}function yo(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
|
|
609
|
+
function wo(b){b=Yg(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}$d["text/vtt"]=vo;$d['text/vtt; codecs="vtt"']=vo;function zo(){this.a=null}zo.prototype.parseInit=function(b){var c=!1;(new Q).H("moov",Hf).H("trak",Hf).H("mdia",Hf).fa("mdhd",function(b){0==b.version?(b.reader.L(4),b.reader.L(4),this.a=b.reader.F(),b.reader.L(4)):(b.reader.L(8),b.reader.L(8),this.a=b.reader.F(),b.reader.L(8));b.reader.L(4)}.bind(this)).H("minf",Hf).H("stbl",Hf).fa("stsd",If).H("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new G(2,2,2008);if(!c)throw new G(2,2,2008);};
|
|
610
|
+
zo.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new G(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,n=null;(new Q).H("moof",Hf).H("traf",Hf).fa("tfdt",function(b){k=!0;e=0==b.version?b.reader.F():b.reader.yb()}).fa("tfhd",function(b){var c=b.flags;b=b.reader;b.L(4);c&1&&b.L(8);c&2&&b.L(4);n=c&8?b.F():null}).fa("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.F();d&1&&b.L(4);d&4&&b.L(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,pd:null};d&256&&
|
|
611
|
+
(k.duration=b.F());d&512&&(k.sampleSize=b.F());d&1024&&b.L(4);d&2048&&(k.pd=0==c?b.F():b.Xd());g.push(k)}f=g}).H("mdat",Jf(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new G(2,2,2008);var q=e,w=new DataView(g.buffer,g.byteOffset,g.byteLength),x=new P(w,0);f.forEach(function(b){var f=b.duration||n,g=b.pd?e+b.pd:q;q=g+(f||0);var k=0;do{var l=x.F();k+=l;var m=x.F(),w=null;"vttc"==Kf(m)?8<l&&(w=x.Xa(l-8)):x.L(l-8);f&&w&&h.push(Ao(w,c.periodStart+g/d.a,c.periodStart+q/d.a))}while(b.sampleSize&&
|
|
612
|
+
k<b.sampleSize)});return h.filter(zd.Ga)};function Ao(b,c,d){var e,f,g;(new Q).H("payl",Jf(function(b){e=Ac(b)})).H("iden",Jf(function(b){f=Ac(b)})).H("sttg",Jf(function(b){g=Ac(b)})).parse(b);return e?Bo(e,f,g,c,d):null}function Bo(b,c,d,e,f){b=new Id(e,f,b);c&&(b.id=c);if(d)for(c=new Wg(d),d=Zg(c);d;)xo(b,d,[]),Xg(c),d=Zg(c);return b}$d['application/mp4; codecs="wvtt"']=zo;A("shaka.util.Dom.createHTMLElement",function(b){return document.createElement(b)});A("shaka.util.Dom.createVideoElement",function(){var b=document.createElement("video");b.muted=!0;b.width=600;b.height=400;return b});A("shaka.util.Dom.asHTMLElement",function(b){return b});A("shaka.util.Dom.asHTMLMediaElement",function(b){return b});A("shaka.util.Dom.removeAllChildren",function(b){for(;b.firstChild;)b.removeChild(b.firstChild)});}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
|
|
610
613
|
|
|
611
614
|
//# sourceMappingURL=shaka-player.compiled.map
|