shaka-player 4.0.1 → 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 (157) hide show
  1. package/AUTHORS +1 -0
  2. package/CHANGELOG.md +37 -0
  3. package/CONTRIBUTORS +3 -0
  4. package/README.md +20 -6
  5. package/demo/common/assets.js +1 -1
  6. package/demo/demo.less +0 -1
  7. package/demo/index.html +0 -2
  8. package/demo/main.js +3 -3
  9. package/dist/controls.css +3 -3
  10. package/dist/controls.css.map +1 -1
  11. package/dist/demo.compiled.debug.js +3 -3
  12. package/dist/demo.compiled.debug.map +2 -2
  13. package/dist/demo.compiled.js +3 -3
  14. package/dist/demo.compiled.map +2 -2
  15. package/dist/demo.css +1 -1
  16. package/dist/demo.css.map +1 -1
  17. package/dist/deps.js +4 -4
  18. package/dist/locales.js +34 -34
  19. package/dist/receiver.compiled.debug.js +1 -1
  20. package/dist/receiver.compiled.debug.map +1 -1
  21. package/dist/receiver.compiled.js +1 -1
  22. package/dist/receiver.compiled.map +1 -1
  23. package/dist/shaka-player.compiled.d.ts +11 -0
  24. package/dist/shaka-player.compiled.debug.d.ts +11 -0
  25. package/dist/shaka-player.compiled.debug.externs.js +51 -39
  26. package/dist/shaka-player.compiled.debug.js +247 -237
  27. package/dist/shaka-player.compiled.debug.map +4 -4
  28. package/dist/shaka-player.compiled.externs.js +51 -39
  29. package/dist/shaka-player.compiled.js +799 -792
  30. package/dist/shaka-player.compiled.map +4 -4
  31. package/dist/shaka-player.ui.d.ts +11 -0
  32. package/dist/shaka-player.ui.debug.d.ts +11 -0
  33. package/dist/shaka-player.ui.debug.externs.js +51 -39
  34. package/dist/shaka-player.ui.debug.js +273 -262
  35. package/dist/shaka-player.ui.debug.map +4 -4
  36. package/dist/shaka-player.ui.externs.js +51 -39
  37. package/dist/shaka-player.ui.js +957 -952
  38. package/dist/shaka-player.ui.map +4 -4
  39. package/docs/tutorials/upgrade.md +1 -0
  40. package/docs/tutorials/welcome.md +6 -3
  41. package/externs/shaka/player.js +4 -2
  42. package/lib/abr/simple_abr_manager.js +2 -1
  43. package/lib/dash/dash_parser.js +5 -0
  44. package/lib/hls/hls_parser.js +197 -73
  45. package/lib/media/drm_engine.js +3 -0
  46. package/lib/media/media_source_engine.js +57 -24
  47. package/lib/media/presentation_timeline.js +24 -1
  48. package/lib/media/segment_index.js +26 -1
  49. package/lib/media/segment_reference.js +10 -3
  50. package/lib/media/streaming_engine.js +3 -4
  51. package/lib/media/time_ranges_utils.js +46 -0
  52. package/lib/player.js +1 -1
  53. package/lib/polyfill/media_capabilities.js +3 -0
  54. package/lib/polyfill/videoplaybackquality.js +3 -1
  55. package/lib/util/mime_utils.js +14 -5
  56. package/lib/util/platform.js +19 -1
  57. package/lib/util/stream_utils.js +1 -0
  58. package/lib/util/string_utils.js +56 -14
  59. package/maintained-branches.md +15 -0
  60. package/package.json +3 -5
  61. package/test/hls/hls_live_unit.js +57 -7
  62. package/test/hls/hls_parser_unit.js +102 -8
  63. package/test/media/drm_engine_integration.js +24 -8
  64. package/test/media/media_source_engine_integration.js +24 -10
  65. package/test/media/media_source_engine_unit.js +53 -38
  66. package/test/media/streaming_engine_unit.js +28 -27
  67. package/test/test/util/fake_media_source_engine.js +10 -9
  68. package/ui/less/containers.less +1 -1
  69. package/ui/less/general.less +1 -1
  70. package/ui/less/range_elements.less +1 -0
  71. package/.github/pull_request_template.md +0 -10
  72. package/app-engine/README.md +0 -9
  73. package/app-engine/demo-version-index/README.md +0 -14
  74. package/app-engine/demo-version-index/app.yaml +0 -28
  75. package/app-engine/demo-version-index/generate.py +0 -164
  76. package/app-engine/demo-version-index/main.py +0 -11
  77. package/app-engine/demo-version-index/requirements.txt +0 -5
  78. package/app-engine/demo-version-index/templates/index.html +0 -114
  79. package/app-engine/shaka-player-demo/README.md +0 -18
  80. package/app-engine/shaka-player-demo/app.yaml +0 -61
  81. package/app-engine/shaka-player-demo/main.py +0 -95
  82. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  83. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  84. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  85. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  86. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  87. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  88. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  89. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  90. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  91. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  92. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  93. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  94. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  95. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  96. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  97. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  98. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  99. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  100. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  101. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  102. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  103. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  104. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  105. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  106. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  107. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  108. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  109. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  110. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  111. package/app-engine/shaka-player-demo/posters.py +0 -110
  112. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  113. package/app-engine/shaka-player-demo/time.txt +0 -1
  114. package/build/README.md +0 -127
  115. package/build/__init__.py +0 -0
  116. package/build/all.py +0 -150
  117. package/build/apps.py +0 -186
  118. package/build/build.py +0 -392
  119. package/build/check.py +0 -354
  120. package/build/checkversion.py +0 -84
  121. package/build/compiler.py +0 -513
  122. package/build/conformance.textproto +0 -335
  123. package/build/docker/Dockerfile +0 -20
  124. package/build/docker/docker-compose.yml +0 -10
  125. package/build/docs.py +0 -54
  126. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  127. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  128. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  129. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  130. package/build/gendeps.py +0 -71
  131. package/build/generateExterns.js +0 -867
  132. package/build/generateLocalizations.py +0 -262
  133. package/build/generateTsDefs.py +0 -137
  134. package/build/install-linux-prereqs.sh +0 -136
  135. package/build/license-header +0 -5
  136. package/build/misspellings.txt +0 -39
  137. package/build/pixelsChanged.js +0 -35
  138. package/build/shaka-lab.yaml +0 -161
  139. package/build/shakaBuildHelpers.py +0 -356
  140. package/build/stats.py +0 -816
  141. package/build/subprocessWindowsPatch.py +0 -103
  142. package/build/test.py +0 -541
  143. package/build/types/ads +0 -8
  144. package/build/types/cast +0 -6
  145. package/build/types/cea +0 -13
  146. package/build/types/complete +0 -9
  147. package/build/types/core +0 -108
  148. package/build/types/dash +0 -8
  149. package/build/types/hls +0 -9
  150. package/build/types/manifests +0 -5
  151. package/build/types/networking +0 -6
  152. package/build/types/offline +0 -22
  153. package/build/types/polyfill +0 -18
  154. package/build/types/text +0 -11
  155. package/build/types/ui +0 -39
  156. package/build/updateScreenshots.py +0 -85
  157. 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
