shaka-player 4.6.14 → 4.6.16

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 (126) hide show
  1. package/.github/workflows/appspot.yaml +4 -4
  2. package/.github/workflows/build-and-test.yaml +6 -6
  3. package/.github/workflows/custom-actions/set-commit-status/action.yaml +29 -7
  4. package/.github/workflows/demo-version-index.yaml +3 -3
  5. package/.github/workflows/nightly-demo.yaml +4 -4
  6. package/.github/workflows/release-please.yaml +24 -23
  7. package/.github/workflows/report-incremental-coverage.yaml +1 -1
  8. package/.github/workflows/selenium-lab-tests.yaml +30 -18
  9. package/.github/workflows/shaka-bot-commands/lib.sh +37 -12
  10. package/.github/workflows/shaka-bot-commands/main.sh +4 -2
  11. package/.github/workflows/sync-labels.yaml +1 -1
  12. package/.github/workflows/talk-to-shaka-bot.yaml +2 -1
  13. package/.github/workflows/update-issues.yaml +1 -1
  14. package/.github/workflows/update-screenshots.yaml +25 -38
  15. package/CHANGELOG.md +47 -0
  16. package/README.md +2 -4
  17. package/demo/demo.less +1 -5
  18. package/dist/controls.css +1 -1
  19. package/dist/controls.css.map +1 -1
  20. package/dist/demo.css +1 -1
  21. package/dist/demo.css.map +1 -1
  22. package/dist/deps.js +4 -5
  23. package/dist/locales.js +30 -30
  24. package/dist/shaka-player.compiled.d.ts +12 -10
  25. package/dist/shaka-player.compiled.debug.d.ts +12 -10
  26. package/dist/shaka-player.compiled.debug.externs.js +78 -64
  27. package/dist/shaka-player.compiled.debug.js +173 -165
  28. package/dist/shaka-player.compiled.debug.map +4 -4
  29. package/dist/shaka-player.compiled.externs.js +78 -64
  30. package/dist/shaka-player.compiled.js +1100 -1094
  31. package/dist/shaka-player.compiled.map +4 -4
  32. package/dist/shaka-player.ui.d.ts +12 -10
  33. package/dist/shaka-player.ui.debug.d.ts +12 -10
  34. package/dist/shaka-player.ui.debug.externs.js +78 -64
  35. package/dist/shaka-player.ui.debug.js +184 -175
  36. package/dist/shaka-player.ui.debug.map +4 -4
  37. package/dist/shaka-player.ui.externs.js +78 -64
  38. package/dist/shaka-player.ui.js +1218 -1212
  39. package/dist/shaka-player.ui.map +4 -4
  40. package/docs/tutorials/faq.md +12 -0
  41. package/externs/shaka/player.js +32 -19
  42. package/karma.conf.js +4 -0
  43. package/lib/abr/simple_abr_manager.js +21 -26
  44. package/lib/ads/ad_manager.js +1 -1
  45. package/lib/cast/cast_proxy.js +1 -3
  46. package/lib/cast/cast_sender.js +8 -11
  47. package/lib/cea/cea608_memory.js +1 -1
  48. package/lib/cea/ts_cea_parser.js +10 -1
  49. package/lib/dash/dash_parser.js +3 -0
  50. package/lib/deprecate/deprecate.js +1 -1
  51. package/lib/hls/hls_parser.js +40 -19
  52. package/lib/media/drm_engine.js +6 -3
  53. package/lib/media/manifest_parser.js +3 -2
  54. package/lib/media/media_source_engine.js +19 -1
  55. package/lib/media/presentation_timeline.js +23 -0
  56. package/lib/media/segment_utils.js +10 -1
  57. package/lib/player.js +17 -4
  58. package/lib/polyfill/media_capabilities.js +20 -1
  59. package/lib/polyfill/mediasource.js +35 -43
  60. package/lib/text/vtt_text_parser.js +53 -52
  61. package/lib/transmuxer/h264.js +3 -3
  62. package/lib/transmuxer/h265.js +3 -3
  63. package/lib/transmuxer/ts_transmuxer.js +42 -3
  64. package/lib/util/error.js +1 -0
  65. package/lib/util/manifest_parser_utils.js +1 -0
  66. package/lib/util/mp4_parser.js +57 -0
  67. package/lib/util/platform.js +4 -0
  68. package/lib/util/ts_parser.js +101 -12
  69. package/package.json +2 -2
  70. package/test/cast/cast_proxy_unit.js +0 -46
  71. package/test/cast/cast_sender_unit.js +26 -26
  72. package/test/cea/cea608_memory_unit.js +3 -2
  73. package/test/hls/hls_live_unit.js +52 -0
  74. package/test/hls/hls_parser_integration.js +86 -0
  75. package/test/hls/hls_parser_unit.js +28 -0
  76. package/test/media/drm_engine_unit.js +16 -0
  77. package/test/media/media_source_engine_integration.js +1 -1
  78. package/test/player_integration.js +22 -1
  79. package/test/player_load_graph_integration.js +13 -10
  80. package/test/player_src_equals_integration.js +2 -2
  81. package/test/player_unit.js +22 -4
  82. package/test/test/assets/6339/a.mp4 +0 -0
  83. package/test/test/assets/6339/master.mpd +37 -0
  84. package/test/test/assets/6339/v.mp4 +0 -0
  85. package/test/test/assets/hls-text-offset/index.m3u8 +8 -0
  86. package/test/test/assets/hls-text-offset/playlist-video.m3u8 +22 -0
  87. package/test/test/assets/hls-text-offset/playlist-vtt.m3u8 +22 -0
  88. package/test/test/assets/hls-text-offset/video-0000000069.ts +0 -0
  89. package/test/test/assets/hls-text-offset/video-0000000070.ts +0 -0
  90. package/test/test/assets/hls-text-offset/video-0000000071.ts +0 -0
  91. package/test/test/assets/hls-text-offset/video-0000000072.ts +0 -0
  92. package/test/test/assets/hls-text-offset/video-0000000073.ts +0 -0
  93. package/test/test/assets/hls-text-offset/video-069.ts +0 -0
  94. package/test/test/assets/hls-text-offset/video-070.ts +0 -0
  95. package/test/test/assets/hls-text-offset/video-071.ts +0 -0
  96. package/test/test/assets/hls-text-offset/video-072.ts +0 -0
  97. package/test/test/assets/hls-text-offset/video-073.ts +0 -0
  98. package/test/test/assets/hls-text-offset/vtt-069.vtt +5 -0
  99. package/test/test/assets/hls-text-offset/vtt-070.vtt +5 -0
  100. package/test/test/assets/hls-text-offset/vtt-071.vtt +2 -0
  101. package/test/test/assets/hls-text-offset/vtt-072.vtt +2 -0
  102. package/test/test/assets/hls-text-offset/vtt-073.vtt +5 -0
  103. package/test/test/assets/hls-ts-h265/index.m3u8 +2 -0
  104. package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +5 -1
  105. package/test/test/assets/hls-ts-raw-aac/fileSequence0.ts +0 -0
  106. package/test/test/assets/hls-ts-raw-aac/fileSequence1.ts +0 -0
  107. package/test/test/assets/hls-ts-raw-aac/fileSequence2.ts +0 -0
  108. package/test/test/assets/hls-ts-raw-aac/fileSequence3.ts +0 -0
  109. package/test/test/assets/hls-ts-raw-aac/index.m3u8 +4 -0
  110. package/test/test/assets/hls-ts-raw-aac/playlist.m3u8 +14 -0
  111. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000024.ts +0 -0
  112. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000025.ts +0 -0
  113. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000026.ts +0 -0
  114. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000027.ts +0 -0
  115. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000028.ts +0 -0
  116. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000029.ts +0 -0
  117. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000030.ts +0 -0
  118. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000031.ts +0 -0
  119. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000032.ts +0 -0
  120. package/test/test/assets/hls-ts-rollover/360p30_h264_48k_160_aac_ts-0000000033.ts +0 -0
  121. package/test/test/assets/hls-ts-rollover/playlist.m3u8 +39 -0
  122. package/test/test/externs/jasmine.js +2 -1
  123. package/test/text/vtt_text_parser_unit.js +43 -59
  124. package/test/transmuxer/transmuxer_integration.js +60 -53
  125. package/ui/less/containers.less +1 -0
  126. package/lib/polyfill/storage_estimate.js +0 -57
