shaka-player 3.3.5 → 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 (139) hide show
  1. package/.github/workflows/release-please.yaml +3 -2
  2. package/AUTHORS +1 -0
  3. package/CHANGELOG.md +32 -0
  4. package/CONTRIBUTORS +3 -0
  5. package/README.md +20 -6
  6. package/demo/demo.less +0 -1
  7. package/demo/index.html +0 -2
  8. package/demo/main.js +3 -3
  9. package/dist/controls.css +3 -3
  10. package/dist/controls.css.map +1 -1
  11. package/dist/demo.compiled.debug.js +2 -2
  12. package/dist/demo.compiled.debug.map +2 -2
  13. package/dist/demo.compiled.js +2 -2
  14. package/dist/demo.compiled.map +2 -2
  15. package/dist/demo.css +1 -1
  16. package/dist/demo.css.map +1 -1
  17. package/dist/deps.js +3 -3
  18. package/dist/locales.js +30 -30
  19. package/dist/shaka-player.compiled.d.ts +248 -237
  20. package/dist/shaka-player.compiled.debug.d.ts +248 -237
  21. package/dist/shaka-player.compiled.debug.externs.js +48 -37
  22. package/dist/shaka-player.compiled.debug.js +38 -33
  23. package/dist/shaka-player.compiled.debug.map +4 -4
  24. package/dist/shaka-player.compiled.externs.js +48 -37
  25. package/dist/shaka-player.compiled.js +771 -770
  26. package/dist/shaka-player.compiled.map +4 -4
  27. package/dist/shaka-player.ui.d.ts +292 -281
  28. package/dist/shaka-player.ui.debug.d.ts +292 -281
  29. package/dist/shaka-player.ui.debug.externs.js +48 -37
  30. package/dist/shaka-player.ui.debug.js +40 -35
  31. package/dist/shaka-player.ui.debug.map +4 -4
  32. package/dist/shaka-player.ui.externs.js +48 -37
  33. package/dist/shaka-player.ui.js +883 -882
  34. package/dist/shaka-player.ui.map +4 -4
  35. package/docs/tutorials/welcome.md +6 -3
  36. package/lib/abr/simple_abr_manager.js +2 -1
  37. package/lib/dash/dash_parser.js +5 -0
  38. package/lib/hls/hls_parser.js +20 -5
  39. package/lib/media/drm_engine.js +3 -0
  40. package/lib/media/presentation_timeline.js +24 -1
  41. package/lib/player.js +1 -1
  42. package/lib/polyfill/media_capabilities.js +1 -0
  43. package/lib/polyfill/videoplaybackquality.js +3 -1
  44. package/lib/util/mime_utils.js +14 -5
  45. package/lib/util/platform.js +41 -1
  46. package/lib/util/stream_utils.js +1 -0
  47. package/lib/util/string_utils.js +56 -14
  48. package/maintained-branches.md +15 -0
  49. package/package.json +2 -4
  50. package/test/hls/hls_live_unit.js +60 -7
  51. package/ui/less/containers.less +1 -1
  52. package/ui/less/general.less +1 -1
  53. package/ui/less/range_elements.less +1 -0
  54. package/.github/pull_request_template.md +0 -10
  55. package/app-engine/README.md +0 -9
  56. package/app-engine/demo-version-index/README.md +0 -14
  57. package/app-engine/demo-version-index/app.yaml +0 -2
  58. package/app-engine/demo-version-index/main.py +0 -162
  59. package/app-engine/demo-version-index/requirements.txt +0 -6
  60. package/app-engine/demo-version-index/templates/index.html +0 -114
  61. package/app-engine/shaka-player-demo/README.md +0 -18
  62. package/app-engine/shaka-player-demo/app.yaml +0 -61
  63. package/app-engine/shaka-player-demo/main.py +0 -95
  64. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  65. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  66. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  67. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  68. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  69. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  70. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  71. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  72. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  73. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  74. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  75. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  76. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  77. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  78. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  79. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  80. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  81. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  82. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  83. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  84. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  85. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  86. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  87. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  88. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  89. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  90. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  91. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  92. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  93. package/app-engine/shaka-player-demo/posters.py +0 -110
  94. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  95. package/app-engine/shaka-player-demo/time.txt +0 -1
  96. package/build/README.md +0 -127
  97. package/build/__init__.py +0 -0
  98. package/build/all.py +0 -150
  99. package/build/apps.py +0 -186
  100. package/build/build.py +0 -392
  101. package/build/check.py +0 -354
  102. package/build/checkversion.py +0 -84
  103. package/build/compiler.py +0 -513
  104. package/build/conformance.textproto +0 -335
  105. package/build/docker/Dockerfile +0 -20
  106. package/build/docker/docker-compose.yml +0 -10
  107. package/build/docs.py +0 -54
  108. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  109. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  110. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  111. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  112. package/build/gendeps.py +0 -71
  113. package/build/generateExterns.js +0 -867
  114. package/build/generateLocalizations.py +0 -262
  115. package/build/generateTsDefs.py +0 -137
  116. package/build/install-linux-prereqs.sh +0 -136
  117. package/build/license-header +0 -5
  118. package/build/misspellings.txt +0 -38
  119. package/build/pixelsChanged.js +0 -35
  120. package/build/shaka-lab.yaml +0 -163
  121. package/build/shakaBuildHelpers.py +0 -356
  122. package/build/stats.py +0 -816
  123. package/build/subprocessWindowsPatch.py +0 -103
  124. package/build/test.py +0 -541
  125. package/build/types/ads +0 -8
  126. package/build/types/cast +0 -6
  127. package/build/types/cea +0 -13
  128. package/build/types/complete +0 -9
  129. package/build/types/core +0 -108
  130. package/build/types/dash +0 -8
  131. package/build/types/hls +0 -9
  132. package/build/types/manifests +0 -5
  133. package/build/types/networking +0 -6
  134. package/build/types/offline +0 -22
  135. package/build/types/polyfill +0 -21
  136. package/build/types/text +0 -11
  137. package/build/types/ui +0 -39
  138. package/build/updateScreenshots.py +0 -85
  139. package/build/wrapper.template.js +0 -52
