shaka-player 3.3.7 → 3.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/CONTRIBUTORS +2 -0
  3. package/README.md +20 -6
  4. package/demo/index.html +0 -2
  5. package/dist/controls.css +1 -1
  6. package/dist/deps.js +2 -2
  7. package/dist/locales.js +30 -30
  8. package/dist/shaka-player.compiled.d.ts +11 -0
  9. package/dist/shaka-player.compiled.debug.d.ts +11 -0
  10. package/dist/shaka-player.compiled.debug.externs.js +48 -37
  11. package/dist/shaka-player.compiled.debug.js +31 -26
  12. package/dist/shaka-player.compiled.debug.map +4 -4
  13. package/dist/shaka-player.compiled.externs.js +48 -37
  14. package/dist/shaka-player.compiled.js +761 -760
  15. package/dist/shaka-player.compiled.map +4 -4
  16. package/dist/shaka-player.ui.d.ts +11 -0
  17. package/dist/shaka-player.ui.debug.d.ts +11 -0
  18. package/dist/shaka-player.ui.debug.externs.js +48 -37
  19. package/dist/shaka-player.ui.debug.js +33 -28
  20. package/dist/shaka-player.ui.debug.map +4 -4
  21. package/dist/shaka-player.ui.externs.js +48 -37
  22. package/dist/shaka-player.ui.js +876 -875
  23. package/dist/shaka-player.ui.map +4 -4
  24. package/docs/tutorials/welcome.md +6 -3
  25. package/lib/dash/dash_parser.js +5 -0
  26. package/lib/hls/hls_parser.js +6 -2
  27. package/lib/media/presentation_timeline.js +24 -1
  28. package/lib/player.js +1 -1
  29. package/lib/polyfill/media_capabilities.js +1 -0
  30. package/lib/polyfill/videoplaybackquality.js +3 -1
  31. package/lib/util/platform.js +41 -1
  32. package/lib/util/string_utils.js +56 -14
  33. package/maintained-branches.md +15 -0
  34. package/package.json +2 -4
  35. package/app-engine/README.md +0 -9
  36. package/app-engine/demo-version-index/README.md +0 -14
  37. package/app-engine/demo-version-index/app.yaml +0 -2
  38. package/app-engine/demo-version-index/main.py +0 -162
  39. package/app-engine/demo-version-index/requirements.txt +0 -6
  40. package/app-engine/demo-version-index/templates/index.html +0 -114
  41. package/app-engine/shaka-player-demo/README.md +0 -18
  42. package/app-engine/shaka-player-demo/app.yaml +0 -61
  43. package/app-engine/shaka-player-demo/main.py +0 -95
  44. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  45. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  46. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  47. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  48. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  49. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  50. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  51. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  52. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  53. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  54. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  55. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  56. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  57. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  58. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  59. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  60. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  61. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  62. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  63. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  64. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  65. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  66. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  67. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  68. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  69. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  70. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  71. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  72. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  73. package/app-engine/shaka-player-demo/posters.py +0 -110
  74. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  75. package/app-engine/shaka-player-demo/time.txt +0 -1
  76. package/build/README.md +0 -127
  77. package/build/__init__.py +0 -0
  78. package/build/all.py +0 -150
  79. package/build/apps.py +0 -186
  80. package/build/build.py +0 -392
  81. package/build/check.py +0 -354
  82. package/build/checkversion.py +0 -84
  83. package/build/compiler.py +0 -513
  84. package/build/conformance.textproto +0 -335
  85. package/build/docker/Dockerfile +0 -20
  86. package/build/docker/docker-compose.yml +0 -10
  87. package/build/docs.py +0 -54
  88. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  89. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  90. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  91. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  92. package/build/gendeps.py +0 -71
  93. package/build/generateExterns.js +0 -867
  94. package/build/generateLocalizations.py +0 -262
  95. package/build/generateTsDefs.py +0 -137
  96. package/build/install-linux-prereqs.sh +0 -136
  97. package/build/license-header +0 -5
  98. package/build/misspellings.txt +0 -38
  99. package/build/pixelsChanged.js +0 -35
  100. package/build/shaka-lab.yaml +0 -163
  101. package/build/shakaBuildHelpers.py +0 -356
  102. package/build/stats.py +0 -816
  103. package/build/subprocessWindowsPatch.py +0 -103
  104. package/build/test.py +0 -541
  105. package/build/types/ads +0 -8
  106. package/build/types/cast +0 -6
  107. package/build/types/cea +0 -13
  108. package/build/types/complete +0 -9
  109. package/build/types/core +0 -108
  110. package/build/types/dash +0 -8
  111. package/build/types/hls +0 -9
  112. package/build/types/manifests +0 -5
  113. package/build/types/networking +0 -6
  114. package/build/types/offline +0 -22
  115. package/build/types/polyfill +0 -21
  116. package/build/types/text +0 -11
  117. package/build/types/ui +0 -39
  118. package/build/updateScreenshots.py +0 -85
  119. package/build/wrapper.template.js +0 -52
