shaka-player 4.1.1 → 4.1.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 (155) hide show
  1. package/.github/workflows/build-and-test.yaml +67 -15
  2. package/.github/workflows/compute-incremental-coverage.py +251 -0
  3. package/.github/workflows/report-incremental-coverage.yaml +39 -0
  4. package/.github/workflows/selenium-lab-tests.yaml +179 -31
  5. package/AUTHORS +1 -0
  6. package/CHANGELOG.md +40 -0
  7. package/CONTRIBUTORS +3 -0
  8. package/README.md +20 -6
  9. package/demo/index.html +1 -3
  10. package/dist/controls.css +2 -2
  11. package/dist/controls.css.map +1 -1
  12. package/dist/deps.js +3 -3
  13. package/dist/locales.js +33 -33
  14. package/dist/shaka-player.compiled.d.ts +12 -1
  15. package/dist/shaka-player.compiled.debug.d.ts +12 -1
  16. package/dist/shaka-player.compiled.debug.externs.js +49 -38
  17. package/dist/shaka-player.compiled.debug.js +173 -165
  18. package/dist/shaka-player.compiled.debug.map +4 -4
  19. package/dist/shaka-player.compiled.externs.js +49 -38
  20. package/dist/shaka-player.compiled.js +789 -785
  21. package/dist/shaka-player.compiled.map +4 -4
  22. package/dist/shaka-player.ui.d.ts +12 -1
  23. package/dist/shaka-player.ui.debug.d.ts +12 -1
  24. package/dist/shaka-player.ui.debug.externs.js +49 -38
  25. package/dist/shaka-player.ui.debug.js +187 -179
  26. package/dist/shaka-player.ui.debug.map +4 -4
  27. package/dist/shaka-player.ui.externs.js +49 -38
  28. package/dist/shaka-player.ui.js +916 -912
  29. package/dist/shaka-player.ui.map +4 -4
  30. package/docs/tutorials/ui.md +6 -6
  31. package/docs/tutorials/upgrade.md +1 -0
  32. package/docs/tutorials/welcome.md +6 -3
  33. package/karma.conf.js +3 -11
  34. package/lib/ads/client_side_ad_manager.js +1 -1
  35. package/lib/dash/dash_parser.js +5 -0
  36. package/lib/hls/hls_parser.js +6 -2
  37. package/lib/media/drm_engine.js +1 -1
  38. package/lib/media/media_source_engine.js +57 -24
  39. package/lib/media/presentation_timeline.js +24 -1
  40. package/lib/media/streaming_engine.js +4 -4
  41. package/lib/media/time_ranges_utils.js +46 -0
  42. package/lib/player.js +13 -6
  43. package/lib/polyfill/media_capabilities.js +9 -0
  44. package/lib/polyfill/videoplaybackquality.js +3 -1
  45. package/lib/text/cue.js +0 -5
  46. package/lib/text/simple_text_displayer.js +21 -9
  47. package/lib/text/ui_text_displayer.js +91 -19
  48. package/lib/util/buffer_utils.js +3 -0
  49. package/lib/util/object_utils.js +1 -0
  50. package/lib/util/platform.js +19 -1
  51. package/lib/util/player_configuration.js +1 -0
  52. package/lib/util/stream_utils.js +23 -3
  53. package/lib/util/string_utils.js +102 -13
  54. package/maintained-branches.md +15 -0
  55. package/package.json +3 -5
  56. package/test/media/drm_engine_integration.js +24 -8
  57. package/test/media/drm_engine_unit.js +29 -0
  58. package/test/media/media_source_engine_integration.js +24 -10
  59. package/test/media/media_source_engine_unit.js +53 -38
  60. package/test/media/streaming_engine_unit.js +28 -27
  61. package/test/player_src_equals_integration.js +2 -0
  62. package/test/player_unit.js +39 -1
  63. package/test/test/assets/small.mp4 +0 -0
  64. package/test/test/util/fake_media_source_engine.js +10 -9
  65. package/test/text/simple_text_displayer_unit.js +27 -0
  66. package/test/text/ui_text_displayer_unit.js +65 -0
  67. package/test/util/string_utils_unit.js +46 -8
  68. package/ui/less/ad_controls.less +4 -0
  69. package/ui/text_selection.js +2 -2
  70. package/app-engine/README.md +0 -9
  71. package/app-engine/demo-version-index/README.md +0 -14
  72. package/app-engine/demo-version-index/app.yaml +0 -28
  73. package/app-engine/demo-version-index/generate.py +0 -164
  74. package/app-engine/demo-version-index/main.py +0 -11
  75. package/app-engine/demo-version-index/requirements.txt +0 -5
  76. package/app-engine/demo-version-index/templates/index.html +0 -114
  77. package/app-engine/shaka-player-demo/README.md +0 -18
  78. package/app-engine/shaka-player-demo/app.yaml +0 -61
  79. package/app-engine/shaka-player-demo/main.py +0 -95
  80. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  81. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  82. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  83. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  84. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  85. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  86. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  87. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  88. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  89. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  90. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  91. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  92. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  93. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  94. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  95. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  96. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  97. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  98. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  99. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  100. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  101. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  102. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  103. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  104. package/app-engine/shaka-player-demo/posters/sources.txt +0 -46
  105. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  106. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  107. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  108. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  109. package/app-engine/shaka-player-demo/posters.py +0 -110
  110. package/app-engine/shaka-player-demo/requirements.txt +0 -5
  111. package/app-engine/shaka-player-demo/time.txt +0 -1
  112. package/build/README.md +0 -127
  113. package/build/__init__.py +0 -0
  114. package/build/all.py +0 -150
  115. package/build/apps.py +0 -186
  116. package/build/build.py +0 -392
  117. package/build/check.py +0 -354
  118. package/build/checkversion.py +0 -84
  119. package/build/compiler.py +0 -513
  120. package/build/conformance.textproto +0 -335
  121. package/build/docker/Dockerfile +0 -20
  122. package/build/docker/docker-compose.yml +0 -10
  123. package/build/docs.py +0 -54
  124. package/build/eslint-plugin-shaka-rules/arg-comment-spacing.js +0 -72
  125. package/build/eslint-plugin-shaka-rules/index.js +0 -24
  126. package/build/eslint-plugin-shaka-rules/package.json +0 -7
  127. package/build/eslint-plugin-shaka-rules/private.js +0 -109
  128. package/build/gendeps.py +0 -71
  129. package/build/generateExterns.js +0 -867
  130. package/build/generateLocalizations.py +0 -262
  131. package/build/generateTsDefs.py +0 -137
  132. package/build/install-linux-prereqs.sh +0 -136
  133. package/build/license-header +0 -5
  134. package/build/misspellings.txt +0 -39
  135. package/build/pixelsChanged.js +0 -35
  136. package/build/shaka-lab.yaml +0 -161
  137. package/build/shakaBuildHelpers.py +0 -356
  138. package/build/stats.py +0 -816
  139. package/build/subprocessWindowsPatch.py +0 -103
  140. package/build/test.py +0 -541
  141. package/build/types/ads +0 -8
  142. package/build/types/cast +0 -6
  143. package/build/types/cea +0 -13
  144. package/build/types/complete +0 -9
  145. package/build/types/core +0 -108
  146. package/build/types/dash +0 -8
  147. package/build/types/hls +0 -9
  148. package/build/types/manifests +0 -5
  149. package/build/types/networking +0 -6
  150. package/build/types/offline +0 -22
  151. package/build/types/polyfill +0 -18
  152. package/build/types/text +0 -11
  153. package/build/types/ui +0 -39
  154. package/build/updateScreenshots.py +0 -85
  155. package/build/wrapper.template.js +0 -52