@@ -648,6 +648,43 @@ shaka.util.Error.Code = {
648
648
  'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
649
649
  'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
650
650
  };
651
+ /**
652
+ * A timer allows a single function to be executed at a later time or at
653
+ * regular intervals.
654
+ * @final
655
+ */
656
+ shaka.util.Timer = class {
657
+ /**
658
+ * Create a new timer. A timer is committed to a single callback function.
659
+ * While there is no technical reason to do this, it is far easier to
660
+ * understand and use timers when they are connected to one functional idea.
661
+ * @param {function()} onTick
662
+ */
663
+ constructor(onTick) {}
664
+ /**
665
+ * Have the timer call |onTick| now.
666
+ * @return {!shaka.util.Timer}
667
+ */
668
+ tickNow() {}
669
+ /**
670
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
671
+ * called first.
672
+ * @param {number} seconds
673
+ * @return {!shaka.util.Timer}
674
+ */
675
+ tickAfter(seconds) {}
676
+ /**
677
+ * Have the timer call |onTick| every |seconds| until |stop| is called.
678
+ * @param {number} seconds
679
+ * @return {!shaka.util.Timer}
680
+ */
681
+ tickEvery(seconds) {}
682
+ /**
683
+ * Stop the timer and clear the previous behaviour. The timer is still usable
684
+ * after calling |stop|.
685
+ */
686
+ stop() {}
687
+ };
651
688
  /**
652
689
  * @namespace shaka.util.StringUtils
653
690
  * @summary A set of string utility functions.
@@ -923,43 +960,6 @@ shaka.util.LanguageUtils = class {
923
960
  */