@@ -930,6 +930,17 @@ declare namespace shaka.media {
930
930
  getSegmentAvailabilityStart ( ) : number ;
931
931
  isInProgress ( ) : boolean ;
932
932
  isLive ( ) : boolean ;
933
+ /**
934
+ * Lock the presentation timeline's start time. After this is called, no
935
+ * further adjustments to presentationStartTime_ will be permitted.
936
+ * This should be called after all Periods have been parsed, and all calls to
937
+ * notifySegments() from the initial manifest parse have been made.
938
+ * Without this, we can get assertion failures in SegmentIndex for certain
939
+ * DAI content. If DAI adds ad segments to the manifest faster than
940
+ * real-time, adjustments to presentationStartTime_ can cause availability
941
+ * windows to jump around on updates.
942
+ */
943
+ lockStartTime ( ) : any ;
933
944
  /**
934
945
  * Gives PresentationTimeline a Stream's maximum segment duration so it can
935
946
  * size and position the segment availability window. This function should be
@@ -930,6 +930,17 @@ declare namespace shaka.media {
930
930
  getSegmentAvailabilityStart ( ) : number ;
931
931
  isInProgress ( ) : boolean ;
932
932
  isLive ( ) : boolean ;
933
+ /**
934
+ * Lock the presentation timeline's start time. After this is called, no
935
+ * further adjustments to presentationStartTime_ will be permitted.
936
+ * This should be called after all Periods have been parsed, and all calls to
937
+ * notifySegments() from the initial manifest parse have been made.
938
+ * Without this, we can get assertion failures in SegmentIndex for certain
939
+ * DAI content. If DAI adds ad segments to the manifest faster than
940
+ * real-time, adjustments to presentationStartTime_ can cause availability
941
+ * windows to jump around on updates.
942
+ */
943
+ lockStartTime ( ) : any ;
933
944
  /**
934
945
  * Gives PresentationTimeline a Stream's maximum segment duration so it can
935
946
  * size and position the segment availability window. This function should be
@@ -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",RESOLUTION:"RESOLUTION",AIRPLAY:"AIRPLAY",EXIT_FULL_SCREEN:"EXIT_FULL_SCREEN",SUBTITLE_FORCED:"SUBTITLE_FORCED",LIVE:"LIVE",MORE_SETTINGS:"MORE_SETTINGS",PAUSE:"PAUSE",SEEK:"SEEK",REWIND:"REWIND",REPLAY:"REPLAY",ENTER_PICTURE_IN_PICTURE:"ENTER_PICTURE_IN_PICTURE",AD_TIME:"AD_TIME",UNDETERMINED_LANGUAGE:"UNDETERMINED_LANGUAGE",AD_DURATION:"AD_DURATION",FAST_FORWARD:"FAST_FORWARD",OFF:"OFF",ON:"ON",PICTURE_IN_PICTURE:"PICTURE_IN_PICTURE",MULTIPLE_LANGUAGES:"MULTIPLE_LANGUAGES",
283
- MUTE:"MUTE",UNMUTE:"UNMUTE",EXIT_PICTURE_IN_PICTURE:"EXIT_PICTURE_IN_PICTURE",AUTO_QUALITY:"AUTO_QUALITY",UNRECOGNIZED_LANGUAGE:"UNRECOGNIZED_LANGUAGE",PLAY:"PLAY",LOOP:"LOOP",NOT_APPLICABLE:"NOT_APPLICABLE",BACK:"BACK",PLAYBACK_RATE:"PLAYBACK_RATE",EXIT_LOOP_MODE:"EXIT_LOOP_MODE",SKIP_TO_LIVE:"SKIP_TO_LIVE",STATISTICS:"STATISTICS",ENTER_LOOP_MODE:"ENTER_LOOP_MODE",FULL_SCREEN:"FULL_SCREEN",VOLUME:"VOLUME",LANGUAGE:"LANGUAGE",CAPTIONS:"CAPTIONS",CAST:"CAST",SKIP_AD:"SKIP_AD"};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};
@@ -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},
@@ -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.7-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.restrictedStatuses_=["output-restricted","internal-error"];shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
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,7 +1622,7 @@ 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=
@@ -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")};