shaka-player 3.3.7 → 3.3.8

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.
Files changed (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CONTRIBUTORS +2 -0
  3. package/README.md +20 -6
  4. package/demo/index.html +0 -2
  5. package/dist/controls.css +1 -1
  6. package/dist/deps.js +2 -2
  7. package/dist/locales.js +30 -30
  8. package/dist/shaka-player.compiled.d.ts +11 -0
  9. package/dist/shaka-player.compiled.debug.d.ts +11 -0
  10. package/dist/shaka-player.compiled.debug.externs.js +48 -37
  11. package/dist/shaka-player.compiled.debug.js +31 -26
  12. package/dist/shaka-player.compiled.debug.map +4 -4
  13. package/dist/shaka-player.compiled.externs.js +48 -37
  14. package/dist/shaka-player.compiled.js +761 -760
  15. package/dist/shaka-player.compiled.map +4 -4
  16. package/dist/shaka-player.ui.d.ts +11 -0
  17. package/dist/shaka-player.ui.debug.d.ts +11 -0
  18. package/dist/shaka-player.ui.debug.externs.js +48 -37
  19. package/dist/shaka-player.ui.debug.js +33 -28
  20. package/dist/shaka-player.ui.debug.map +4 -4
  21. package/dist/shaka-player.ui.externs.js +48 -37
  22. package/dist/shaka-player.ui.js +876 -875
  23. package/dist/shaka-player.ui.map +4 -4
  24. package/docs/tutorials/welcome.md +6 -3
  25. package/lib/dash/dash_parser.js +5 -0
  26. package/lib/hls/hls_parser.js +6 -2
  27. package/lib/media/presentation_timeline.js +24 -1
  28. package/lib/player.js +1 -1
  29. package/lib/polyfill/media_capabilities.js +1 -0
  30. package/lib/polyfill/videoplaybackquality.js +3 -1
  31. package/lib/util/platform.js +41 -1
  32. package/lib/util/string_utils.js +56 -14
  33. package/maintained-branches.md +15 -0
  34. package/package.json +2 -4
  35. package/app-engine/README.md +0 -9
  36. package/app-engine/demo-version-index/README.md +0 -14
  37. package/app-engine/demo-version-index/app.yaml +0 -2
  38. package/app-engine/demo-version-index/main.py +0 -162
  39. package/app-engine/demo-version-index/requirements.txt +0 -6
  40. package/app-engine/demo-version-index/templates/index.html +0 -114
  41. package/app-engine/shaka-player-demo/README.md +0 -18
  42. package/app-engine/shaka-player-demo/app.yaml +0 -61
  43. package/app-engine/shaka-player-demo/main.py +0 -95
  44. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  45. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  46. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  47. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  48. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  49. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  50. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  51. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  52. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  53. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  54. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  55. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  56. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  57. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  58. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  59. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  60. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  61. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  62. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  63. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  64. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  65. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  66. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  67. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  68. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  69. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  70. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  71. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  72. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  73. package/app-engine/shaka-player-demo/posters.py +0 -110
  74. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  75. package/app-engine/shaka-player-demo/time.txt +0 -1
  76. package/build/README.md +0 -127
  77. package/build/__init__.py +0 -0
  78. package/build/all.py +0 -150
  79. package/build/apps.py +0 -186
  80. package/build/build.py +0 -392
  81. package/build/check.py +0 -354
  82. package/build/checkversion.py +0 -84
  83. package/build/compiler.py +0 -513
  84. package/build/conformance.textproto +0 -335
  85. package/build/docker/Dockerfile +0 -20
  86. package/build/docker/docker-compose.yml +0 -10
  87. package/build/docs.py +0 -54
  88. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  89. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  90. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  91. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  92. package/build/gendeps.py +0 -71
  93. package/build/generateExterns.js +0 -867
  94. package/build/generateLocalizations.py +0 -262
  95. package/build/generateTsDefs.py +0 -137
  96. package/build/install-linux-prereqs.sh +0 -136
  97. package/build/license-header +0 -5
  98. package/build/misspellings.txt +0 -38
  99. package/build/pixelsChanged.js +0 -35
  100. package/build/shaka-lab.yaml +0 -163
  101. package/build/shakaBuildHelpers.py +0 -356
  102. package/build/stats.py +0 -816
  103. package/build/subprocessWindowsPatch.py +0 -103
  104. package/build/test.py +0 -541
  105. package/build/types/ads +0 -8
  106. package/build/types/cast +0 -6
  107. package/build/types/cea +0 -13
  108. package/build/types/complete +0 -9
  109. package/build/types/core +0 -108
  110. package/build/types/dash +0 -8
  111. package/build/types/hls +0 -9
  112. package/build/types/manifests +0 -5
  113. package/build/types/networking +0 -6
  114. package/build/types/offline +0 -22
  115. package/build/types/polyfill +0 -21
  116. package/build/types/text +0 -11
  117. package/build/types/ui +0 -39
  118. package/build/updateScreenshots.py +0 -85
  119. package/build/wrapper.template.js +0 -52
@@ -208,13 +208,22 @@ shaka.util.ManifestParserUtils.createDrmInfo=function(a,b){return{keySystem:a,li
208
208
  shaka.util.ManifestParserUtils.guessCodecs=function(a,b){if(1==b.length)return b[0];var c=shaka.util.ManifestParserUtils.guessCodecsSafe(a,b);if(null!=c)return c;throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_COULD_NOT_GUESS_CODECS,b);};
209
209
  shaka.util.ManifestParserUtils.guessCodecsSafe=function(a,b){for(var c=$jscomp.makeIterator(shaka.util.ManifestParserUtils.CODEC_REGEXPS_BY_CONTENT_TYPE_[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=$jscomp.makeIterator(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==shaka.util.ManifestParserUtils.ContentType.TEXT?"":null};shaka.util.ManifestParserUtils.ContentType={VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image",APPLICATION:"application"};
210
210
  shaka.util.ManifestParserUtils.TextStreamKind={SUBTITLE:"subtitle",CLOSED_CAPTION:"caption"};shaka.util.ManifestParserUtils.GAP_OVERLAP_TOLERANCE_SECONDS=1/15;shaka.util.ManifestParserUtils.VIDEO_CODEC_REGEXPS_=[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/];shaka.util.ManifestParserUtils.AUDIO_CODEC_REGEXPS_=[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/];shaka.util.ManifestParserUtils.TEXT_CODEC_REGEXPS_=[/^vtt$/,/^wvtt/,/^stpp/];
211
- shaka.util.ManifestParserUtils.CODEC_REGEXPS_BY_CONTENT_TYPE_={audio:shaka.util.ManifestParserUtils.AUDIO_CODEC_REGEXPS_,video:shaka.util.ManifestParserUtils.VIDEO_CODEC_REGEXPS_,text:shaka.util.ManifestParserUtils.TEXT_CODEC_REGEXPS_};shaka.util.PublicPromise=function(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c};shaka.util.PublicPromise.prototype.resolve=function(a){};shaka.util.PublicPromise.prototype.reject=function(a){};shaka.util.Lazy=function(a){this.gen_=a;this.value_=void 0};shaka.util.Lazy.prototype.value=function(){void 0==this.value_&&(this.value_=this.gen_(),goog.asserts.assert(void 0!=this.value_,"Unable to create lazy value"));return this.value_};shaka.util.Lazy.prototype.reset=function(){this.value_=void 0};shaka.util.StringUtils=function(){};shaka.util.StringUtils.fromUTF8=function(a){if(!a)return"";a=shaka.util.BufferUtils.toUint8(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&shaka.log.alwaysError('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a};
212
- shaka.util.StringUtils.fromUTF16=function(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw shaka.log.error("Data has an incorrect length, must be even."),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.BAD_ENCODING);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=shaka.util.BufferUtils.toDataView(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return shaka.util.StringUtils.fromCharCode(d)};
211
+ shaka.util.ManifestParserUtils.CODEC_REGEXPS_BY_CONTENT_TYPE_={audio:shaka.util.ManifestParserUtils.AUDIO_CODEC_REGEXPS_,video:shaka.util.ManifestParserUtils.VIDEO_CODEC_REGEXPS_,text:shaka.util.ManifestParserUtils.TEXT_CODEC_REGEXPS_};shaka.util.PublicPromise=function(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c};shaka.util.PublicPromise.prototype.resolve=function(a){};shaka.util.PublicPromise.prototype.reject=function(a){};shaka.util.Lazy=function(a){this.gen_=a;this.value_=void 0};shaka.util.Lazy.prototype.value=function(){void 0==this.value_&&(this.value_=this.gen_(),goog.asserts.assert(void 0!=this.value_,"Unable to create lazy value"));return this.value_};shaka.util.Lazy.prototype.reset=function(){this.value_=void 0};shaka.util.DelayedTick=function(a){this.onTick_=a;this.cancelPending_=null};shaka.util.DelayedTick.prototype.tickAfter=function(a){var b=this;this.stop();var c=!0,d=null;this.cancelPending_=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){if(c)b.onTick_()},1E3*a);return this};shaka.util.DelayedTick.prototype.stop=function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)};shaka.util.Timer=function(a){this.onTick_=a;this.ticker_=null};shaka.util.Timer.prototype.tickNow=function(){this.stop();this.onTick_();return this};shaka.util.Timer.prototype.tickAfter=function(a){var b=this;this.stop();this.ticker_=(new shaka.util.DelayedTick(function(){b.onTick_()})).tickAfter(a);return this};shaka.util.Timer.prototype.tickEvery=function(a){var b=this;this.stop();this.ticker_=(new shaka.util.DelayedTick(function(){b.ticker_.tickAfter(a);b.onTick_()})).tickAfter(a);return this};
212
+ shaka.util.Timer.prototype.stop=function(){this.ticker_&&(this.ticker_.stop(),this.ticker_=null)};goog.exportSymbol("shaka.util.Timer",shaka.util.Timer);goog.exportProperty(shaka.util.Timer.prototype,"stop",shaka.util.Timer.prototype.stop);goog.exportProperty(shaka.util.Timer.prototype,"tickEvery",shaka.util.Timer.prototype.tickEvery);goog.exportProperty(shaka.util.Timer.prototype,"tickAfter",shaka.util.Timer.prototype.tickAfter);goog.exportProperty(shaka.util.Timer.prototype,"tickNow",shaka.util.Timer.prototype.tickNow);shaka.util.Platform=function(){};shaka.util.Platform.supportsMediaSource=function(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1};shaka.util.Platform.supportsMediaType=function(a){return""!=shaka.util.Platform.anyMediaElement().canPlayType(a)};shaka.util.Platform.isEdge=function(){return navigator.userAgent.match(/Edge?\//)?!0:!1};shaka.util.Platform.isLegacyEdge=function(){return navigator.userAgent.match(/Edge\//)?!0:!1};shaka.util.Platform.isIE=function(){return shaka.util.Platform.userAgentContains_("Trident/")};
213
+ shaka.util.Platform.isXboxOne=function(){return shaka.util.Platform.userAgentContains_("Xbox One")};shaka.util.Platform.isTizen=function(){return shaka.util.Platform.userAgentContains_("Tizen")};shaka.util.Platform.isTizen4=function(){return shaka.util.Platform.userAgentContains_("Tizen 4")};shaka.util.Platform.isTizen3=function(){return shaka.util.Platform.userAgentContains_("Tizen 3")};shaka.util.Platform.isTizen2=function(){return shaka.util.Platform.userAgentContains_("Tizen 2")};
214
+ shaka.util.Platform.isWebOS=function(){return shaka.util.Platform.userAgentContains_("Web0S")};shaka.util.Platform.isWebOS3=function(){return shaka.util.Platform.userAgentContains_("Web0S")&&shaka.util.Platform.userAgentContains_("Chrome/38.0.2125.122 Safari/537.36")};shaka.util.Platform.isChromecast=function(){return shaka.util.Platform.userAgentContains_("CrKey")};shaka.util.Platform.isChrome=function(){return shaka.util.Platform.userAgentContains_("Chrome")&&!shaka.util.Platform.isEdge()};
215
+ shaka.util.Platform.isApple=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!shaka.util.Platform.isTizen()&&!shaka.util.Platform.isEOS()&&!shaka.util.Platform.isPS4()};shaka.util.Platform.isPS5=function(){return shaka.util.Platform.userAgentContains_("PlayStation 5")};shaka.util.Platform.isPS4=function(){return shaka.util.Platform.userAgentContains_("PlayStation 4")};
216
+ shaka.util.Platform.safariVersion=function(){if(!shaka.util.Platform.isApple())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null};shaka.util.Platform.isSafari=function(){return!!shaka.util.Platform.safariVersion()};shaka.util.Platform.isEOS=function(){return shaka.util.Platform.userAgentContains_("PC=EOS")};
217
+ shaka.util.Platform.isMobile=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:shaka.util.Platform.isApple()&&1<navigator.maxTouchPoints};shaka.util.Platform.userAgentContains_=function(a){return(navigator.userAgent||"").includes(a)};
218
+ shaka.util.Platform.anyMediaElement=function(){var a=shaka.util.Platform;if(a.cachedMediaElement_)return a.cachedMediaElement_;a.cacheExpirationTimer_||(a.cacheExpirationTimer_=new shaka.util.Timer(function(){a.cachedMediaElement_=null}));a.cachedMediaElement_=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0];a.cachedMediaElement_||(a.cachedMediaElement_=document.createElement("video"));a.cacheExpirationTimer_.tickAfter(1);return a.cachedMediaElement_};
219
+ shaka.util.Platform.requiresEncryptionInfoInAllInitSegments=function(){var a=shaka.util.Platform;return a.isTizen()||a.isXboxOne()};shaka.util.Platform.cacheExpirationTimer_=null;shaka.util.Platform.cachedMediaElement_=null;shaka.util.StringUtils=function(){};
220
+ shaka.util.StringUtils.fromUTF8=function(a){if(!a)return"";a=shaka.util.BufferUtils.toUint8(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!shaka.util.Platform.isPS4())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&shaka.log.alwaysError('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=shaka.util.StringUtils.fromCharCode(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,
221
+ shaka.util.Error.Code.BAD_ENCODING);}};shaka.util.StringUtils.fromUTF16=function(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw shaka.log.error("Data has an incorrect length, must be even."),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.BAD_ENCODING);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=shaka.util.BufferUtils.toDataView(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return shaka.util.StringUtils.fromCharCode(d)};
213
222
  shaka.util.StringUtils.fromBytesAutoDetect=function(a){var b=shaka.util.StringUtils;if(!a)return"";var c=shaka.util.BufferUtils.toUint8(a);if(239==c[0]&&187==c[1]&&191==c[2])return b.fromUTF8(c);if(254==c[0]&&255==c[1])return b.fromUTF16(c.subarray(2),!1);if(255==c[0]&&254==c[1])return b.fromUTF16(c.subarray(2),!0);var d=function(e){return c.byteLength<=e||32<=c[e]&&126>=c[e]};shaka.log.debug("Unable to find byte-order-mark, making an educated guess.");if(0==c[0]&&0==c[2])return b.fromUTF16(a,!1);
214
- if(0==c[1]&&0==c[3])return b.fromUTF16(a,!0);if(d(0)&&d(1)&&d(2)&&d(3))return b.fromUTF8(a);throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.UNABLE_TO_DETECT_ENCODING);};shaka.util.StringUtils.toUTF8=function(a){var b=new TextEncoder;return shaka.util.BufferUtils.toArrayBuffer(b.encode(a))};
215
- shaka.util.StringUtils.toUTF16=function(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e){var f=a.charCodeAt(e);d.setUint16(2*e,f,b)}return c};shaka.util.StringUtils.fromCharCode=function(a){return shaka.util.StringUtils.fromCharCodeImpl_.value()(a)};shaka.util.StringUtils.resetFromCharCode=function(){shaka.util.StringUtils.fromCharCodeImpl_.reset()};goog.exportSymbol("shaka.util.StringUtils",shaka.util.StringUtils);
216
- goog.exportProperty(shaka.util.StringUtils,"resetFromCharCode",shaka.util.StringUtils.resetFromCharCode);goog.exportProperty(shaka.util.StringUtils,"toUTF16",shaka.util.StringUtils.toUTF16);goog.exportProperty(shaka.util.StringUtils,"toUTF8",shaka.util.StringUtils.toUTF8);goog.exportProperty(shaka.util.StringUtils,"fromBytesAutoDetect",shaka.util.StringUtils.fromBytesAutoDetect);goog.exportProperty(shaka.util.StringUtils,"fromUTF16",shaka.util.StringUtils.fromUTF16);
217
- goog.exportProperty(shaka.util.StringUtils,"fromUTF8",shaka.util.StringUtils.fromUTF8);
223
+ if(0==c[1]&&0==c[3])return b.fromUTF16(a,!0);if(d(0)&&d(1)&&d(2)&&d(3))return b.fromUTF8(a);throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.UNABLE_TO_DETECT_ENCODING);};
224
+ shaka.util.StringUtils.toUTF8=function(a){if(window.TextEncoder&&!shaka.util.Platform.isPS4()){var b=new TextEncoder;return shaka.util.BufferUtils.toArrayBuffer(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return shaka.util.BufferUtils.toArrayBuffer(b)};shaka.util.StringUtils.toUTF16=function(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e){var f=a.charCodeAt(e);d.setUint16(2*e,f,b)}return c};
225
+ shaka.util.StringUtils.fromCharCode=function(a){return shaka.util.StringUtils.fromCharCodeImpl_.value()(a)};shaka.util.StringUtils.resetFromCharCode=function(){shaka.util.StringUtils.fromCharCodeImpl_.reset()};goog.exportSymbol("shaka.util.StringUtils",shaka.util.StringUtils);goog.exportProperty(shaka.util.StringUtils,"resetFromCharCode",shaka.util.StringUtils.resetFromCharCode);goog.exportProperty(shaka.util.StringUtils,"toUTF16",shaka.util.StringUtils.toUTF16);
226
+ goog.exportProperty(shaka.util.StringUtils,"toUTF8",shaka.util.StringUtils.toUTF8);goog.exportProperty(shaka.util.StringUtils,"fromBytesAutoDetect",shaka.util.StringUtils.fromBytesAutoDetect);goog.exportProperty(shaka.util.StringUtils,"fromUTF16",shaka.util.StringUtils.fromUTF16);goog.exportProperty(shaka.util.StringUtils,"fromUTF8",shaka.util.StringUtils.fromUTF8);
218
227
  shaka.util.StringUtils.fromCharCodeImpl_=new shaka.util.Lazy(function(){for(var a=function(c){try{var d=new Uint8Array(c),e=String.fromCharCode.apply(null,d);goog.asserts.assert(e,"Should get value");return 0<e.length}catch(f){return!1}},b={$jscomp$loop$prop$size$573:65536};0<b.$jscomp$loop$prop$size$573;b={$jscomp$loop$prop$size$573:b.$jscomp$loop$prop$size$573},b.$jscomp$loop$prop$size$573/=2)if(a(b.$jscomp$loop$prop$size$573))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=
219
228
  c.$jscomp$loop$prop$size$573){var g=d.subarray(f,f+c.$jscomp$loop$prop$size$573);e+=String.fromCharCode.apply(null,g)}return e}}(b);goog.asserts.assert(!1,"Unable to create a fromCharCode method");return null});shaka.util.Uint8ArrayUtils=function(){};shaka.util.Uint8ArrayUtils.equal=function(a,b){shaka.Deprecate.deprecateFeature(4,"shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return shaka.util.BufferUtils.equal(a,b)};shaka.util.Uint8ArrayUtils.toStandardBase64=function(a){a=shaka.util.StringUtils.fromCharCode(shaka.util.BufferUtils.toUint8(a));return btoa(a)};
220
229
  shaka.util.Uint8ArrayUtils.toBase64=function(a,b){b=void 0==b?!0:b;var c=shaka.util.Uint8ArrayUtils.toStandardBase64(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")};shaka.util.Uint8ArrayUtils.fromBase64=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};
@@ -261,13 +270,7 @@ shaka.util.LanguageUtils.isoMap_=new Map([["aar","aa"],["abk","ab"],["afr","af"]
261
270
  "mh"],["mal","ml"],["mao","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",
262
271
  "ru"],["sag","sg"],["san","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",
263
272
  "uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);shaka.util.MultiMap=function(){this.map_={}};shaka.util.MultiMap.prototype.push=function(a,b){this.map_.hasOwnProperty(a)?this.map_[a].push(b):this.map_[a]=[b]};shaka.util.MultiMap.prototype.get=function(a){return(a=this.map_[a])?a.slice():null};shaka.util.MultiMap.prototype.getAll=function(){var a=[],b;for(b in this.map_)a.push.apply(a,$jscomp.arrayFromIterable(this.map_[b]));return a};
264
- shaka.util.MultiMap.prototype.remove=function(a,b){a in this.map_&&(this.map_[a]=this.map_[a].filter(function(c){return c!=b}),0==this.map_[a].length&&delete this.map_[a])};shaka.util.MultiMap.prototype.clear=function(){this.map_={}};shaka.util.MultiMap.prototype.forEach=function(a){for(var b in this.map_)a(b,this.map_[b])};shaka.util.MultiMap.prototype.size=function(){return Object.keys(this.map_).length};shaka.util.MultiMap.prototype.keys=function(){return Object.keys(this.map_)};shaka.util.DelayedTick=function(a){this.onTick_=a;this.cancelPending_=null};shaka.util.DelayedTick.prototype.tickAfter=function(a){var b=this;this.stop();var c=!0,d=null;this.cancelPending_=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){if(c)b.onTick_()},1E3*a);return this};shaka.util.DelayedTick.prototype.stop=function(){this.cancelPending_&&(this.cancelPending_(),this.cancelPending_=null)};shaka.util.Timer=function(a){this.onTick_=a;this.ticker_=null};shaka.util.Timer.prototype.tickNow=function(){this.stop();this.onTick_();return this};shaka.util.Timer.prototype.tickAfter=function(a){var b=this;this.stop();this.ticker_=(new shaka.util.DelayedTick(function(){b.onTick_()})).tickAfter(a);return this};shaka.util.Timer.prototype.tickEvery=function(a){var b=this;this.stop();this.ticker_=(new shaka.util.DelayedTick(function(){b.ticker_.tickAfter(a);b.onTick_()})).tickAfter(a);return this};
265
- shaka.util.Timer.prototype.stop=function(){this.ticker_&&(this.ticker_.stop(),this.ticker_=null)};goog.exportSymbol("shaka.util.Timer",shaka.util.Timer);goog.exportProperty(shaka.util.Timer.prototype,"stop",shaka.util.Timer.prototype.stop);goog.exportProperty(shaka.util.Timer.prototype,"tickEvery",shaka.util.Timer.prototype.tickEvery);goog.exportProperty(shaka.util.Timer.prototype,"tickAfter",shaka.util.Timer.prototype.tickAfter);goog.exportProperty(shaka.util.Timer.prototype,"tickNow",shaka.util.Timer.prototype.tickNow);shaka.util.Platform=function(){};shaka.util.Platform.supportsMediaSource=function(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1};shaka.util.Platform.supportsMediaType=function(a){return""!=shaka.util.Platform.anyMediaElement().canPlayType(a)};shaka.util.Platform.isEdge=function(){return navigator.userAgent.match(/Edge?\//)?!0:!1};shaka.util.Platform.isLegacyEdge=function(){return navigator.userAgent.match(/Edge\//)?!0:!1};shaka.util.Platform.isIE=function(){return shaka.util.Platform.userAgentContains_("Trident/")};
266
- shaka.util.Platform.isXboxOne=function(){return shaka.util.Platform.userAgentContains_("Xbox One")};shaka.util.Platform.isTizen=function(){return shaka.util.Platform.userAgentContains_("Tizen")};shaka.util.Platform.isTizen4=function(){return shaka.util.Platform.userAgentContains_("Tizen 4")};shaka.util.Platform.isTizen3=function(){return shaka.util.Platform.userAgentContains_("Tizen 3")};shaka.util.Platform.isTizen2=function(){return shaka.util.Platform.userAgentContains_("Tizen 2")};
267
- shaka.util.Platform.isWebOS=function(){return shaka.util.Platform.userAgentContains_("Web0S")};shaka.util.Platform.isChromecast=function(){return shaka.util.Platform.userAgentContains_("CrKey")};shaka.util.Platform.isChrome=function(){return shaka.util.Platform.userAgentContains_("Chrome")&&!shaka.util.Platform.isEdge()};shaka.util.Platform.isApple=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!shaka.util.Platform.isTizen()};shaka.util.Platform.isPS5=function(){return shaka.util.Platform.userAgentContains_("PlayStation 5")};
268
- shaka.util.Platform.safariVersion=function(){if(!shaka.util.Platform.isApple())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null};shaka.util.Platform.isMobile=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:shaka.util.Platform.isApple()&&1<navigator.maxTouchPoints};shaka.util.Platform.userAgentContains_=function(a){return(navigator.userAgent||"").includes(a)};
269
- shaka.util.Platform.anyMediaElement=function(){var a=shaka.util.Platform;if(a.cachedMediaElement_)return a.cachedMediaElement_;a.cacheExpirationTimer_||(a.cacheExpirationTimer_=new shaka.util.Timer(function(){a.cachedMediaElement_=null}));a.cachedMediaElement_=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0];a.cachedMediaElement_||(a.cachedMediaElement_=document.createElement("video"));a.cacheExpirationTimer_.tickAfter(1);return a.cachedMediaElement_};
270
- shaka.util.Platform.requiresEncryptionInfoInAllInitSegments=function(){var a=shaka.util.Platform;return a.isTizen()||a.isXboxOne()};shaka.util.Platform.cacheExpirationTimer_=null;shaka.util.Platform.cachedMediaElement_=null;shaka.util.StreamUtils=function(){};shaka.util.StreamUtils.chooseCodecsAndFilterManifest=function(a,b,c,d,e){var f=shaka.util.StreamUtils,g=a.variants;if(b.length||c.length)g=f.choosePreferredCodecs(g,b,c);g=f.filterVariantsByAudioChannelCount(g,d);b=f.getVariantsByCodecs_(g);b=f.filterVariantsByDensity_(b);var h=f.chooseCodecsByDecodingAttributes_(b,e);a.variants=a.variants.filter(function(k){if(f.getVariantCodecs_(k)==h)return!0;shaka.log.debug("Dropping Variant (better codec available)",k);return!1})};
273
+ shaka.util.MultiMap.prototype.remove=function(a,b){a in this.map_&&(this.map_[a]=this.map_[a].filter(function(c){return c!=b}),0==this.map_[a].length&&delete this.map_[a])};shaka.util.MultiMap.prototype.clear=function(){this.map_={}};shaka.util.MultiMap.prototype.forEach=function(a){for(var b in this.map_)a(b,this.map_[b])};shaka.util.MultiMap.prototype.size=function(){return Object.keys(this.map_).length};shaka.util.MultiMap.prototype.keys=function(){return Object.keys(this.map_)};shaka.util.StreamUtils=function(){};shaka.util.StreamUtils.chooseCodecsAndFilterManifest=function(a,b,c,d,e){var f=shaka.util.StreamUtils,g=a.variants;if(b.length||c.length)g=f.choosePreferredCodecs(g,b,c);g=f.filterVariantsByAudioChannelCount(g,d);b=f.getVariantsByCodecs_(g);b=f.filterVariantsByDensity_(b);var h=f.chooseCodecsByDecodingAttributes_(b,e);a.variants=a.variants.filter(function(k){if(f.getVariantCodecs_(k)==h)return!0;shaka.log.debug("Dropping Variant (better codec available)",k);return!1})};
271
274
  shaka.util.StreamUtils.getVariantsByCodecs_=function(a){var b=new shaka.util.MultiMap;a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=shaka.util.StreamUtils.getVariantCodecs_(c);b.push(d,c)}return b};
272
275
  shaka.util.StreamUtils.filterVariantsByDensity_=function(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){for(var g=$jscomp.makeIterator(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new shaka.util.MultiMap);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a};
273
276
  shaka.util.StreamUtils.choosePreferredCodecs=function(a,b,c){var d={};b=$jscomp.makeIterator(b);for(var e=b.next();!e.done;d={$jscomp$loop$prop$videoCodec$575:d.$jscomp$loop$prop$videoCodec$575},e=b.next())if(d.$jscomp$loop$prop$videoCodec$575=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.$jscomp$loop$prop$videoCodec$575)}}(d)),e.length){a=e;break}d={};c=$jscomp.makeIterator(c);for(b=c.next();!b.done;d={$jscomp$loop$prop$audioCodec$577:d.$jscomp$loop$prop$audioCodec$577},
@@ -622,12 +625,13 @@ shaka.media.SegmentReference=function(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l
622
625
  m;this.tileDuration=n};shaka.media.SegmentReference.prototype.getUris=function(){return this.getUrisInner()};shaka.media.SegmentReference.prototype.getStartTime=function(){return this.startTime};shaka.media.SegmentReference.prototype.getEndTime=function(){return this.endTime};shaka.media.SegmentReference.prototype.getStartByte=function(){return this.startByte};shaka.media.SegmentReference.prototype.getEndByte=function(){return this.endByte};
623
626
  shaka.media.SegmentReference.prototype.getSize=function(){return this.endByte?this.endByte-this.startByte:null};shaka.media.SegmentReference.prototype.hasPartialSegments=function(){return 0<this.partialReferences.length};shaka.media.SegmentReference.prototype.getTilesLayout=function(){return this.tilesLayout};shaka.media.SegmentReference.prototype.getTileDuration=function(){return this.tileDuration};goog.exportSymbol("shaka.media.SegmentReference",shaka.media.SegmentReference);
624
627
  goog.exportProperty(shaka.media.SegmentReference.prototype,"getTileDuration",shaka.media.SegmentReference.prototype.getTileDuration);goog.exportProperty(shaka.media.SegmentReference.prototype,"getTilesLayout",shaka.media.SegmentReference.prototype.getTilesLayout);goog.exportProperty(shaka.media.SegmentReference.prototype,"getEndByte",shaka.media.SegmentReference.prototype.getEndByte);goog.exportProperty(shaka.media.SegmentReference.prototype,"getStartByte",shaka.media.SegmentReference.prototype.getStartByte);
625
- goog.exportProperty(shaka.media.SegmentReference.prototype,"getEndTime",shaka.media.SegmentReference.prototype.getEndTime);goog.exportProperty(shaka.media.SegmentReference.prototype,"getStartTime",shaka.media.SegmentReference.prototype.getStartTime);goog.exportProperty(shaka.media.SegmentReference.prototype,"getUris",shaka.media.SegmentReference.prototype.getUris);shaka.media.PresentationTimeline=function(a,b,c){this.presentationStartTime_=a;this.presentationDelay_=b;this.segmentAvailabilityDuration_=this.duration_=Infinity;this.maxSegmentDuration_=1;this.maxSegmentEndTime_=this.minSegmentStartTime_=null;this.clockOffset_=0;this.static_=!0;this.userSeekStart_=0;this.autoCorrectDrift_=void 0===c?!0:c;this.availabilityTimeOffset_=0};shaka.media.PresentationTimeline.prototype.getDuration=function(){return this.duration_};
628
+ goog.exportProperty(shaka.media.SegmentReference.prototype,"getEndTime",shaka.media.SegmentReference.prototype.getEndTime);goog.exportProperty(shaka.media.SegmentReference.prototype,"getStartTime",shaka.media.SegmentReference.prototype.getStartTime);goog.exportProperty(shaka.media.SegmentReference.prototype,"getUris",shaka.media.SegmentReference.prototype.getUris);shaka.media.PresentationTimeline=function(a,b,c){this.presentationStartTime_=a;this.presentationDelay_=b;this.segmentAvailabilityDuration_=this.duration_=Infinity;this.maxSegmentDuration_=1;this.maxSegmentEndTime_=this.minSegmentStartTime_=null;this.clockOffset_=0;this.static_=!0;this.userSeekStart_=0;this.autoCorrectDrift_=void 0===c?!0:c;this.availabilityTimeOffset_=0;this.startTimeLocked_=!1};shaka.media.PresentationTimeline.prototype.getDuration=function(){return this.duration_};
626
629
  shaka.media.PresentationTimeline.prototype.getMaxSegmentDuration=function(){return this.maxSegmentDuration_};shaka.media.PresentationTimeline.prototype.setDuration=function(a){goog.asserts.assert(0<a,"duration must be > 0");this.duration_=a};shaka.media.PresentationTimeline.prototype.getPresentationStartTime=function(){return this.presentationStartTime_};shaka.media.PresentationTimeline.prototype.setClockOffset=function(a){this.clockOffset_=a};
627
630
  shaka.media.PresentationTimeline.prototype.setStatic=function(a){this.static_=a};shaka.media.PresentationTimeline.prototype.setSegmentAvailabilityDuration=function(a){goog.asserts.assert(0<=a,"segmentAvailabilityDuration must be >= 0");this.segmentAvailabilityDuration_=a};shaka.media.PresentationTimeline.prototype.setDelay=function(a){goog.asserts.assert(0<=a,"delay must be >= 0");this.presentationDelay_=a};shaka.media.PresentationTimeline.prototype.getDelay=function(){return this.presentationDelay_};
628
- shaka.media.PresentationTimeline.prototype.notifySegments=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.notifyMinSegmentStartTime(a[0].startTime);this.maxSegmentDuration_=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.maxSegmentDuration_);this.maxSegmentEndTime_=Math.max(this.maxSegmentEndTime_,b);null!=this.presentationStartTime_&&this.autoCorrectDrift_&&(this.presentationStartTime_=(Date.now()+this.clockOffset_)/1E3-this.maxSegmentEndTime_-this.maxSegmentDuration_);
629
- shaka.log.v1("notifySegments:","maxSegmentDuration="+this.maxSegmentDuration_)}};shaka.media.PresentationTimeline.prototype.notifyMinSegmentStartTime=function(a){this.minSegmentStartTime_=null==this.minSegmentStartTime_?a:Math.min(this.minSegmentStartTime_,a)};shaka.media.PresentationTimeline.prototype.notifyMaxSegmentDuration=function(a){this.maxSegmentDuration_=Math.max(this.maxSegmentDuration_,a);shaka.log.v1("notifyNewSegmentDuration:","maxSegmentDuration="+this.maxSegmentDuration_)};
630
- shaka.media.PresentationTimeline.prototype.offset=function(a){null!=this.minSegmentStartTime_&&(this.minSegmentStartTime_+=a);null!=this.maxSegmentEndTime_&&(this.maxSegmentEndTime_+=a)};shaka.media.PresentationTimeline.prototype.isLive=function(){return Infinity==this.duration_&&!this.static_};shaka.media.PresentationTimeline.prototype.isInProgress=function(){return Infinity!=this.duration_&&!this.static_};
631
+ shaka.media.PresentationTimeline.prototype.notifySegments=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.notifyMinSegmentStartTime(a[0].startTime);this.maxSegmentDuration_=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.maxSegmentDuration_);this.maxSegmentEndTime_=Math.max(this.maxSegmentEndTime_,b);null!=this.presentationStartTime_&&this.autoCorrectDrift_&&!this.startTimeLocked_&&(this.presentationStartTime_=(Date.now()+this.clockOffset_)/1E3-this.maxSegmentEndTime_-
632
+ this.maxSegmentDuration_);shaka.log.v1("notifySegments:","maxSegmentDuration="+this.maxSegmentDuration_)}};shaka.media.PresentationTimeline.prototype.lockStartTime=function(){this.startTimeLocked_=!0};shaka.media.PresentationTimeline.prototype.notifyMinSegmentStartTime=function(a){this.minSegmentStartTime_=null==this.minSegmentStartTime_?a:Math.min(this.minSegmentStartTime_,a)};
633
+ shaka.media.PresentationTimeline.prototype.notifyMaxSegmentDuration=function(a){this.maxSegmentDuration_=Math.max(this.maxSegmentDuration_,a);shaka.log.v1("notifyNewSegmentDuration:","maxSegmentDuration="+this.maxSegmentDuration_)};shaka.media.PresentationTimeline.prototype.offset=function(a){null!=this.minSegmentStartTime_&&(this.minSegmentStartTime_+=a);null!=this.maxSegmentEndTime_&&(this.maxSegmentEndTime_+=a)};
634
+ shaka.media.PresentationTimeline.prototype.isLive=function(){return Infinity==this.duration_&&!this.static_};shaka.media.PresentationTimeline.prototype.isInProgress=function(){return Infinity!=this.duration_&&!this.static_};
631
635
  shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityStart=function(){goog.asserts.assert(0<=this.segmentAvailabilityDuration_,"The availability duration should be positive");var a=this.getSegmentAvailabilityEnd()-this.segmentAvailabilityDuration_;return Math.max(this.userSeekStart_,a)};shaka.media.PresentationTimeline.prototype.setUserSeekStart=function(a){this.userSeekStart_=a};