@@ -60,6 +60,59 @@ shaka.util.IReleasable = class {
60
60
  */
61
61
  release() {}
62
62
  };
63
+ /**
64
+ * @summary
65
+ * An EventManager maintains a collection of "event
66
+ * bindings" between event targets and event listeners.
67
+ * @implements {shaka.util.IReleasable}
68
+ */
69
+ shaka.util.EventManager = class {
70
+ /** */
71
+ constructor() {}
72
+ /**
73
+ * Detaches all event listeners.
74
+ * @override
75
+ */
76
+ release() {}
77
+ /**
78
+ * Attaches an event listener to an event target.
79
+ * @param {EventTarget} target The event target.
80
+ * @param {string} type The event type.
81
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
82
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
83
+ * specifies characteristics about the event listener.
84
+ * The passive option, if true, indicates that this function will never
85
+ * call preventDefault(), which improves scrolling performance.
86
+ */
87
+ listen(target, type, listener, options) {}
88
+ /**
89
+ * Attaches an event listener to an event target. The listener will be
90
+ * removed when the first instance of the event is fired.
91
+ * @param {EventTarget} target The event target.
92
+ * @param {string} type The event type.
93
+ * @param {shaka.util.EventManager.ListenerType} listener The event listener.
94
+ * @param {(boolean|!AddEventListenerOptions)=} options An object that
95
+ * specifies characteristics about the event listener.
96
+ * The passive option, if true, indicates that this function will never
97
+ * call preventDefault(), which improves scrolling performance.
98
+ */
99
+ listenOnce(target, type, listener, options) {}
100
+ /**
101
+ * Detaches an event listener from an event target.
102
+ * @param {EventTarget} target The event target.
103
+ * @param {string} type The event type.
104
+ * @param {shaka.util.EventManager.ListenerType=} listener The event listener.
105
+ */
106
+ unlisten(target, type, listener) {}
107
+ /**
108
+ * Detaches all event listeners from all targets.
109
+ */
110
+ removeAll() {}
111
+ };
112
+ /**
113
+ * @typedef {function(!Event)}
114
+ */
115
+ shaka.util.EventManager.ListenerType;
63
116
  /**
64
117
  * @summary A set of BufferSource utility functions.
65
118
  */