@@ -61,7 +61,6 @@ shaka.text.Cue.prototype.direction;
61
61
  shaka.text.Cue.prototype.endTime;
62
62
  /**
63
63
  * @override
64
- * @type {string}
65
64
  */
66
65
  shaka.text.Cue.prototype.payload;
67
66
  /**
@@ -386,6 +385,7 @@ shaka.util.BufferUtils = class {
386
385
  * @param {?BufferSource} arr1
387
386
  * @param {?BufferSource} arr2
388
387
  * @return {boolean}
388
+ * @suppress {strictMissingProperties}
389
389
  */
390
390
  static equal(arr1, arr2) {}
391
391
  /**
@@ -653,6 +653,43 @@ shaka.util.Error.Code = {
653
653
  'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
654
654
  'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
655
655
  };
656
+ /**
657
+ * A timer allows a single function to be executed at a later time or at
658
+ * regular intervals.
659
+ * @final
660
+ */
661
+ shaka.util.Timer = class {
662
+ /**
663
+ * Create a new timer. A timer is committed to a single callback function.
664
+ * While there is no technical reason to do this, it is far easier to
665
+ * understand and use timers when they are connected to one functional idea.
666
+ * @param {function()} onTick
667
+ */
668
+ constructor(onTick) {}
669
+ /**
670
+ * Have the timer call |onTick| now.
671
+ * @return {!shaka.util.Timer}
672
+ */
673
+ tickNow() {}
674
+ /**
675
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
676
+ * called first.
677
+ * @param {number} seconds
678
+ * @return {!shaka.util.Timer}
679
+ */
680
+ tickAfter(seconds) {}
681
+ /**
682
+ * Have the timer call |onTick| every |seconds| until |stop| is called.
683
+ * @param {number} seconds
684
+ * @return {!shaka.util.Timer}
685
+ */
686
+ tickEvery(seconds) {}
687
+ /**
688
+ * Stop the timer and clear the previous behaviour. The timer is still usable
689
+ * after calling |stop|.
690
+ */
691
+ stop() {}
692
+ };
656
693
  /**
657
694
  * @namespace shaka.util.StringUtils
658
695
  * @summary A set of string utility functions.
@@ -928,43 +965,6 @@ shaka.util.LanguageUtils = class {
928
965
  */