632
636
  shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityEnd=function(){return this.isLive()||this.isInProgress()?Math.min(this.getLiveEdge_()+this.availabilityTimeOffset_,this.duration_):this.maxSegmentEndTime_?Math.min(this.maxSegmentEndTime_,this.duration_):this.duration_};
633
637
  shaka.media.PresentationTimeline.prototype.getSafeSeekRangeStart=function(a){var b=Math.max(this.minSegmentStartTime_,this.userSeekStart_);if(Infinity==this.segmentAvailabilityDuration_)return Math.ceil(1E3*b)/1E3;var c=this.getSegmentAvailabilityEnd()-this.segmentAvailabilityDuration_;a=Math.min(c+a,this.getSeekRangeEnd());return Math.max(b,a)};shaka.media.PresentationTimeline.prototype.getSeekRangeStart=function(){return this.getSafeSeekRangeStart(0)};
@@ -638,8 +642,8 @@ shaka.media.PresentationTimeline.prototype.assertIsValid=function(){goog.DEBUG&&
638
642
  goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getSeekRangeEnd",shaka.media.PresentationTimeline.prototype.getSeekRangeEnd);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getSeekRangeStart",shaka.media.PresentationTimeline.prototype.getSeekRangeStart);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getSafeSeekRangeStart",shaka.media.PresentationTimeline.prototype.getSafeSeekRangeStart);