924
961
  static findClosestLocale(target, searchSpace) {}
925
962
  };
926
- /**
927
- * A timer allows a single function to be executed at a later time or at
928
- * regular intervals.
929
- * @final
930
- */
931
- shaka.util.Timer = class {
932
- /**
933
- * Create a new timer. A timer is committed to a single callback function.
934
- * While there is no technical reason to do this, it is far easier to
935
- * understand and use timers when they are connected to one functional idea.
936
- * @param {function()} onTick
937
- */
938
- constructor(onTick) {}
939
- /**
940
- * Have the timer call |onTick| now.
941
- * @return {!shaka.util.Timer}
942
- */
943
- tickNow() {}
944
- /**
945
- * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
946
- * called first.
947
- * @param {number} seconds
948
- * @return {!shaka.util.Timer}
949
- */
950
- tickAfter(seconds) {}
951
- /**
952
- * Have the timer call |onTick| every |seconds| until |stop| is called.
953
- * @param {number} seconds
954
- * @return {!shaka.util.Timer}
955
- */
956
- tickEvery(seconds) {}
957
- /**
958
- * Stop the timer and clear the previous behaviour. The timer is still usable
959
- * after calling |stop|.
960
- */
961
- stop() {}
962
- };
963
963
  /**
964
964
  * @summary
965
965
  * <p>
@@ -1691,8 +1691,9 @@ shaka.media.SegmentReference = class {
1691
1691
  * If not provided, the duration should be automatically calculated based on
1692
1692
  * the duration of the reference.
1693
1693
  * @param {?number=} syncTime
1694
- * A time value, expressed in the same scale as the start and end time, which
1695
- * is used to synchronize between streams.
1694
+ * A time value, expressed in seconds since 1970, which is used to
1695
+ * synchronize between streams. Both produced and consumed by the HLS
1696
+ * parser. Other components should not need this value.
1696
1697
  * @param {shaka.media.SegmentReference.Status=} status
1697
1698
  * The segment status is used to indicate that a segment does not exist or is
1698
1699
  * not available.
@@ -1829,6 +1830,17 @@ shaka.media.PresentationTimeline = class {
1829
1830
  * @param {!Array.<!shaka.media.SegmentReference>} references
1830
1831
  */
1831
1832
  notifySegments(references) {}
1833
+ /**
1834
+ * Lock the presentation timeline's start time. After this is called, no
1835
+ * further adjustments to presentationStartTime_ will be permitted.
1836
+ * This should be called after all Periods have been parsed, and all calls to
1837
+ * notifySegments() from the initial manifest parse have been made.
1838
+ * Without this, we can get assertion failures in SegmentIndex for certain
1839
+ * DAI content. If DAI adds ad segments to the manifest faster than
1840
+ * real-time, adjustments to presentationStartTime_ can cause availability
1841
+ * windows to jump around on updates.
1842
+ */
1843
+ lockStartTime() {}
1832
1844
  /**
1833
1845
  * Gives PresentationTimeline a Stream's minimum segment start time.
1834
1846
  * @param {number} startTime