@@ -980,6 +980,43 @@ shaka.dependencies = class {
980
980
  shaka.dependencies.Allowed = {
981
981
  muxjs: 'muxjs'
982
982
  };
983
+ /**
984
+ * A timer allows a single function to be executed at a later time or at
985
+ * regular intervals.
986
+ * @final
987
+ */
988
+ shaka.util.Timer = class {
989
+ /**
990
+ * Create a new timer. A timer is committed to a single callback function.
991
+ * While there is no technical reason to do this, it is far easier to
992
+ * understand and use timers when they are connected to one functional idea.
993
+ * @param {function()} onTick
994
+ */
995
+ constructor(onTick) {}
996
+ /**
997
+ * Have the timer call |onTick| now.
998
+ * @return {!shaka.util.Timer}
999
+ */
1000
+ tickNow() {}
1001
+ /**
1002
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
1003
+ * called first.
1004
+ * @param {number} seconds
1005
+ * @return {!shaka.util.Timer}
1006
+ */
1007
+ tickAfter(seconds) {}
1008
+ /**
1009
+ * Have the timer call |onTick| every |seconds| until |stop| is called.
1010
+ * @param {number} seconds
1011
+ * @return {!shaka.util.Timer}
1012
+ */
1013
+ tickEvery(seconds) {}
1014
+ /**
1015
+ * Stop the timer and clear the previous behaviour. The timer is still usable
1016
+ * after calling |stop|.
1017
+ */
1018
+ stop() {}
1019
+ };
983
1020
  /**
984
1021
  * @namespace shaka.util.StringUtils
985
1022
  * @summary A set of string utility functions.
@@ -1107,43 +1144,6 @@ shaka.text.TextEngine = class {
1107
1144
  */
1108
1145
  destroy() {}
1109
1146
  };
1110
- /**
1111
- * A timer allows a single function to be executed at a later time or at
1112
- * regular intervals.
1113
- * @final
1114
- */
1115
- shaka.util.Timer = class {
1116
- /**
1117
- * Create a new timer. A timer is committed to a single callback function.
1118
- * While there is no technical reason to do this, it is far easier to
1119
- * understand and use timers when they are connected to one functional idea.
1120
- * @param {function()} onTick
1121
- */
1122
- constructor(onTick) {}
1123
- /**
1124
- * Have the timer call |onTick| now.
1125
- * @return {!shaka.util.Timer}
1126
- */
1127
- tickNow() {}
1128
- /**
1129
- * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
1130
- * called first.
1131
- * @param {number} seconds
1132
- * @return {!shaka.util.Timer}
1133
- */
1134
- tickAfter(seconds) {}
1135
- /**
1136
- * Have the timer call |onTick| every |seconds| until |stop| is called.
1137
- * @param {number} seconds
1138
- * @return {!shaka.util.Timer}
1139
- */
1140
- tickEvery(seconds) {}
1141
- /**
1142
- * Stop the timer and clear the previous behaviour. The timer is still usable
1143
- * after calling |stop|.
1144
- */
1145
- stop() {}
1146
- };
1147
1147
  /**
1148
1148
  * @summary
1149
1149
  * <p>
@@ -1940,6 +1940,17 @@ shaka.media.PresentationTimeline = class {
1940
1940
  * @param {!Array.<!shaka.media.SegmentReference>} references
1941
1941
  */
1942
1942
  notifySegments(references) {}