639
643
  goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getSegmentAvailabilityEnd",shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityEnd);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setUserSeekStart",shaka.media.PresentationTimeline.prototype.setUserSeekStart);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getSegmentAvailabilityStart",shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityStart);
640
644
  goog.exportProperty(shaka.media.PresentationTimeline.prototype,"isInProgress",shaka.media.PresentationTimeline.prototype.isInProgress);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"isLive",shaka.media.PresentationTimeline.prototype.isLive);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"offset",shaka.media.PresentationTimeline.prototype.offset);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"notifyMaxSegmentDuration",shaka.media.PresentationTimeline.prototype.notifyMaxSegmentDuration);
641
- goog.exportProperty(shaka.media.PresentationTimeline.prototype,"notifyMinSegmentStartTime",shaka.media.PresentationTimeline.prototype.notifyMinSegmentStartTime);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"notifySegments",shaka.media.PresentationTimeline.prototype.notifySegments);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getDelay",shaka.media.PresentationTimeline.prototype.getDelay);
642
- goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setDelay",shaka.media.PresentationTimeline.prototype.setDelay);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setSegmentAvailabilityDuration",shaka.media.PresentationTimeline.prototype.setSegmentAvailabilityDuration);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setStatic",shaka.media.PresentationTimeline.prototype.setStatic);
645
+ goog.exportProperty(shaka.media.PresentationTimeline.prototype,"notifyMinSegmentStartTime",shaka.media.PresentationTimeline.prototype.notifyMinSegmentStartTime);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"lockStartTime",shaka.media.PresentationTimeline.prototype.lockStartTime);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"notifySegments",shaka.media.PresentationTimeline.prototype.notifySegments);
646
+ goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getDelay",shaka.media.PresentationTimeline.prototype.getDelay);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setDelay",shaka.media.PresentationTimeline.prototype.setDelay);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setSegmentAvailabilityDuration",shaka.media.PresentationTimeline.prototype.setSegmentAvailabilityDuration);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setStatic",shaka.media.PresentationTimeline.prototype.setStatic);
643
647
  goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setClockOffset",shaka.media.PresentationTimeline.prototype.setClockOffset);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getPresentationStartTime",shaka.media.PresentationTimeline.prototype.getPresentationStartTime);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"setDuration",shaka.media.PresentationTimeline.prototype.setDuration);