929
966
  static findClosestLocale(target, searchSpace) {}
930
967
  };
931
- /**
932
- * A timer allows a single function to be executed at a later time or at
933
- * regular intervals.
934
- * @final
935
- */
936
- shaka.util.Timer = class {
937
- /**
938
- * Create a new timer. A timer is committed to a single callback function.
939
- * While there is no technical reason to do this, it is far easier to
940
- * understand and use timers when they are connected to one functional idea.
941
- * @param {function()} onTick
942
- */
943
- constructor(onTick) {}
944
- /**
945
- * Have the timer call |onTick| now.
946
- * @return {!shaka.util.Timer}
947
- */
948
- tickNow() {}
949
- /**
950
- * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
951
- * called first.
952
- * @param {number} seconds
953
- * @return {!shaka.util.Timer}
954
- */
955
- tickAfter(seconds) {}
956
- /**
957
- * Have the timer call |onTick| every |seconds| until |stop| is called.
958
- * @param {number} seconds
959
- * @return {!shaka.util.Timer}
960
- */
961
- tickEvery(seconds) {}
962
- /**
963
- * Stop the timer and clear the previous behaviour. The timer is still usable
964
- * after calling |stop|.
965
- */
966
- stop() {}
967
- };
968
968
  /**
969
969
  * @summary
970
970
  * <p>
@@ -1835,6 +1835,17 @@ shaka.media.PresentationTimeline = class {
1835
1835
  * @param {!Array.<!shaka.media.SegmentReference>} references
1836
1836
  */
1837
1837
  notifySegments(references) {}
1838
+ /**
1839
+ * Lock the presentation timeline's start time. After this is called, no
1840
+ * further adjustments to presentationStartTime_ will be permitted.
1841
+ * This should be called after all Periods have been parsed, and all calls to
1842
+ * notifySegments() from the initial manifest parse have been made.
1843
+ * Without this, we can get assertion failures in SegmentIndex for certain
1844
+ * DAI content. If DAI adds ad segments to the manifest faster than
1845
+ * real-time, adjustments to presentationStartTime_ can cause availability
1846
+ * windows to jump around on updates.
1847
+ */
1848
+ lockStartTime() {}
1838
1849
  /**
1839
1850
  * Gives PresentationTimeline a Stream's minimum segment start time.
1840
1851
  * @param {number} startTime