@@ -1571,59 +1624,6 @@ shaka.net.NetworkingEngine.OnRequest;
1571
1624
  * new URI and the second string is the old URI.
1572
1625
  */
1573
1626
  shaka.net.NetworkingEngine.OnRetry;
1574
- /**
1575
- * @summary
1576
- * An EventManager maintains a collection of "event
1577
- * bindings" between event targets and event listeners.
1578
- * @implements {shaka.util.IReleasable}
1579
- */
1580
- shaka.util.EventManager = class {
1581
- /** */
1582
- constructor() {}
1583
- /**
1584
- * Detaches all event listeners.
1585
- * @override
1586
- */
1587
- release() {}
1588
- /**
1589
- * Attaches an event listener to an event target.
1590
- * @param {EventTarget} target The event target.
1591
- * @param {string} type The event type.
1592
- * @param {shaka.util.EventManager.ListenerType} listener The event listener.
1593
- * @param {(boolean|!AddEventListenerOptions)=} options An object that
1594
- * specifies characteristics about the event listener.
1595
- * The passive option, if true, indicates that this function will never
1596
- * call preventDefault(), which improves scrolling performance.
1597
- */
1598
- listen(target, type, listener, options) {}
1599
- /**
1600
- * Attaches an event listener to an event target. The listener will be
1601
- * removed when the first instance of the event is fired.
1602
- * @param {EventTarget} target The event target.
1603
- * @param {string} type The event type.
1604
- * @param {shaka.util.EventManager.ListenerType} listener The event listener.
1605
- * @param {(boolean|!AddEventListenerOptions)=} options An object that
1606
- * specifies characteristics about the event listener.
1607
- * The passive option, if true, indicates that this function will never
1608
- * call preventDefault(), which improves scrolling performance.
1609
- */
1610
- listenOnce(target, type, listener, options) {}
1611
- /**
1612
- * Detaches an event listener from an event target.
1613
- * @param {EventTarget} target The event target.
1614
- * @param {string} type The event type.
1615
- * @param {shaka.util.EventManager.ListenerType=} listener The event listener.
1616
- */
1617
- unlisten(target, type, listener) {}
1618
- /**
1619
- * Detaches all event listeners from all targets.
1620
- */
1621
- removeAll() {}
1622
- };
1623
- /**
1624
- * @typedef {function(!Event)}
1625
- */
1626
- shaka.util.EventManager.ListenerType;
1627
1627
  /**
1628
1628
  * @namespace shaka.util.StringUtils
1629
1629
  * @summary A set of string utility functions.
@@ -1824,6 +1824,14 @@ shaka.util.Mp4Parser = class {
1824
1824
  * @param {!shaka.extern.ParsedBox} box
1825
1825
  */