644
648
  goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getMaxSegmentDuration",shaka.media.PresentationTimeline.prototype.getMaxSegmentDuration);goog.exportProperty(shaka.media.PresentationTimeline.prototype,"getDuration",shaka.media.PresentationTimeline.prototype.getDuration);shaka.media.StallDetector=function(a,b){this.implementation_=a;this.wasMakingProgress_=a.shouldBeMakingProgress();this.value_=a.getPresentationSeconds();this.lastUpdateSeconds_=a.getWallSeconds();this.didJump_=!1;this.stallThresholdSeconds_=b;this.onStall_=function(){}};shaka.media.StallDetector.prototype.release=function(){this.implementation_=null;this.onStall_=function(){}};shaka.media.StallDetector.prototype.onStall=function(a){this.onStall_=a};
645
649
  shaka.media.StallDetector.prototype.poll=function(){var a=this.implementation_,b=a.shouldBeMakingProgress(),c=a.getPresentationSeconds(),d=a.getWallSeconds();if(this.value_!=c||this.wasMakingProgress_!=b)this.lastUpdateSeconds_=d,this.value_=c,this.wasMakingProgress_=b,this.didJump_=!1;c=d-this.lastUpdateSeconds_;if(b=c>=this.stallThresholdSeconds_&&b&&!this.didJump_)this.onStall_(this.value_,c),this.didJump_=!0,this.value_=a.getPresentationSeconds();return b};
