shaka-player 4.0.3 → 4.0.4

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 (129) hide show
  1. package/CHANGELOG.md +13 -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 +3 -3
  7. package/dist/locales.js +33 -33
  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 +141 -137
  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 +774 -772
  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 +153 -149
  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 +892 -890
  23. package/dist/shaka-player.ui.map +4 -4
  24. package/docs/tutorials/upgrade.md +1 -0
  25. package/docs/tutorials/welcome.md +6 -3
  26. package/lib/dash/dash_parser.js +5 -0
  27. package/lib/hls/hls_parser.js +6 -2
  28. package/lib/media/media_source_engine.js +57 -24
  29. package/lib/media/presentation_timeline.js +24 -1
  30. package/lib/media/streaming_engine.js +3 -4
  31. package/lib/media/time_ranges_utils.js +46 -0
  32. package/lib/player.js +1 -1
  33. package/lib/polyfill/media_capabilities.js +3 -0
  34. package/lib/polyfill/videoplaybackquality.js +3 -1
  35. package/lib/util/platform.js +19 -1
  36. package/lib/util/string_utils.js +56 -14
  37. package/maintained-branches.md +15 -0
  38. package/package.json +2 -4
  39. package/test/media/drm_engine_integration.js +24 -8
  40. package/test/media/media_source_engine_integration.js +24 -10
  41. package/test/media/media_source_engine_unit.js +53 -38
  42. package/test/media/streaming_engine_unit.js +28 -27
  43. package/test/test/util/fake_media_source_engine.js +10 -9
  44. package/app-engine/README.md +0 -9
  45. package/app-engine/demo-version-index/README.md +0 -14
  46. package/app-engine/demo-version-index/app.yaml +0 -28
  47. package/app-engine/demo-version-index/generate.py +0 -164
  48. package/app-engine/demo-version-index/main.py +0 -11
  49. package/app-engine/demo-version-index/requirements.txt +0 -5
  50. package/app-engine/demo-version-index/templates/index.html +0 -114
  51. package/app-engine/shaka-player-demo/README.md +0 -18
  52. package/app-engine/shaka-player-demo/app.yaml +0 -61
  53. package/app-engine/shaka-player-demo/main.py +0 -95
  54. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  55. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  56. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  57. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  58. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  59. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  60. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  61. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  62. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  63. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  64. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  65. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  66. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  67. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  68. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  69. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  70. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  71. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  72. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  73. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  74. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  75. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  76. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  77. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  78. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  79. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  80. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  81. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  82. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  83. package/app-engine/shaka-player-demo/posters.py +0 -110
  84. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  85. package/app-engine/shaka-player-demo/time.txt +0 -1
  86. package/build/README.md +0 -127
  87. package/build/__init__.py +0 -0
  88. package/build/all.py +0 -150
  89. package/build/apps.py +0 -186
  90. package/build/build.py +0 -392
  91. package/build/check.py +0 -354
  92. package/build/checkversion.py +0 -84
  93. package/build/compiler.py +0 -513
  94. package/build/conformance.textproto +0 -335
  95. package/build/docker/Dockerfile +0 -20
  96. package/build/docker/docker-compose.yml +0 -10
  97. package/build/docs.py +0 -54
  98. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  99. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  100. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  101. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  102. package/build/gendeps.py +0 -71
  103. package/build/generateExterns.js +0 -867
  104. package/build/generateLocalizations.py +0 -262
  105. package/build/generateTsDefs.py +0 -137
  106. package/build/install-linux-prereqs.sh +0 -136
  107. package/build/license-header +0 -5
  108. package/build/misspellings.txt +0 -39
  109. package/build/pixelsChanged.js +0 -35
  110. package/build/shaka-lab.yaml +0 -161
  111. package/build/shakaBuildHelpers.py +0 -356
  112. package/build/stats.py +0 -816
  113. package/build/subprocessWindowsPatch.py +0 -103
  114. package/build/test.py +0 -541
  115. package/build/types/ads +0 -8
  116. package/build/types/cast +0 -6
  117. package/build/types/cea +0 -13
  118. package/build/types/complete +0 -9
  119. package/build/types/core +0 -108
  120. package/build/types/dash +0 -8
  121. package/build/types/hls +0 -9
  122. package/build/types/manifests +0 -5
  123. package/build/types/networking +0 -6
  124. package/build/types/offline +0 -22
  125. package/build/types/polyfill +0 -18
  126. package/build/types/text +0 -11
  127. package/build/types/ui +0 -39
  128. package/build/updateScreenshots.py +0 -85
  129. package/build/wrapper.template.js +0 -52