1943
+ /**
1944
+ * Lock the presentation timeline's start time. After this is called, no
1945
+ * further adjustments to presentationStartTime_ will be permitted.
1946
+ * This should be called after all Periods have been parsed, and all calls to
1947
+ * notifySegments() from the initial manifest parse have been made.
1948
+ * Without this, we can get assertion failures in SegmentIndex for certain
1949
+ * DAI content. If DAI adds ad segments to the manifest faster than
1950
+ * real-time, adjustments to presentationStartTime_ can cause availability
1951
+ * windows to jump around on updates.
1952
+ */
1953
+ lockStartTime() {}
1943
1954
  /**
1944
1955
  * Gives PresentationTimeline a Stream's minimum segment start time.
1945
1956
  * @param {number} startTime
@@ -279,8 +279,8 @@ shaka.ui.Locales.addTo=function(a){a.insert("ar",new Map([["AD_DURATION","\u0645
279
279
  "\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE",
280
280
  "\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],
281
281
  ["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]))};
282
- shaka.ui.Locales.Ids={AD_PROGRESS:"AD_PROGRESS",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",BACK:"BACK",VOLUME:"VOLUME",PAUSE:"PAUSE",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",NOT_APPLICABLE:"NOT_APPLICABLE",SEEK:"SEEK",AD_DURATION:"AD_DURATION",LANGUAGE:"LANGUAGE",SKIP_TO_LIVE:"SKIP_TO_LIVE",FULL_SCREEN:"FULL_SCREEN",CAST:"CAST",LIVE:"LIVE",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",SUBTITLE_FORCED:"SUBTITLE_FORCED",RESOLUTION:"RESOLUTION",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",
283
- PLAY:"PLAY",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",OFF:"OFF",MUTE:"MUTE",AIRPLAY:"AIRPLAY",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",CAPTIONS:"CAPTIONS",AD_TIME:"AD_TIME",AUTO_QUALITY:"AUTO_QUALITY",ON:"ON",STATISTICS:"STATISTICS",PLAYBACK_RATE:"PLAYBACK_RATE",MORE_SETTINGS:"MORE_SETTINGS",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",UNMUTE:"UNMUTE",REPLAY:"REPLAY",FAST_FORWARD:"FAST_FORWARD",REWIND:"REWIND",SKIP_AD:"SKIP_AD",LOOP:"LOOP"};shaka.abr={};shaka.abr.Ewma=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a);this.totalWeight_=this.estimate_=0};shaka.abr.Ewma.prototype.updateAlpha=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a)};shaka.abr.Ewma.prototype.sample=function(a,b){var c=Math.pow(this.alpha_,a);c=b*(1-c)+c*this.estimate_;isNaN(c)||(this.estimate_=c,this.totalWeight_+=a)};
282
+ shaka.ui.Locales.Ids={EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",MUTE:"MUTE",AIRPLAY:"AIRPLAY",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",VOLUME:"VOLUME",AUTO_QUALITY:"AUTO_QUALITY",AD_DURATION:"AD_DURATION",FULL_SCREEN:"FULL_SCREEN",REPLAY:"REPLAY",STATISTICS:"STATISTICS",AD_PROGRESS:"AD_PROGRESS",SUBTITLE_FORCED:"SUBTITLE_FORCED",FAST_FORWARD:"FAST_FORWARD",SKIP_AD:"SKIP_AD",BACK:"BACK",PLAY:"PLAY",PAUSE:"PAUSE",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",
283
+ ON:"ON",RESOLUTION:"RESOLUTION",NOT_APPLICABLE:"NOT_APPLICABLE",LANGUAGE:"LANGUAGE",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",REWIND:"REWIND",UNMUTE:"UNMUTE",SKIP_TO_LIVE:"SKIP_TO_LIVE",CAPTIONS:"CAPTIONS",SEEK:"SEEK",LIVE:"LIVE",PLAYBACK_RATE:"PLAYBACK_RATE",CAST:"CAST",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",LOOP:"LOOP",AD_TIME:"AD_TIME",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",OFF:"OFF",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",MORE_SETTINGS:"MORE_SETTINGS"};shaka.abr={};shaka.abr.Ewma=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a);this.totalWeight_=this.estimate_=0};shaka.abr.Ewma.prototype.updateAlpha=function(a){goog.asserts.assert(0<a,"expected halfLife to be positive");this.alpha_=Math.exp(Math.log(.5)/a)};shaka.abr.Ewma.prototype.sample=function(a,b){var c=Math.pow(this.alpha_,a);c=b*(1-c)+c*this.estimate_;isNaN(c)||(this.estimate_=c,this.totalWeight_+=a)};
284
284
  shaka.abr.Ewma.prototype.getEstimate=function(){return this.estimate_/(1-Math.pow(this.alpha_,this.totalWeight_))};shaka.abr.EwmaBandwidthEstimator=function(){this.fast_=new shaka.abr.Ewma(2);this.slow_=new shaka.abr.Ewma(5);this.bytesSampled_=0;this.minTotalBytes_=128E3;this.minBytes_=16E3};shaka.abr.EwmaBandwidthEstimator.prototype.configure=function(a){this.minTotalBytes_=a.minTotalBytes;this.minBytes_=a.minBytes;this.fast_.updateAlpha(a.fastHalfLife);this.slow_.updateAlpha(a.slowHalfLife)};
285
285
  shaka.abr.EwmaBandwidthEstimator.prototype.sample=function(a,b){if(!(b<this.minBytes_)){var c=8E3*b/a,d=a/1E3;this.bytesSampled_+=b;this.fast_.sample(d,c);this.slow_.sample(d,c)}};shaka.abr.EwmaBandwidthEstimator.prototype.getBandwidthEstimate=function(a){return this.bytesSampled_<this.minTotalBytes_?a:Math.min(this.fast_.getEstimate(),this.slow_.getEstimate())};shaka.abr.EwmaBandwidthEstimator.prototype.hasGoodEstimate=function(){return this.bytesSampled_>=this.minTotalBytes_};shaka.util.ArrayUtils=function(){};shaka.util.ArrayUtils.defaultEquals=function(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b};shaka.util.ArrayUtils.remove=function(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)};shaka.util.ArrayUtils.count=function(a,b){for(var c=0,d=$jscomp.makeIterator(a),e=d.next();!e.done;e=d.next())c+=b(e.value)?1:0;return c};
286
286
  shaka.util.ArrayUtils.hasSameElements=function(a,b,c){c||(c=shaka.util.ArrayUtils.defaultEquals);if(a.length!=b.length)return!1;b=b.slice();var d={};a=$jscomp.makeIterator(a);for(var e=a.next();!e.done;d={$jscomp$loop$prop$item$620:d.$jscomp$loop$prop$item$620},e=a.next()){d.$jscomp$loop$prop$item$620=e.value;e=b.findIndex(function(f){return function(g){return c(f.$jscomp$loop$prop$item$620,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length};
@@ -299,13 +299,22 @@ shaka.text.CueRegion.scrollMode={NONE:"",UP:"up"};goog.exportProperty(shaka.text
299
299
  shaka.util.BufferUtils.unsafeGetArrayBuffer_=function(a){return a instanceof ArrayBuffer?a:a.buffer};shaka.util.BufferUtils.toArrayBuffer=function(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};shaka.util.BufferUtils.toUint8=function(a,b,c){c=void 0===c?Infinity:c;return shaka.util.BufferUtils.view_(a,void 0===b?0:b,c,Uint8Array)};
300
300
  shaka.util.BufferUtils.toDataView=function(a,b,c){c=void 0===c?Infinity:c;return shaka.util.BufferUtils.view_(a,void 0===b?0:b,c,DataView)};shaka.util.BufferUtils.view_=function(a,b,c,d){var e=shaka.util.BufferUtils.unsafeGetArrayBuffer_(a),f=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b,f));return new d(e,a,Math.min(a+Math.max(c,0),f)-a)};goog.exportSymbol("shaka.util.BufferUtils",shaka.util.BufferUtils);goog.exportProperty(shaka.util.BufferUtils,"toDataView",shaka.util.BufferUtils.toDataView);
301
301
  goog.exportProperty(shaka.util.BufferUtils,"toUint8",shaka.util.BufferUtils.toUint8);goog.exportProperty(shaka.util.BufferUtils,"toArrayBuffer",shaka.util.BufferUtils.toArrayBuffer);goog.exportProperty(shaka.util.BufferUtils,"equal",shaka.util.BufferUtils.equal);shaka.util.IDestroyable=function(){};shaka.util.IDestroyable.prototype.destroy=function(){};shaka.dependencies=function(){};shaka.dependencies.add=function(a,b){if(!shaka.dependencies.Allowed[a])throw Error(a+" is not supported");shaka.dependencies.dependencies_.set(a,function(){return b})};shaka.dependencies.has=function(a){return shaka.dependencies.dependencies_.has(a)};shaka.dependencies.muxjs=function(){return shaka.dependencies.dependencies_.get(shaka.dependencies.Allowed.muxjs)()};goog.exportSymbol("shaka.dependencies",shaka.dependencies);
302
- goog.exportProperty(shaka.dependencies,"has",shaka.dependencies.has);goog.exportProperty(shaka.dependencies,"add",shaka.dependencies.add);shaka.dependencies.Allowed={muxjs:"muxjs"};goog.exportProperty(shaka.dependencies,"Allowed",shaka.dependencies.Allowed);shaka.dependencies.dependencies_=new Map([[shaka.dependencies.Allowed.muxjs,function(){return window.muxjs}]]);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};
303
- 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)};
302
+ goog.exportProperty(shaka.dependencies,"has",shaka.dependencies.has);goog.exportProperty(shaka.dependencies,"add",shaka.dependencies.add);shaka.dependencies.Allowed={muxjs:"muxjs"};goog.exportProperty(shaka.dependencies,"Allowed",shaka.dependencies.Allowed);shaka.dependencies.dependencies_=new Map([[shaka.dependencies.Allowed.muxjs,function(){return window.muxjs}]]);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};
303
+ 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/")};
304
+ 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")};
305
+ 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()};
306
+ 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")};
307
+ 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")};
308
+ 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)};
309
+ 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_};
310
+ 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(){};
311
+ 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,
312
+ 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)};
304
313
  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);
305
- 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))};
306
- 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);
307
- 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);
308
- goog.exportProperty(shaka.util.StringUtils,"fromUTF8",shaka.util.StringUtils.fromUTF8);
314
+ 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);};
315
+ 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};
316
+ 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);
317
+ 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);
309
318
  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$622:65536};0<b.$jscomp$loop$prop$size$622;b={$jscomp$loop$prop$size$622:b.$jscomp$loop$prop$size$622},b.$jscomp$loop$prop$size$622/=2)if(a(b.$jscomp$loop$prop$size$622))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=
310
319
  c.$jscomp$loop$prop$size$622){var g=d.subarray(f,f+c.$jscomp$loop$prop$size$622);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)};
311
320
  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};
@@ -319,7 +328,7 @@ shaka.media.Transmuxer.convertTsCodecs=function(a,b){var c=shaka.util.ManifestPa
319
328
  e)}return d};
320
329
  shaka.media.Transmuxer.prototype.transmux=function(a){goog.asserts.assert(!this.isTransmuxing_,"No transmuxing should be in progress.");this.isTransmuxing_=!0;this.transmuxPromise_=new shaka.util.PublicPromise;this.transmuxedData_=[];this.captions_=[];this.metadata_=[];a=shaka.util.BufferUtils.toUint8(a);this.muxTransmuxer_.push(a);this.muxTransmuxer_.flush();this.isTransmuxing_&&this.transmuxPromise_.reject(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MEDIA,shaka.util.Error.Code.TRANSMUXING_FAILED));
321
330
  return this.transmuxPromise_};shaka.media.Transmuxer.prototype.onTransmuxed_=function(a){this.captions_=a.captions;this.metadata_=a.metadata;this.transmuxedData_.push(shaka.util.Uint8ArrayUtils.concat(a.initSegment,a.data))};
322
- shaka.media.Transmuxer.prototype.onTransmuxDone_=function(){var a={data:shaka.util.Uint8ArrayUtils.concat.apply(shaka.util.Uint8ArrayUtils,$jscomp.arrayFromIterable(this.transmuxedData_)),captions:this.captions_,metadata:this.metadata_};this.transmuxPromise_.resolve(a);this.isTransmuxing_=!1};shaka.util.MimeUtils=function(){};shaka.util.MimeUtils.getFullType=function(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c};shaka.util.MimeUtils.getFullOrConvertedType=function(a,b,c){a=shaka.util.MimeUtils.getFullType(a,b);return shaka.dependencies.muxjs()&&shaka.media.Transmuxer.isTsContainer(a)?shaka.media.Transmuxer.convertTsCodecs(c,a):a};
331
+ shaka.media.Transmuxer.prototype.onTransmuxDone_=function(){var a={data:shaka.util.Uint8ArrayUtils.concat.apply(shaka.util.Uint8ArrayUtils,$jscomp.arrayFromIterable(this.transmuxedData_)),captions:this.captions_,metadata:this.metadata_};this.transmuxPromise_.resolve(a);this.isTransmuxing_=!1};shaka.util.MimeUtils=function(){};shaka.util.MimeUtils.getFullType=function(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c};shaka.util.MimeUtils.getFullOrConvertedType=function(a,b,c){a=shaka.util.MimeUtils.getFullType(a,b);b=shaka.util.ManifestParserUtils.ContentType;if(shaka.media.Transmuxer.isTsContainer(a)){if(shaka.dependencies.muxjs())return shaka.media.Transmuxer.convertTsCodecs(c,a)}else if(c==b.AUDIO)return a.replace("video","audio");return a};
323
332
  shaka.util.MimeUtils.getExtendedType=function(a){var b=[a.mimeType];shaka.util.MimeUtils.EXTENDED_MIME_PARAMETERS_.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")};shaka.util.MimeUtils.getContainerType=function(a){return a.split(";")[0].split("/")[1]};shaka.util.MimeUtils.splitCodecs=function(a){return a.split(",")};
324
333
  shaka.util.MimeUtils.getNormalizedCodec=function(a){var b=shaka.util.MimeUtils.getCodecParts_(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";
325
334
  case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a};shaka.util.MimeUtils.getCodecBase=function(a){return shaka.util.MimeUtils.getCodecParts_(a)[0]};shaka.util.MimeUtils.getBasicType=function(a){return a.split(";")[0]};
@@ -337,13 +346,7 @@ shaka.text.TextEngine.prototype.convertMuxjsCaptionsToShakaCaptions=function(a){
337
346
  shaka.text.TextEngine.prototype.storeAndAppendClosedCaptions=function(a,b,c,d){var e=b+" "+c,f=new Map;a=$jscomp.makeIterator(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=h.stream;h=h.cue;f.has(g)||f.set(g,new Map);f.get(g).has(e)||f.get(g).set(e,[]);this.applyVideoTimestampOffsetRecursive_(h,d);h.startTime>=this.appendWindowStart_&&h.startTime<this.appendWindowEnd_&&(f.get(g).get(e).push(h),g==this.selectedClosedCaptionId_&&this.displayer_.append([h]))}d=$jscomp.makeIterator(f.keys());
338
347
  for(e=d.next();!e.done;e=d.next())for(e=e.value,this.closedCaptionsMap_.has(e)||this.closedCaptionsMap_.set(e,new Map),a=$jscomp.makeIterator(f.get(e).keys()),g=a.next();!g.done;g=a.next())g=g.value,h=f.get(e).get(g),this.closedCaptionsMap_.get(e).set(g,h);this.bufferStart_=null==this.bufferStart_?Math.max(b,this.appendWindowStart_):Math.min(this.bufferStart_,Math.max(b,this.appendWindowStart_));this.bufferEnd_=Math.max(this.bufferEnd_,Math.min(c,this.appendWindowEnd_))};
339
348
  shaka.text.TextEngine.prototype.getNumberOfClosedCaptionChannels=function(){return this.closedCaptionsMap_.size};shaka.text.TextEngine.prototype.getNumberOfClosedCaptionsInChannel=function(a){return(a=this.closedCaptionsMap_.get(a))?a.size:0};goog.exportSymbol("shaka.text.TextEngine",shaka.text.TextEngine);goog.exportProperty(shaka.text.TextEngine.prototype,"destroy",shaka.text.TextEngine.prototype.destroy);goog.exportProperty(shaka.text.TextEngine,"findParser",shaka.text.TextEngine.findParser);
340
- goog.exportProperty(shaka.text.TextEngine,"unregisterParser",shaka.text.TextEngine.unregisterParser);goog.exportProperty(shaka.text.TextEngine,"registerParser",shaka.text.TextEngine.registerParser);shaka.text.TextEngine.parserMap_={};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};
341
- 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/")};
342
- 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")};
343
- 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")};
344
- 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)};
345
- 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_};
346
- 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})};
349
+ goog.exportProperty(shaka.text.TextEngine,"unregisterParser",shaka.text.TextEngine.unregisterParser);goog.exportProperty(shaka.text.TextEngine,"registerParser",shaka.text.TextEngine.registerParser);shaka.text.TextEngine.parserMap_={};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})};
347
350
  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};
348
351
  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};
349
352
  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$624:d.$jscomp$loop$prop$videoCodec$624},e=b.next())if(d.$jscomp$loop$prop$videoCodec$624=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.$jscomp$loop$prop$videoCodec$624)}}(d)),e.length){a=e;break}d={};c=$jscomp.makeIterator(c);for(b=c.next();!b.done;d={$jscomp$loop$prop$audioCodec$626:d.$jscomp$loop$prop$audioCodec$626},
@@ -371,7 +374,7 @@ shaka.util.StreamUtils.filterManifestByCurrentVariant=function(a,b){var c=shaka.
371
374
  shaka.util.StreamUtils.filterImageStreams_=function(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"],d=shaka.util.Platform;(d.isWebOS()||d.isTizen()||d.isChromecast())&&c.push("image/webp");(c=c.includes(b.mimeType))||shaka.log.debug("Dropping image stream. Is not supported by the platform.",b);return c})};shaka.util.StreamUtils.areStreamsCompatible_=function(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0};
372
375
  shaka.util.StreamUtils.variantToTrack=function(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=$jscomp.makeIterator(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=$jscomp.makeIterator(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,
373
376
  language:a.language,label:null,kind:h,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
374
- a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a};
377
+ a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a};
375
378
  shaka.util.StreamUtils.textStreamToTrack=function(a){return{id:a.id,active:!1,type:shaka.util.ManifestParserUtils.ContentType.TEXT,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,
376
379
  audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId,originalImageId:null}};
377
380
  shaka.util.StreamUtils.imageStreamToTrack=function(a){var b=shaka.util.ManifestParserUtils.ContentType,c=a.width||null,d=a.height||null,e=null;a.segmentIndex&&(e=a.segmentIndex.get(0));var f=a.tilesLayout;e&&(f=e.getTilesLayout()||f);f&&null!=c&&(c/=Number(f.split("x")[0]));f&&null!=d&&(d/=Number(f.split("x")[1]));return{id:a.id,active:!1,type:b.IMAGE,bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:c,height:d,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,
@@ -391,7 +394,7 @@ this.config_=this.lastTimeChosenMs_=null};shaka.abr.SimpleAbrManager.prototype.s
391
394
  shaka.abr.SimpleAbrManager.prototype.chooseVariant=function(){var a=shaka.abr.SimpleAbrManager,b=a.filterAndSortVariants_(this.config_.restrictions,this.variants_),c=this.getDefaultBandwidth_();c=this.bandwidthEstimator_.getBandwidthEstimate(c);this.variants_.length&&!b.length&&(shaka.log.warning("No variants met the ABR restrictions. Choosing a variant by lowest bandwidth."),b=a.filterAndSortVariants_(null,this.variants_),b=[b[0]]);a=b[0]||null;for(var d=0;d<b.length;d++){for(var e=b[d],f=isNaN(this.playbackRate_)?
392
395
  1:Math.abs(this.playbackRate_),g=f*e.bandwidth,h=g/this.config_.bandwidthDowngradeTarget,k={bandwidth:Infinity},l=d+1;l<b.length;l++)if(e.bandwidth!=b[l].bandwidth){k=b[l];break}f=f*k.bandwidth/this.config_.bandwidthUpgradeTarget;shaka.log.v2("Bandwidth ranges:",(g/1E6).toFixed(3),(h/1E6).toFixed(3),(f/1E6).toFixed(3));c>=h&&c<=f&&a.bandwidth!=e.bandwidth&&(a=e)}this.lastTimeChosenMs_=Date.now();return a};shaka.abr.SimpleAbrManager.prototype.enable=function(){this.enabled_=!0};
393
396
  shaka.abr.SimpleAbrManager.prototype.disable=function(){this.enabled_=!1};shaka.abr.SimpleAbrManager.prototype.segmentDownloaded=function(a,b){shaka.log.v2("Segment downloaded:","deltaTimeMs="+a,"numBytes="+b,"lastTimeChosenMs="+this.lastTimeChosenMs_,"enabled="+this.enabled_);goog.asserts.assert(0<=a,"expected a non-negative duration");this.bandwidthEstimator_.sample(a,b);null!=this.lastTimeChosenMs_&&this.enabled_&&this.suggestStreams_()};
394
- shaka.abr.SimpleAbrManager.prototype.getBandwidthEstimate=function(){return this.bandwidthEstimator_.getBandwidthEstimate(this.config_.defaultBandwidthEstimate)};shaka.abr.SimpleAbrManager.prototype.setVariants=function(a){this.variants_=a};shaka.abr.SimpleAbrManager.prototype.playbackRateChanged=function(a){this.playbackRate_=a};shaka.abr.SimpleAbrManager.prototype.configure=function(a){this.config_=a;this.bandwidthEstimator_&&this.config_&&this.bandwidthEstimator_.configure(this.config_.advanced)};
397
+ shaka.abr.SimpleAbrManager.prototype.getBandwidthEstimate=function(){var a=this.getDefaultBandwidth_();return this.bandwidthEstimator_.getBandwidthEstimate(a)};shaka.abr.SimpleAbrManager.prototype.setVariants=function(a){this.variants_=a};shaka.abr.SimpleAbrManager.prototype.playbackRateChanged=function(a){this.playbackRate_=a};shaka.abr.SimpleAbrManager.prototype.configure=function(a){this.config_=a;this.bandwidthEstimator_&&this.config_&&this.bandwidthEstimator_.configure(this.config_.advanced)};
395
398
  shaka.abr.SimpleAbrManager.prototype.suggestStreams_=function(){shaka.log.v2("Suggesting Streams...");goog.asserts.assert(null!=this.lastTimeChosenMs_,"lastTimeChosenMs_ should not be null");if(!this.startupComplete_){if(!this.bandwidthEstimator_.hasGoodEstimate()){shaka.log.v2("Still waiting for a good estimate...");return}this.startupComplete_=!0}else if(Date.now()-this.lastTimeChosenMs_<1E3*this.config_.switchInterval){shaka.log.v2("Still within switch interval...");return}var a=this.chooseVariant(),
396
399
  b=this.getDefaultBandwidth_();b=this.bandwidthEstimator_.getBandwidthEstimate(b);b=Math.round(b/1E3);a&&(shaka.log.debug("Calling switch_(), bandwidth="+b+" kbps"),this.switch_(a))};shaka.abr.SimpleAbrManager.prototype.getDefaultBandwidth_=function(){var a=this.config_.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.config_.useNetworkInformation&&(a=1E6*navigator.connection.downlink);return a};
397
400
  shaka.abr.SimpleAbrManager.filterAndSortVariants_=function(a,b){a&&(b=b.filter(function(c){goog.asserts.assert(a,"Restrictions should exist!");return shaka.util.StreamUtils.meetsRestrictions(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})};goog.exportSymbol("shaka.abr.SimpleAbrManager",shaka.abr.SimpleAbrManager);goog.exportProperty(shaka.abr.SimpleAbrManager.prototype,"configure",shaka.abr.SimpleAbrManager.prototype.configure);
@@ -504,7 +507,7 @@ shaka.media.DrmEngine.prototype.sendLicenseRequest_=function(a){var b=this,c,d,e
504
507
  "individualization-request"==a.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer),h=shaka.net.NetworkingEngine.RequestType.LICENSE,k=shaka.net.NetworkingEngine.makeRequest([f],b.config_.retryParameters),k.body=a.message,k.method="POST",k.licenseRequestType=a.messageType,k.sessionId=c.sessionId,shaka.media.DrmEngine.isPlayReadyKeySystem(b.currentDrmInfo_.keySystem)&&b.unpackPlayReadyRequest_(k),l=Date.now(),w.setCatchFinallyBlocks(2),n=b.playerInterface_.netEngine.request(h,k),
505
508
  w.yield(n.promise,4);case 4:m=w.yieldResult;w.leaveTryBlock(3);break;case 2:return p=w.enterCatchBlock(),goog.asserts.assert(p instanceof shaka.util.Error,"Wrong NetworkingEngine error type!"),q=new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.LICENSE_REQUEST_FAILED,p),b.onError_(q),e&&e.updatePromise&&e.updatePromise.reject(q),w["return"]();case 3:if(b.destroyer_.destroyed())return w["return"]();b.licenseTimeSeconds_+=(Date.now()-l)/1E3;
506
509
  b.config_.logLicenseExchange&&(r=shaka.util.Uint8ArrayUtils.toBase64(m.data),shaka.log.info("EME license response",r));w.setCatchFinallyBlocks(5);shaka.log.v1("Updating session",c.sessionId);return w.yield(c.update(m.data),7);case 7:w.leaveTryBlock(6);break;case 5:return t=w.enterCatchBlock(),u=new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.LICENSE_RESPONSE_REJECTED,t.message),b.onError_(u),e&&e.updatePromise&&e.updatePromise.reject(u),
507
- w["return"]();case 6:v=new shaka.util.FakeEvent("drmsessionupdate"),b.playerInterface_.onEvent(v),e&&(e.updatePromise&&e.updatePromise.resolve(),x=new shaka.util.Timer(function(){e.loaded=!0;b.areAllSessionsLoaded_()&&b.allSessionsLoaded_.resolve()}),x.tickAfter(shaka.media.DrmEngine.SESSION_LOAD_TIMEOUT_)),w.jumpToEnd()}})};
510
+ w["return"]();case 6:if(b.destroyer_.destroyed())return w["return"]();v=new shaka.util.FakeEvent("drmsessionupdate");b.playerInterface_.onEvent(v);e&&(e.updatePromise&&e.updatePromise.resolve(),x=new shaka.util.Timer(function(){e.loaded=!0;b.areAllSessionsLoaded_()&&b.allSessionsLoaded_.resolve()}),x.tickAfter(shaka.media.DrmEngine.SESSION_LOAD_TIMEOUT_));w.jumpToEnd()}})};
508
511
  shaka.media.DrmEngine.prototype.unpackPlayReadyRequest_=function(a){var b=shaka.util.StringUtils.fromUTF16(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){shaka.log.debug("Unwrapping PlayReady request.");b=(new DOMParser).parseFromString(b,"application/xml");var c=b.getElementsByTagName("HttpHeader");c=$jscomp.makeIterator(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=e.getElementsByTagName("name")[0];e=e.getElementsByTagName("value")[0];goog.asserts.assert(d&&e,"Malformed PlayReady headers!");
509
512
  a.headers[d.textContent]=e.textContent}b=b.getElementsByTagName("Challenge")[0];goog.asserts.assert(b,"Malformed PlayReady challenge!");goog.asserts.assert("base64encoded"==b.getAttribute("encoding"),"Unexpected PlayReady challenge encoding!");a.body=shaka.util.Uint8ArrayUtils.fromBase64(b.textContent)}else shaka.log.debug("PlayReady request is already unwrapped."),a.headers["Content-Type"]="text/xml; charset=utf-8"};
510
513
  shaka.media.DrmEngine.prototype.onKeyStatusesChange_=function(a){var b=this;a=a.target;shaka.log.v2("Key status changed for session",a.sessionId);var c=this.activeSessions_.get(a),d=!1;a.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(shaka.media.DrmEngine.isPlayReadyKeySystem(b.currentDrmInfo_.keySystem)&&16==g.byteLength&&shaka.util.Platform.isEdge()){h=shaka.util.BufferUtils.toDataView(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,
@@ -693,12 +696,13 @@ shaka.media.SegmentReference=function(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l
693
696
  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};
694
697
  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);
695
698
  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);
696
- 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_};
699
+ 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_};
697
700
  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};
698
701
  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_};
699
- 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_);
700
- 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_)};
701
- 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_};
702
+ 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_-
703
+ 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)};
704
+ 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)};
705
+ shaka.media.PresentationTimeline.prototype.isLive=function(){return Infinity==this.duration_&&!this.static_};shaka.media.PresentationTimeline.prototype.isInProgress=function(){return Infinity!=this.duration_&&!this.static_};
702
706
  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};
703
707
  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_};
704
708
  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)};
@@ -709,8 +713,8 @@ shaka.media.PresentationTimeline.prototype.assertIsValid=function(){goog.DEBUG&&
709
713
  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);
710
714
  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);
711
715
  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);
712
- 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);
713
- 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);
716
+ 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);
717
+ 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);
714
718
  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);
715
719
  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};
716
720
  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};
@@ -1154,7 +1158,7 @@ goog.exportProperty(shaka.Player.prototype,"configure",shaka.Player.prototype.co
1154
1158
  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);
1155
1159
  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",
1156
1160
  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);
1157
- shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v3.3.5-1-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;
1161
+ 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;
1158
1162
  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"};
1159
1163
  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_++};
1160
1164
  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()};
@@ -1497,7 +1501,7 @@ shaka.dash.DashParser.prototype.processManifest_=function(a,b){var c=this,d,e,f,
1497
1501
  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;
1498
1502
  "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.");
1499
1503
  A.notifyMaxSegmentDuration(y||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(),
1500
- 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()}})};
1504
+ 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()}})};
1501
1505
  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-
1502
1506
  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_=
1503
1507
  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,
@@ -1575,7 +1579,7 @@ r=n.getAttributeValue("LANGUAGE"),t=n.getAttributeValue("VALUE"),u=(new Map).set
1575
1579
  O.yieldResult,O.yield(b.parseImages_(h),5);case 5:y=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==x.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);
1576
1580
  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_,
1577
1581
  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(x);
1578
- 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(),
1582
+ 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(),
1579
1583
  "We should not be using the presentation start time in HLS!");b.manifest_={presentationTimeline:b.presentationTimeline_,variants:x,textStreams:w,imageStreams:y,offlineSessionIds:[],minBufferTime:0};b.playerInterface_.makeTextStreamsForClosedCaptions(b.manifest_);O.jumpToEnd()}})};
1580
1584
  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))}};
1581
1585
  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};
@@ -1618,13 +1622,13 @@ segmentIndex:Z,mimeType:R,codecs:b,kind:aa,encrypted:z,drmInfos:A,keyIds:C,langu
1618
1622
  canSkipSegments:da})}})};
1619
1623
  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,
1620
1624
  "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_))};
1621
- 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_()};
1625
+ 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))};
1622
1626
  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)};
1623
1627
  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)};
1624
1628
  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=
1625
- {$jscomp$loop$prop$pAbsoluteUri$667:n.$jscomp$loop$prop$pAbsoluteUri$667},r++){var t=c.partialSegments[r],u=0==r?b:q[q.length-1],v=0==r?d:u.endTime,x=Number(t.getAttributeValue("DURATION"));x=v+x;var w=0,y=null;"EXT-X-PRELOAD-HINT"==t.name?w=(u=t.getAttributeValue("BYTERANGE-START"))?Number(u):0:(w=t.getAttributeValue("BYTERANGE"),u=$jscomp.makeIterator(this.parseByteRange_(u,w)),w=u.next().value,y=u.next().value);if(t=t.getAttributeValue("URI"))n.$jscomp$loop$prop$pAbsoluteUri$667=shaka.hls.Utils.constructAbsoluteUri(g,
1626
- t),v=new shaka.media.SegmentReference(v,x,function(z){return function(){return[z.$jscomp$loop$prop$pAbsoluteUri$667]}}(n),w,y,a,e,0,Infinity),q.push(v)}}m?(c=m.value.split(","),n=d+Number(c[0])):n=q[q.length-1].endTime;(c=shaka.hls.Utils.getFirstTagWithName(k,"EXT-X-BYTERANGE"))?(p=$jscomp.makeIterator(this.parseByteRange_(b,c.value)),f=p.next().value,p=p.next().value):q.length&&(f=q[0].startByte,p=q[q.length-1].endByte);b="";c=null;h==shaka.util.ManifestParserUtils.ContentType.IMAGE&&(b="1x1",h=
1627
- shaka.hls.Utils.getFirstTagWithName(k,"EXT-X-TILES"))&&(b=h.getRequiredAttrValue("LAYOUT"),(h=h.getAttributeValue("DURATION"))&&(c=Number(h)));return new shaka.media.SegmentReference(d,n,function(){return l.length?[l]:[]},f,p,a,e,0,Infinity,q,b,c)};shaka.hls.HlsParser.prototype.parseByteRange_=function(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c[1]?c=Number(c[1]):(goog.asserts.assert(a,"Cannot refer back to previous HLS segment!"),c=a.endByte+1),d=c+d-1);return[c,d]};
1629
+ {$jscomp$loop$prop$pAbsoluteUri$667:n.$jscomp$loop$prop$pAbsoluteUri$667},r++){var t=c.partialSegments[r],u=0==r?b:q[q.length-1],v=0==r?d:u.endTime,x=Number(t.getAttributeValue("DURATION"))||this.partialTargetDuration_;if(x){x=v+x;var w=0,y=null;"EXT-X-PRELOAD-HINT"==t.name?w=(u=t.getAttributeValue("BYTERANGE-START"))?Number(u):0:(w=t.getAttributeValue("BYTERANGE"),u=$jscomp.makeIterator(this.parseByteRange_(u,w)),w=u.next().value,y=u.next().value);if(t=t.getAttributeValue("URI"))n.$jscomp$loop$prop$pAbsoluteUri$667=
1630
+ shaka.hls.Utils.constructAbsoluteUri(g,t),v=new shaka.media.SegmentReference(v,x,function(z){return function(){return[z.$jscomp$loop$prop$pAbsoluteUri$667]}}(n),w,y,a,e,0,Infinity),q.push(v)}}}m?(c=m.value.split(","),n=d+Number(c[0])):n=q[q.length-1].endTime;(c=shaka.hls.Utils.getFirstTagWithName(k,"EXT-X-BYTERANGE"))?(p=$jscomp.makeIterator(this.parseByteRange_(b,c.value)),f=p.next().value,p=p.next().value):q.length&&(f=q[0].startByte,p=q[q.length-1].endByte);b="";c=null;h==shaka.util.ManifestParserUtils.ContentType.IMAGE&&
1631
+ (b="1x1",h=shaka.hls.Utils.getFirstTagWithName(k,"EXT-X-TILES"))&&(b=h.getRequiredAttrValue("LAYOUT"),(h=h.getAttributeValue("DURATION"))&&(c=Number(h)));return new shaka.media.SegmentReference(d,n,function(){return l.length?[l]:[]},f,p,a,e,0,Infinity,q,b,c)};shaka.hls.HlsParser.prototype.parseByteRange_=function(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c[1]?c=Number(c[1]):(goog.asserts.assert(a,"Cannot refer back to previous HLS segment!"),c=a.endByte+1),d=c+d-1);return[c,d]};
1628
1632
  shaka.hls.HlsParser.prototype.notifySegments_=function(){if(this.presentationTimeline_){for(var a=$jscomp.makeIterator(this.segmentsToNotifyByStream_),b=a.next();!b.done;b=a.next())this.presentationTimeline_.notifySegments(b.value);this.segmentsToNotifyByStream_=[]}};
1629
1633
  shaka.hls.HlsParser.prototype.createSegments_=function(a,b,c,d,e,f,g,h,k){var l=this,m,n,p,q,r,t,u,v,x,w,y,z,A,C,D,F,B,E,G,J,H;return $jscomp.asyncExecutePromiseGeneratorProgram(function(I){switch(I.nextAddress){case 1:m=b.segments;goog.asserts.assert(m.length,"Playlist should have segments!");p=shaka.hls.Utils.getFirstTagWithNameAsNumber(b.tags,"EXT-X-MEDIA-SEQUENCE",0);r=(q=shaka.hls.Utils.getFirstTagWithName(b.tags,"EXT-X-SKIP"))?Number(q.getAttributeValue("SKIPPED-SEGMENTS")):0;t=p+r;if(l.isLive_()&&
1630
1634
  e.has(t)){u=e.get(t);I.jumpTo(2);break}if(null!=l.playlistStartTime_){I.jumpTo(3);break}n=l.getInitSegmentReference_(b.absoluteUri,m[0].tags,f);goog.asserts.assert(c!=shaka.util.ManifestParserUtils.ContentType.TEXT&&c!=shaka.util.ManifestParserUtils.ContentType.IMAGE,"Should only get start time from audio or video streams");v=l;return I.yield(l.getStartTime_(a,n,d,t,!1,m[0],f,c,h,k),4);case 4:v.playlistStartTime_=I.yieldResult;case 3:u=l.playlistStartTime_;case 2:x=m[0].absoluteUri;shaka.log.debug("First segment",
@@ -1839,7 +1843,8 @@ shaka.polyfill.Aria.addARIAMixinAttribute_=function(a){var b="aria-"+a.toLowerCa
1839
1843
  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||
1840
1844
  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",
1841
1845
  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);
1842
- 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.")};
1846
+ shaka.polyfill.MathRound.MAX_ACCURATE_INPUT_=4503599627370496;shaka.polyfill.register(shaka.polyfill.MathRound.install);shaka.polyfill.MediaCapabilities=function(){};
1847
+ 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.")};
1843
1848
  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),
1844
1849
  !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||
1845
1850
  "",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&&
@@ -1957,8 +1962,8 @@ shaka.polyfill.PiPWebkit.exitPictureInPicture_=function(){var a=shaka.polyfill.P
1957
1962
  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.")};
1958
1963
  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_)};
1959
1964
  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);
1960
- 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}};
1961
- 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(){};
1965
+ 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_)}};
1966
+ 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(){};
1962
1967
  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=
1963
1968
  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)};
1964
1969
  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")};