@@ -1083,7 +1087,7 @@ goog.exportProperty(shaka.Player.prototype,"configure",shaka.Player.prototype.co
1083
1087
  goog.exportProperty(shaka.Player,"probeSupport",shaka.Player.probeSupport);goog.exportProperty(shaka.Player,"isBrowserSupported",shaka.Player.isBrowserSupported);goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);goog.exportProperty(shaka.Player.prototype,"destroy",shaka.Player.prototype.destroy);
1084
1088
  shaka.Player.EventName={AbrStatusChanged:"abrstatuschanged",Adaptation:"adaptation",Buffering:"buffering",DownloadFailed:"downloadfailed",DownloadHeadersReceived:"downloadheadersreceived",DrmSessionUpdate:"drmsessionupdate",Emsg:"emsg",Error:"error",ExpirationUpdated:"expirationupdated",LargeGap:"largegap",Loaded:"loaded",Loading:"loading",ManifestParsed:"manifestparsed",MediaQualityChanged:"mediaqualitychanged",Metadata:"metadata",OnStateChange:"onstatechange",OnStateIdle:"onstateidle",RateChange:"ratechange",
1085
1089
  SessionDataEvent:"sessiondata",Streaming:"streaming",TextChanged:"textchanged",TextTrackVisibility:"texttrackvisibility",TimelineRegionAdded:"timelineregionadded",TimelineRegionEnter:"timelineregionenter",TimelineRegionExit:"timelineregionexit",TracksChanged:"trackschanged",Unloading:"unloading",VariantChanged:"variantchanged"};shaka.Player.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3};goog.exportProperty(shaka.Player,"LoadMode",shaka.Player.LoadMode);