1826
1826
  static visualSampleEntry(box) {}
1827
+ /**
1828
+ * A callback that tells the Mp4 parser to treat the body of a box as a audio
1829
+ * sample entry. A audio sample entry has some fixed-sized fields
1830
+ * describing the audio codec parameters, followed by an arbitrary number of
1831
+ * appended children. Each child is a box.
1832
+ * @param {!shaka.extern.ParsedBox} box
1833
+ */
1834
+ static audioSampleEntry(box) {}
1827
1835
  /**
1828
1836
  * Create a callback that tells the Mp4 parser to treat the body of a box as a
1829
1837
  * binary blob and to parse the body's contents using the provided callback.
@@ -2422,6 +2430,15 @@ shaka.media.PresentationTimeline = class {
2422
2430
  * @return {boolean}
2423
2431
  */
2424
2432
  isStartTimeLocked() {}
2433
+ /**
2434
+ * Sets the initial program date time.
2435
+ * @param {number} initialProgramDateTime
2436
+ */
2437
+ setInitialProgramDateTime(initialProgramDateTime) {}
2438
+ /**
2439
+ * @return {?number} The initial program date time in seconds.
2440
+ */
2441
+ getInitialProgramDateTime() {}
2425
2442
  /**
2426
2443
  * Gives PresentationTimeline a Stream's minimum segment start time.
2427
2444
  * @param {number} startTime
@@ -4832,6 +4849,14 @@ shaka.polyfill.MediaCapabilities.originalMcap;
4832
4849
  */
4833
4850
  shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_ = {
4834
4851
 
4852
+ };
4853
+ /**
4854
+ * A cache that stores the canDisplayType result of calling
4855
+ * `cast.__platform__.canDisplayType`.
4856
+ * @type {(Object<(!string), (!boolean)>)}
4857
+ */
4858
+ shaka.polyfill.MediaCapabilities.memoizedCanDisplayTypeRequests_ = {
4859
+
4835
4860
  };
4836
4861
  /**
4837
4862
  * @summary A polyfill to patch MSE bugs.
@@ -4910,17 +4935,6 @@ shaka.polyfill.RandomUUID = class {
4910
4935
  */
4911
4936
  static install() {}
4912
4937
  };
4913
- /**
4914
- * @summary A polyfill to provide navigator.storage.estimate in old
4915
- * webkit browsers.
4916
- * See: https://developers.google.com/web/updates/2017/08/estimating-available-storage-space#the-present
4917
- */
4918
- shaka.polyfill.StorageEstimate = class {
4919
- /**
4920
- * Install the polyfill if needed.
4921
- */
4922
- static install() {}
4923
- };
4924
4938
  /**
4925
4939
  * @summary A polyfill to provide Symbol.prototype.description in all browsers.
4926
4940
  * See: https://caniuse.com/mdn-javascript_builtins_symbol_description