@@ -923,6 +923,17 @@ declare namespace shaka.media {
923
923
  getSegmentAvailabilityStart ( ) : number ;
924
924
  isInProgress ( ) : boolean ;
925
925
  isLive ( ) : boolean ;
926
+ /**
927
+ * Lock the presentation timeline's start time. After this is called, no
928
+ * further adjustments to presentationStartTime_ will be permitted.
929
+ * This should be called after all Periods have been parsed, and all calls to
930
+ * notifySegments() from the initial manifest parse have been made.
931
+ * Without this, we can get assertion failures in SegmentIndex for certain
932
+ * DAI content. If DAI adds ad segments to the manifest faster than
933
+ * real-time, adjustments to presentationStartTime_ can cause availability
934
+ * windows to jump around on updates.
935
+ */
936
+ lockStartTime ( ) : any ;
926
937
  /**
927
938
  * Gives PresentationTimeline a Stream's maximum segment duration so it can
928
939
  * size and position the segment availability window. This function should be
@@ -923,6 +923,17 @@ declare namespace shaka.media {
923
923
  getSegmentAvailabilityStart ( ) : number ;
924
924
  isInProgress ( ) : boolean ;
925
925
  isLive ( ) : boolean ;
926
+ /**
927
+ * Lock the presentation timeline's start time. After this is called, no
928
+ * further adjustments to presentationStartTime_ will be permitted.
929
+ * This should be called after all Periods have been parsed, and all calls to
930
+ * notifySegments() from the initial manifest parse have been made.
931
+ * Without this, we can get assertion failures in SegmentIndex for certain
932
+ * DAI content. If DAI adds ad segments to the manifest faster than
933
+ * real-time, adjustments to presentationStartTime_ can cause availability
934
+ * windows to jump around on updates.
935
+ */
936
+ lockStartTime ( ) : any ;
926
937
  /**
927
938
  * Gives PresentationTimeline a Stream's maximum segment duration so it can
928
939
  * size and position the segment availability window. This function should be
@@ -975,6 +975,43 @@ shaka.dependencies = class {
975
975
  shaka.dependencies.Allowed = {
976
976
  muxjs: 'muxjs'
977
977
  };
978
+ /**
979
+ * A timer allows a single function to be executed at a later time or at
980
+ * regular intervals.
981
+ * @final
982
+ */
983
+ shaka.util.Timer = class {
984
+ /**
985
+ * Create a new timer. A timer is committed to a single callback function.
986
+ * While there is no technical reason to do this, it is far easier to
987
+ * understand and use timers when they are connected to one functional idea.
988
+ * @param {function()} onTick
989
+ */
990
+ constructor(onTick) {}
991
+ /**
992
+ * Have the timer call |onTick| now.
993
+ * @return {!shaka.util.Timer}
994
+ */
995
+ tickNow() {}
996
+ /**
997
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
998
+ * called first.
999
+ * @param {number} seconds
1000
+ * @return {!shaka.util.Timer}
1001
+ */
1002
+ tickAfter(seconds) {}
1003
+ /**
1004
+ * Have the timer call |onTick| every |seconds| until |stop| is called.
1005
+ * @param {number} seconds
1006
+ * @return {!shaka.util.Timer}
1007
+ */
1008
+ tickEvery(seconds) {}
1009
+ /**
1010
+ * Stop the timer and clear the previous behaviour. The timer is still usable
1011
+ * after calling |stop|.
1012
+ */
1013
+ stop() {}
1014
+ };
978
1015
  /**
979
1016
  * @namespace shaka.util.StringUtils
980
1017
  * @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>
@@ -1937,6 +1937,17 @@ shaka.media.PresentationTimeline = class {
1937
1937
  * @param {!Array.<!shaka.media.SegmentReference>} references
1938
1938
  */
1939
1939
  notifySegments(references) {}
1940
+ /**
1941
+ * Lock the presentation timeline's start time. After this is called, no
1942
+ * further adjustments to presentationStartTime_ will be permitted.
1943
+ * This should be called after all Periods have been parsed, and all calls to
1944
+ * notifySegments() from the initial manifest parse have been made.
1945
+ * Without this, we can get assertion failures in SegmentIndex for certain
1946
+ * DAI content. If DAI adds ad segments to the manifest faster than
1947
+ * real-time, adjustments to presentationStartTime_ can cause availability
1948
+ * windows to jump around on updates.
1949
+ */
1950
+ lockStartTime() {}
1940
1951
  /**
1941
1952
  * Gives PresentationTimeline a Stream's minimum segment start time.
1942
1953
  * @param {number} startTime