1086
- shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v3.3.7-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.restrictedStatuses_=["output-restricted","internal-error"];shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
1090
+ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v3.3.8-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.restrictedStatuses_=["output-restricted","internal-error"];shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
1087
1091
  shaka.Player.SRC_EQUAL_EXTENSIONS_TO_MIME_TYPES_={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"};
1088
1092
  shaka.Player.TEXT_EXTENSIONS_TO_MIME_TYPES_={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};shaka.Player.TextTrackLabel="Shaka Player TextTrack";shaka.ads={};shaka.ads.AdsStats=function(){this.loadTimes_=[];this.skipped_=this.playedCompletely_=this.started_=0};shaka.ads.AdsStats.prototype.addLoadTime=function(a){this.loadTimes_.push(a)};shaka.ads.AdsStats.prototype.incrementStarted=function(){this.started_++};shaka.ads.AdsStats.prototype.incrementPlayedCompletely=function(){this.playedCompletely_++};shaka.ads.AdsStats.prototype.incrementSkipped=function(){this.skipped_++};
1089
1093
  shaka.ads.AdsStats.prototype.getBlob=function(){return{loadTimes:this.loadTimes_,started:this.started_,playedCompletely:this.playedCompletely_,skipped:this.skipped_}};shaka.ads.ClientSideAd=function(a,b){var c=this;this.ad_=a;this.manager_=b;this.isPaused_=!1;this.volume_=this.manager_.getVolume();this.eventManager_=new shaka.util.EventManager;this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.PAUSED,function(){c.isPaused_=!0});this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.RESUMED,function(){c.isPaused_=!1})};shaka.ads.ClientSideAd.prototype.getDuration=function(){return this.ad_.getDuration()};
@@ -1426,7 +1430,7 @@ shaka.dash.DashParser.prototype.processManifest_=function(a,b){var c=this,d,e,f,
1426
1430
  E,c.config_.dash.autoCorrectDrift);A.setStatic("static"==z);(G=A.isLive())&&!isNaN(c.config_.availabilityWindowOverride)&&(u=c.config_.availabilityWindowOverride);null==u&&(u=Infinity);A.setSegmentAvailabilityDuration(u);J=a.getAttribute("profiles")||"";H={dynamic:"static"!=z,presentationTimeline:A,period:null,periodInfo:null,adaptationSet:null,representation:null,bandwidth:0,indexRangeWarningGiven:!1,availabilityTimeOffset:p,profiles:J.split(",")};I=c.parsePeriods_(H,n,a);K=I.duration;L=I.periods;
1427
1431
  "static"!=z&&I.durationDerivedFromPeriods||A.setDuration(K||Infinity);c.minTotalAvailabilityTimeOffset_&&!c.lowLatencyMode_&&(N=c.playerInterface_.isAutoLowLatencyMode())&&(c.playerInterface_.enableLowLatencyMode(),c.lowLatencyMode_=c.playerInterface_.isLowLatencyMode());c.lowLatencyMode_?A.setAvailabilityTimeOffset(c.minTotalAvailabilityTimeOffset_):c.minTotalAvailabilityTimeOffset_&&shaka.log.alwaysWarn("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
1428
1432
  A.notifyMaxSegmentDuration(x||1);goog.DEBUG&&A.assertIsValid();return P.yield(c.periodCombiner_.combinePeriods(L,H.dynamic),2);case 2:if(c.manifest_){c.manifest_.variants=c.periodCombiner_.getVariants();c.manifest_.textStreams=c.periodCombiner_.getTextStreams();c.manifest_.imageStreams=c.periodCombiner_.getImageStreams();c.playerInterface_.filter(c.manifest_);P.jumpTo(3);break}c.manifest_={presentationTimeline:A,variants:c.periodCombiner_.getVariants(),textStreams:c.periodCombiner_.getTextStreams(),
1429
- imageStreams:c.periodCombiner_.getImageStreams(),offlineSessionIds:[],minBufferTime:r||0};if(!A.usingPresentationStartTime()){P.jumpTo(3);break}M=shaka.util.XmlUtils;R=M.findChildren(a,"UTCTiming");return P.yield(c.parseUtcTiming_(n,R),5);case 5:S=P.yieldResult;if(!c.playerInterface_)return P["return"]();A.setClockOffset(S);case 3:c.playerInterface_.makeTextStreamsForClosedCaptions(c.manifest_),P.jumpToEnd()}})};
1433
+ imageStreams:c.periodCombiner_.getImageStreams(),offlineSessionIds:[],minBufferTime:r||0};if(!A.usingPresentationStartTime()){P.jumpTo(4);break}M=shaka.util.XmlUtils;R=M.findChildren(a,"UTCTiming");return P.yield(c.parseUtcTiming_(n,R),5);case 5:S=P.yieldResult;if(!c.playerInterface_)return P["return"]();A.setClockOffset(S);case 4:A.lockStartTime();case 3:c.playerInterface_.makeTextStreamsForClosedCaptions(c.manifest_),P.jumpToEnd()}})};
1430
1434
  shaka.dash.DashParser.prototype.parsePeriods_=function(a,b,c){var d=shaka.util.XmlUtils,e=d.parseAttr(c,"mediaPresentationDuration",d.parseDuration),f=[],g=0;c=d.findChildren(c,"Period");for(var h=0;h<c.length;h++){var k=c[h],l=c[h+1],m=d.parseAttr(k,"start",d.parseDuration,g),n=k.id,p=d.parseAttr(k,"duration",d.parseDuration),q=null;if(l){var r=d.parseAttr(l,"start",d.parseDuration);null!=r&&(q=r-m)}else null!=e&&(q=e-m);r=shaka.util.ManifestParserUtils.GAP_OVERLAP_TOLERANCE_SECONDS;q&&p&&Math.abs(q-
1431
1435
  p)>r&&shaka.log.warning("There is a gap/overlap between Periods",k);null==q&&(q=p);if(null!==this.largestPeriodStartTime_&&null!==n&&null!==m&&m<this.largestPeriodStartTime_&&!this.lastManifestUpdatePeriodIds_.includes(n)&&h+1!=c.length)shaka.log.debug("Skipping Period with ID "+n+" as its start time is smaller than the largest period start time that has been seen, and ID is unseen before");else{null!==m&&(null===this.largestPeriodStartTime_||m>this.largestPeriodStartTime_)&&(this.largestPeriodStartTime_=
1432
1436
  m);g=this.parsePeriod_(a,b,{start:m,duration:q,node:k,isLastPeriod:null==q||!l});f.push(g);a.period.id&&q&&(this.periodDurations_[a.period.id]=q);if(null==q){l&&shaka.log.warning("Skipping Period",h+1,"and any subsequent Periods:","Period",h+1,"does not have a valid start time.",l);g=null;break}g=m+q}}this.lastManifestUpdatePeriodIds_=f.map(function(t){return t.id});return null!=e?(g!=e&&shaka.log.warning("@mediaPresentationDuration does not match the total duration of ","all Periods."),{periods:f,
@@ -1504,7 +1508,7 @@ r=n.getAttributeValue("LANGUAGE"),t=n.getAttributeValue("VALUE"),u=(new Map).set
1504
1508
  O.yieldResult,O.yield(b.parseImages_(h),5);case 5:x=O.yieldResult;if(!b.playerInterface_)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.OPERATION_ABORTED);if(b.aesEncrypted_&&0==y.length)throw shaka.log.info("No stream is created, because we don't support AES-128","encryption yet"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_AES_128_ENCRYPTION_NOT_SUPPORTED);
1505
1509
  A=z=Infinity;C=$jscomp.makeIterator(b.uriToStreamInfosMap_.values());for(D=C.next();!D.done;D=C.next())F=D.value,z=Math.min(z,F.minTimestamp),"text"!=F.stream.type&&(A=Math.min(A,F.maxTimestamp-F.minTimestamp));goog.asserts.assert(null==b.presentationTimeline_,"Presentation timeline created early!");b.createPresentationTimeline_();goog.asserts.assert(b.presentationTimeline_,"Presentation timeline not created!");if(b.isLive_())b.updatePlaylistDelay_=b.minTargetDuration_,B=shaka.hls.HlsParser.PresentationType_,
1506
1510
  b.presentationType_==B.LIVE&&(E=b.presentationTimeline_.getDelay(),isNaN(b.config_.availabilityWindowOverride)||(E=b.config_.availabilityWindowOverride),b.presentationTimeline_.setSegmentAvailabilityDuration(E));else for(b.presentationTimeline_.setDuration(A),b.presentationTimeline_.offset(-z),G=$jscomp.makeIterator(b.uriToStreamInfosMap_.values()),D=G.next();!D.done;D=G.next())J=D.value,J.stream.segmentIndex.offset(-z),J.stream.segmentIndex.fit(0,A);b.segmentsToNotifyByStream_=[];H=[];I=$jscomp.makeIterator(y);
1507
- for(K=I.next();!K.done;K=I.next())for(L=K.value,N=$jscomp.makeIterator([L.video,L.audio]),M=N.next();!M.done;M=N.next())(R=M.value)&&H.push(R);return O.yield(Promise.all(H.map(function(T){return $jscomp.asyncExecutePromiseGeneratorProgram(function(U){return U.yield(T.createSegmentIndex(),0)})})),6);case 6:S=$jscomp.makeIterator(H);for(M=S.next();!M.done;M=S.next())P=M.value,b.segmentsToNotifyByStream_.push(P.segmentIndex.references);b.notifySegments_();goog.asserts.assert(!b.presentationTimeline_.usingPresentationStartTime(),
1511
+ for(K=I.next();!K.done;K=I.next())for(L=K.value,N=$jscomp.makeIterator([L.video,L.audio]),M=N.next();!M.done;M=N.next())(R=M.value)&&H.push(R);return O.yield(Promise.all(H.map(function(T){return $jscomp.asyncExecutePromiseGeneratorProgram(function(U){return U.yield(T.createSegmentIndex(),0)})})),6);case 6:S=$jscomp.makeIterator(H);for(M=S.next();!M.done;M=S.next())P=M.value,b.segmentsToNotifyByStream_.push(P.segmentIndex.references);b.notifySegments_();b.presentationTimeline_.lockStartTime();goog.asserts.assert(!b.presentationTimeline_.usingPresentationStartTime(),
1508
1512
  "We should not be using the presentation start time in HLS!");b.manifest_={presentationTimeline:b.presentationTimeline_,variants:y,textStreams:w,imageStreams:x,offlineSessionIds:[],minBufferTime:0};b.playerInterface_.makeTextStreamsForClosedCaptions(b.manifest_);O.jumpToEnd()}})};
1509
1513
  shaka.hls.HlsParser.prototype.parseMasterVariables_=function(a){a=$jscomp.makeIterator(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;b=c.getAttributeValue("NAME");c=c.getAttributeValue("VALUE");b&&c&&(this.globalVariables_.has(b)||this.globalVariables_.set(b,c))}};
1510
1514
  shaka.hls.HlsParser.prototype.parseMediaVariables_=function(a){var b=new Map;a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next()){var d=c.value;c=d.getAttributeValue("NAME");var e=d.getAttributeValue("VALUE");d=d.getAttributeValue("IMPORT");c&&e&&b.set(c,e);d&&(c=this.globalVariables_.get(d))&&b.set(d,c)}return b};
@@ -1547,7 +1551,7 @@ segmentIndex:Z,mimeType:R,codecs:b,kind:aa,encrypted:z,drmInfos:A,keyIds:C,langu
1547
1551
  canSkipSegments:da})}})};
1548
1552
  shaka.hls.HlsParser.prototype.determinePresentationType_=function(a){var b=shaka.hls.HlsParser.PresentationType_,c=shaka.hls.Utils.getFirstTagWithName(a.tags,"EXT-X-PLAYLIST-TYPE"),d=shaka.hls.Utils.getFirstTagWithName(a.tags,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;d?this.setPresentationType_(b.VOD):(c?this.setPresentationType_(b.LIVE):this.setPresentationType_(b.EVENT),b=this.getRequiredTag_(a.tags,"EXT-X-TARGETDURATION"),b=Number(b.value),d=shaka.hls.Utils.getFirstTagWithName(a.tags,
1549
1553
  "EXT-X-PART-INF"),this.lowLatencyMode_&&d?(this.partialTargetDuration_=Number(d.getRequiredAttrValue("PART-TARGET")),this.minTargetDuration_=Math.min(this.partialTargetDuration_,this.minTargetDuration_),this.lowLatencyPresentationDelay_=(a=shaka.hls.Utils.getFirstTagWithName(a.tags,"EXT-X-SERVER-CONTROL"))?Number(a.getRequiredAttrValue("PART-HOLD-BACK")):0):this.minTargetDuration_=Math.min(b,this.minTargetDuration_),this.maxTargetDuration_=Math.max(b,this.maxTargetDuration_))};
1550
- shaka.hls.HlsParser.prototype.createPresentationTimeline_=function(){this.isLive_()?(this.presentationTimeline_=new shaka.media.PresentationTimeline(0,this.config_.defaultPresentationDelay?this.config_.defaultPresentationDelay:this.lowLatencyPresentationDelay_?this.lowLatencyPresentationDelay_:3*this.maxTargetDuration_),this.presentationTimeline_.setStatic(!1)):(this.presentationTimeline_=new shaka.media.PresentationTimeline(null,0),this.presentationTimeline_.setStatic(!0));this.notifySegments_()};
1554
+ shaka.hls.HlsParser.prototype.createPresentationTimeline_=function(){this.isLive_()?(this.presentationTimeline_=new shaka.media.PresentationTimeline(0,this.config_.defaultPresentationDelay?this.config_.defaultPresentationDelay:this.lowLatencyPresentationDelay_?this.lowLatencyPresentationDelay_:3*this.maxTargetDuration_),this.presentationTimeline_.setStatic(!1)):(this.presentationTimeline_=new shaka.media.PresentationTimeline(null,0),this.presentationTimeline_.setStatic(!0))};
1551
1555
  shaka.hls.HlsParser.prototype.getInitSegmentReference_=function(a,b,c){b=shaka.hls.Utils.getFirstTagWithName(b,"EXT-X-MAP");if(!b)return null;var d=b.getRequiredAttrValue("URI");c=this.variableSubstitution_(shaka.hls.Utils.constructAbsoluteUri(a,d),c);a=[c,b.getAttributeValue("BYTERANGE","")].join("-");this.mapTagToInitSegmentRefMap_.has(a)||(b=this.createInitSegmentReference_(c,b),this.mapTagToInitSegmentRefMap_.set(a,b));return this.mapTagToInitSegmentRefMap_.get(a)};
1552
1556
  shaka.hls.HlsParser.prototype.createInitSegmentReference_=function(a,b){var c=0,d=null,e=b.getAttributeValue("BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new shaka.media.InitSegmentReference(function(){return[a]},c,d)};
1553
1557
  shaka.hls.HlsParser.prototype.createSegmentReference_=function(a,b,c,d,e,f,g,h){var k=c.tags,l=this.variableSubstitution_(c.absoluteUri,f),m=shaka.hls.Utils.getFirstTagWithName(k,"EXTINF"),n=0;f=0;var p=null;if(!m){if(0==c.partialSegments.length)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_REQUIRED_TAG_MISSING,"EXTINF");if(!this.lowLatencyMode_)return null}var q=[];if(this.lowLatencyMode_){n={};for(var r=0;r<c.partialSegments.length;n=
@@ -1768,7 +1772,8 @@ shaka.polyfill.Aria.addARIAMixinAttribute_=function(a){var b="aria-"+a.toLowerCa
1768
1772
  shaka.polyfill.Fullscreen.install=function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||
1769
1773
  document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));a=shaka.polyfill.Fullscreen.proxyEvent_;document.addEventListener("webkitfullscreenchange",a);document.addEventListener("webkitfullscreenerror",a);document.addEventListener("mozfullscreenchange",a);document.addEventListener("mozfullscreenerror",a);document.addEventListener("MSFullscreenChange",
1770
1774
  a);document.addEventListener("MSFullscreenError",a)}};shaka.polyfill.Fullscreen.proxyEvent_=function(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)};goog.exportProperty(shaka.polyfill,"Fullscreen",shaka.polyfill.Fullscreen);goog.exportProperty(shaka.polyfill.Fullscreen,"install",shaka.polyfill.Fullscreen.install);shaka.polyfill.register(shaka.polyfill.Fullscreen.install);shaka.polyfill.MathRound=function(){};shaka.polyfill.MathRound.install=function(){shaka.log.debug("mathRound.install");var a=shaka.polyfill.MathRound.MAX_ACCURATE_INPUT_+1;if(Math.round(a)!=a){shaka.log.debug("polyfill Math.round");var b=Math.round;Math.round=function(c){var d=c;c<=shaka.polyfill.MathRound.MAX_ACCURATE_INPUT_&&(d=b(c));return d}}};goog.exportProperty(shaka.polyfill,"MathRound",shaka.polyfill.MathRound);goog.exportProperty(shaka.polyfill.MathRound,"install",shaka.polyfill.MathRound.install);
1771
- shaka.polyfill.MathRound.MAX_ACCURATE_INPUT_=4503599627370496;shaka.polyfill.register(shaka.polyfill.MathRound.install);shaka.polyfill.MediaCapabilities=function(){};shaka.polyfill.MediaCapabilities.install=function(){shaka.util.Platform.isChromecast()||shaka.util.Platform.isApple()||shaka.util.Platform.isPS5()||!navigator.mediaCapabilities?(shaka.log.info("MediaCapabilities: install"),navigator.mediaCapabilities||(navigator.mediaCapabilities={}),shaka.polyfill.MediaCapabilities.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=shaka.polyfill.MediaCapabilities.decodingInfo_):shaka.log.info("MediaCapabilities: Native mediaCapabilities support found.")};
1775
+ shaka.polyfill.MathRound.MAX_ACCURATE_INPUT_=4503599627370496;shaka.polyfill.register(shaka.polyfill.MathRound.install);shaka.polyfill.MediaCapabilities=function(){};
1776
+ shaka.polyfill.MediaCapabilities.install=function(){shaka.util.Platform.isChromecast()||shaka.util.Platform.isApple()||shaka.util.Platform.isPS4()||shaka.util.Platform.isPS5()||!navigator.mediaCapabilities?(shaka.log.info("MediaCapabilities: install"),navigator.mediaCapabilities||(navigator.mediaCapabilities={}),shaka.polyfill.MediaCapabilities.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=shaka.polyfill.MediaCapabilities.decodingInfo_):shaka.log.info("MediaCapabilities: Native mediaCapabilities support found.")};
1772
1777
  shaka.polyfill.MediaCapabilities.decodingInfo_=function(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,r,t,u;return $jscomp.asyncExecutePromiseGeneratorProgram(function(v){switch(v.nextAddress){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return v["return"](b);if("media-source"==a.type){if(!shaka.util.Platform.supportsMediaSource()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),
1773
1778
  !f))return v["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=shaka.util.Platform.supportsMediaType(g),!h)||a.audio&&(k=a.audio.contentType,l=shaka.util.Platform.supportsMediaType(k),!l))return v["return"](b)}else return v["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,v["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(r={robustness:m.video.robustness||
1774
1779
  "",contentType:a.video.contentType},p.push(r));t={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};n.length&&(t.audioCapabilities=n);p.length&&(t.videoCapabilities=p);v.setCatchFinallyBlocks(3);return v.yield(navigator.requestMediaKeySystemAccess(m.keySystem,[t]),5);case 5:u=v.yieldResult;v.leaveTryBlock(4);break;case 3:v.enterCatchBlock(),shaka.log.info("navigator.requestMediaKeySystemAccess failed.");case 4:u&&
@@ -1886,8 +1891,8 @@ shaka.polyfill.PiPWebkit.exitPictureInPicture_=function(){var a=shaka.polyfill.P
1886
1891
  shaka.polyfill.PiPWebkit.setDisablePictureInPicture_=function(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")};goog.exportProperty(shaka.polyfill,"PiPWebkit",shaka.polyfill.PiPWebkit);goog.exportProperty(shaka.polyfill.PiPWebkit,"install",shaka.polyfill.PiPWebkit.install);shaka.polyfill.PiPWebkit.PIP_MODE_="picture-in-picture";shaka.polyfill.PiPWebkit.INLINE_MODE_="inline";shaka.polyfill.register(shaka.polyfill.PiPWebkit.install);shaka.polyfill.RandomUUID=function(){};shaka.polyfill.RandomUUID.install=function(){shaka.log.debug("randomUUID.install");window.crypto?"randomUUID"in window.crypto?shaka.log.debug("RandomUUID: Native window.crypto.randomUUID() support found."):window.crypto.randomUUID=shaka.polyfill.RandomUUID.randomUUID_:shaka.log.debug("window.crypto must be available to install randomUUID polyfill.")};
1887
1892
  shaka.polyfill.RandomUUID.randomUUID_=function(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)};goog.exportProperty(shaka.polyfill,"RandomUUID",shaka.polyfill.RandomUUID);goog.exportProperty(shaka.polyfill.RandomUUID,"install",shaka.polyfill.RandomUUID.install);shaka.polyfill.register(shaka.polyfill.RandomUUID.install);shaka.polyfill.StorageEstimate=function(){};shaka.polyfill.StorageEstimate.install=function(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=shaka.polyfill.StorageEstimate.storageEstimate_)};
1888
1893
  shaka.polyfill.StorageEstimate.storageEstimate_=function(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})};goog.exportProperty(shaka.polyfill,"StorageEstimate",shaka.polyfill.StorageEstimate);goog.exportProperty(shaka.polyfill.StorageEstimate,"install",shaka.polyfill.StorageEstimate.install);shaka.polyfill.register(shaka.polyfill.StorageEstimate.install);shaka.polyfill.Symbol=function(){};shaka.polyfill.Symbol.install=function(){shaka.log.debug("Symbol.install");var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:shaka.polyfill.Symbol.getSymbolDescription_})};shaka.polyfill.Symbol.getSymbolDescription_=function(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0};goog.exportProperty(shaka.polyfill,"Symbol",shaka.polyfill.Symbol);goog.exportProperty(shaka.polyfill.Symbol,"install",shaka.polyfill.Symbol.install);
1889
- shaka.polyfill.register(shaka.polyfill.Symbol.install);shaka.polyfill.VideoPlayPromise=function(){};shaka.polyfill.VideoPlayPromise.install=function(){shaka.log.debug("VideoPlayPromise.install");if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}};goog.exportProperty(shaka.polyfill,"VideoPlayPromise",shaka.polyfill.VideoPlayPromise);goog.exportProperty(shaka.polyfill.VideoPlayPromise,"install",shaka.polyfill.VideoPlayPromise.install);shaka.polyfill.register(shaka.polyfill.VideoPlayPromise.install);shaka.polyfill.VideoPlaybackQuality=function(){};shaka.polyfill.VideoPlaybackQuality.install=function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=shaka.polyfill.VideoPlaybackQuality.webkit_)}};shaka.polyfill.VideoPlaybackQuality.webkit_=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};
1890
- goog.exportProperty(shaka.polyfill,"VideoPlaybackQuality",shaka.polyfill.VideoPlaybackQuality);goog.exportProperty(shaka.polyfill.VideoPlaybackQuality,"install",shaka.polyfill.VideoPlaybackQuality.install);shaka.polyfill.register(shaka.polyfill.VideoPlaybackQuality.install);shaka.polyfill.VTTCue=function(){};
1894
+ shaka.polyfill.register(shaka.polyfill.Symbol.install);shaka.polyfill.VideoPlayPromise=function(){};shaka.polyfill.VideoPlayPromise.install=function(){shaka.log.debug("VideoPlayPromise.install");if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}};goog.exportProperty(shaka.polyfill,"VideoPlayPromise",shaka.polyfill.VideoPlayPromise);goog.exportProperty(shaka.polyfill.VideoPlayPromise,"install",shaka.polyfill.VideoPlayPromise.install);shaka.polyfill.register(shaka.polyfill.VideoPlayPromise.install);shaka.polyfill.VideoPlaybackQuality=function(){};shaka.polyfill.VideoPlaybackQuality.install=function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||shaka.util.Platform.isWebOS3())&&(a.getVideoPlaybackQuality=shaka.polyfill.VideoPlaybackQuality.webkit_)}};
1895
+ shaka.polyfill.VideoPlaybackQuality.webkit_=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};goog.exportProperty(shaka.polyfill,"VideoPlaybackQuality",shaka.polyfill.VideoPlaybackQuality);goog.exportProperty(shaka.polyfill.VideoPlaybackQuality,"install",shaka.polyfill.VideoPlaybackQuality.install);shaka.polyfill.register(shaka.polyfill.VideoPlaybackQuality.install);shaka.polyfill.VTTCue=function(){};
1891
1896
  shaka.polyfill.VTTCue.install=function(){if(window.VTTCue)shaka.log.info("Using native VTTCue.");else if(window.TextTrackCue){var a=null,b=TextTrackCue.length;3==b?(shaka.log.info("Using VTTCue polyfill from 3 argument TextTrackCue."),a=shaka.polyfill.VTTCue.from3ArgsTextTrackCue_):6==b?(shaka.log.info("Using VTTCue polyfill from 6 argument TextTrackCue."),a=shaka.polyfill.VTTCue.from6ArgsTextTrackCue_):shaka.polyfill.VTTCue.canUse3ArgsTextTrackCue_()&&(shaka.log.info("Using VTTCue polyfill from 3 argument TextTrackCue."),a=
1892
1897
  shaka.polyfill.VTTCue.from3ArgsTextTrackCue_);a?window.VTTCue=function(c,d,e){return a(c,d,e)}:shaka.log.error("No recognized signature for TextTrackCue found!")}else shaka.log.error("VTTCue not available.")};shaka.polyfill.VTTCue.from3ArgsTextTrackCue_=function(a,b,c){return new window.TextTrackCue(a,b,c)};shaka.polyfill.VTTCue.from6ArgsTextTrackCue_=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};
1893
1898
  shaka.polyfill.VTTCue.canUse3ArgsTextTrackCue_=function(){try{return!!shaka.polyfill.VTTCue.from3ArgsTextTrackCue_(1,2,"")}catch(a){return!1}};goog.exportProperty(shaka.polyfill,"VTTCue",shaka.polyfill.VTTCue);goog.exportProperty(shaka.polyfill.VTTCue,"install",shaka.polyfill.VTTCue.install);shaka.polyfill.register(shaka.polyfill.VTTCue.install);shaka.text.LrcTextParser=function(){};shaka.text.LrcTextParser.prototype.parseInit=function(a){goog.asserts.assert(!1,"LRC does not have init segments")};