shaka-player 3.2.14 → 3.2.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 (59) hide show
  1. package/AUTHORS +1 -0
  2. package/CHANGELOG.md +31 -0
  3. package/CONTRIBUTORS +1 -0
  4. package/dist/deps.js +2 -2
  5. package/dist/locales.js +31 -31
  6. package/dist/shaka-player.compiled.d.ts +1 -1
  7. package/dist/shaka-player.compiled.debug.d.ts +1 -1
  8. package/dist/shaka-player.compiled.debug.externs.js +2 -1
  9. package/dist/shaka-player.compiled.debug.js +202 -193
  10. package/dist/shaka-player.compiled.debug.map +3 -3
  11. package/dist/shaka-player.compiled.externs.js +2 -1
  12. package/dist/shaka-player.compiled.js +729 -724
  13. package/dist/shaka-player.compiled.map +3 -3
  14. package/dist/shaka-player.ui.d.ts +1 -1
  15. package/dist/shaka-player.ui.debug.d.ts +1 -1
  16. package/dist/shaka-player.ui.debug.externs.js +2 -1
  17. package/dist/shaka-player.ui.debug.js +241 -232
  18. package/dist/shaka-player.ui.debug.map +3 -3
  19. package/dist/shaka-player.ui.externs.js +2 -1
  20. package/dist/shaka-player.ui.js +847 -843
  21. package/dist/shaka-player.ui.map +3 -3
  22. package/docs/tutorials/welcome.md +2 -2
  23. package/externs/shaka/player.js +2 -1
  24. package/lib/cast/cast_proxy.js +2 -1
  25. package/lib/cast/cast_receiver.js +19 -5
  26. package/lib/cast/cast_sender.js +2 -1
  27. package/lib/cast/cast_utils.js +16 -6
  28. package/lib/cea/cea708_window.js +2 -2
  29. package/lib/dash/segment_template.js +1 -1
  30. package/lib/hls/hls_parser.js +9 -1
  31. package/lib/media/content_workarounds.js +12 -0
  32. package/lib/media/playhead.js +23 -1
  33. package/lib/media/streaming_engine.js +3 -12
  34. package/lib/player.js +24 -11
  35. package/lib/polyfill/media_capabilities.js +59 -9
  36. package/lib/text/ttml_text_parser.js +32 -7
  37. package/lib/text/ui_text_displayer.js +22 -5
  38. package/lib/util/manifest_parser_utils.js +4 -0
  39. package/lib/util/platform.js +21 -2
  40. package/lib/util/stream_utils.js +30 -10
  41. package/package.json +1 -1
  42. package/test/cast/cast_receiver_integration.js +97 -16
  43. package/test/cast/cast_receiver_unit.js +17 -12
  44. package/test/cast/cast_utils_unit.js +1 -0
  45. package/test/dash/dash_parser_manifest_unit.js +1 -0
  46. package/test/hls/hls_parser_unit.js +1 -0
  47. package/test/media/playhead_unit.js +41 -0
  48. package/test/media/streaming_engine_integration.js +13 -0
  49. package/test/media/streaming_engine_unit.js +23 -8
  50. package/test/player_unit.js +87 -0
  51. package/test/polyfill/media_capabilities_unit.js +261 -0
  52. package/test/test/util/simple_fakes.js +3 -0
  53. package/test/text/mp4_ttml_parser_unit.js +4 -4
  54. package/test/text/ttml_text_parser_unit.js +117 -84
  55. package/test/text/ui_text_displayer_unit.js +76 -0
  56. package/test/ui/text_displayer_layout_unit.js +14 -0
  57. package/test/util/stream_utils_unit.js +18 -0
  58. package/test/util/xml_utils_unit.js +6 -1
  59. package/ui/controls.js +5 -2
package/AUTHORS CHANGED
@@ -60,6 +60,7 @@ Philo Inc. <*@philo.com>
60
60
  Prakash <duggaraju@gmail.com>
61
61
  Robert Colantuoni <rgc@colantuoni.com>
62
62
  Robert Galluccio <robertnw5@gmail.com>
63
+ Rodolphe Breton <robloche@gmail.com>
63
64
  Roi Lipman <roilipman@gmail.com>
64
65
  Roksolana Ivanyshyn <roksolana.ivanyshyn.pub@gmail.com>
65
66
  Rostislav Hejduk <Ross-cz@users.noreply.github.com>
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.2.16](https://github.com/shaka-project/shaka-player/compare/v3.2.15...v3.2.16) (2022-12-08)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * 4676 - Virgin Media set top box is incorrectly categorized as Apple/Safari ([#4678](https://github.com/shaka-project/shaka-player/issues/4678)) ([65e9716](https://github.com/shaka-project/shaka-player/commit/65e9716a2073dffa6fba146d71d6fb2633654994)), closes [#4676](https://github.com/shaka-project/shaka-player/issues/4676)
9
+ * **cast:** Use cast platform APIs in MediaCapabilties polyfill ([#4727](https://github.com/shaka-project/shaka-player/issues/4727)) ([737dd27](https://github.com/shaka-project/shaka-player/commit/737dd272d6ecec34f00824a438d22e1048e5e213))
10
+ * **cea:** Fix MAX_ROWS in CEA-708 window ([#4757](https://github.com/shaka-project/shaka-player/issues/4757)) ([9dbcc05](https://github.com/shaka-project/shaka-player/commit/9dbcc05a7538c77b3b49c1f67a7aa5f3589d5d20))
11
+ * Fix bufferBehind setting broken by image segments ([#4718](https://github.com/shaka-project/shaka-player/issues/4718)) ([54f7a5c](https://github.com/shaka-project/shaka-player/commit/54f7a5cd88159c77cbb9f740ab6194babeb24c2d)), closes [#4717](https://github.com/shaka-project/shaka-player/issues/4717)
12
+ * Fix DRM workaround for Tizen and Xbox with hvc1/hev1 boxes ([#4743](https://github.com/shaka-project/shaka-player/issues/4743)) ([b56bd28](https://github.com/shaka-project/shaka-player/commit/b56bd2871f31bf438186c93d0e5c423f7597bf83)), closes [#4742](https://github.com/shaka-project/shaka-player/issues/4742)
13
+ * Fix subtitles not added to DOM region ([#4733](https://github.com/shaka-project/shaka-player/issues/4733)) ([7f0e059](https://github.com/shaka-project/shaka-player/commit/7f0e0596bc266cc7c1e7cfdf96e3aab7ae3b19eb)), closes [#4680](https://github.com/shaka-project/shaka-player/issues/4680)
14
+ * **HLS:** Fix lowLatencyPresentationDelay when using autoLowLatencyMode ([#4712](https://github.com/shaka-project/shaka-player/issues/4712)) ([984316d](https://github.com/shaka-project/shaka-player/commit/984316daff83b4ac7a3846ce6f6a496c083e9888))
15
+ * **HLS:** Fix support legacy AVC1 codec used in HLS ([#4716](https://github.com/shaka-project/shaka-player/issues/4716)) ([a481596](https://github.com/shaka-project/shaka-player/commit/a4815966a397f4b6a30ff169a16fefb797b82e71))
16
+ * **HLS:** Single alternative video renditions not working ([#4785](https://github.com/shaka-project/shaka-player/issues/4785)) ([20900a9](https://github.com/shaka-project/shaka-player/commit/20900a97579c23d3f7f14592acaf065a30711b6b))
17
+ * **TTML:** Add font-family mapping ([#4801](https://github.com/shaka-project/shaka-player/issues/4801)) ([3827873](https://github.com/shaka-project/shaka-player/commit/382787360f2c53b27db0be4dc704e9d018515e08))
18
+ * **TTML:** Fix duplicate cues overlapping segment boundaries ([#4798](https://github.com/shaka-project/shaka-player/issues/4798)) ([021d7bd](https://github.com/shaka-project/shaka-player/commit/021d7bd65e8d394c0c050fd7aaa1d9e990c1a640)), closes [#4631](https://github.com/shaka-project/shaka-player/issues/4631)
19
+ * **ui:** Check event cancelable before event.preventDefault ([#4690](https://github.com/shaka-project/shaka-player/issues/4690)) ([9864b88](https://github.com/shaka-project/shaka-player/commit/9864b8804aeabff5eb146c921fc82c254d040ce0))
20
+ * WebVTT line not correctly positioned in UITextDisplayer ([#4567](https://github.com/shaka-project/shaka-player/issues/4567)) ([#4682](https://github.com/shaka-project/shaka-player/issues/4682)) ([7c7be7c](https://github.com/shaka-project/shaka-player/commit/7c7be7c0c201b8d945bcd18efd75d08becc01efb))
21
+
22
+ ## [3.2.15](https://github.com/shaka-project/shaka-player/compare/v3.2.14...v3.2.15) (2022-11-09)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * Allow overriding special handling of 404s ([#4635](https://github.com/shaka-project/shaka-player/issues/4635)) ([43598b4](https://github.com/shaka-project/shaka-player/commit/43598b4670fdc95c7a25d3212f3533e3543e1371)), closes [#4548](https://github.com/shaka-project/shaka-player/issues/4548)
28
+ * **cast:** Reduce size of Cast update messages ([#4644](https://github.com/shaka-project/shaka-player/issues/4644)) ([b36b95d](https://github.com/shaka-project/shaka-player/commit/b36b95db0ebfd718286be1281d51304a62d72159))
29
+ * Content reload starttime with HLS on iOS ([#4575](https://github.com/shaka-project/shaka-player/issues/4575)) ([f51f283](https://github.com/shaka-project/shaka-player/commit/f51f283f43d1f2123ca9962b66f16d553a61eddb)), closes [#4244](https://github.com/shaka-project/shaka-player/issues/4244)
30
+ * Fix detection of ac4, dts, and dolby h265 ([#4657](https://github.com/shaka-project/shaka-player/issues/4657)) ([1adc00a](https://github.com/shaka-project/shaka-player/commit/1adc00aec51b0a37926a9f6fdfcd28f0304f049b))
31
+ * **HLS:** Fix detection of WebVTT subtitles in HLS by extension ([#4663](https://github.com/shaka-project/shaka-player/issues/4663)) ([8440e01](https://github.com/shaka-project/shaka-player/commit/8440e01f756226e8c3c0e5967ef504efefce4b72))
32
+ * **ui:** Fix exception on screen rotation if fullscreen is not supported ([#4669](https://github.com/shaka-project/shaka-player/issues/4669)) ([cbefdb8](https://github.com/shaka-project/shaka-player/commit/cbefdb89078d524b54fbcc298923fbdc9e89ce21))
33
+
3
34
  ## [3.2.14](https://github.com/shaka-project/shaka-player/compare/v3.2.13...v3.2.14) (2022-10-29)
4
35
 
5
36
 
package/CONTRIBUTORS CHANGED
@@ -89,6 +89,7 @@ Peter Nycander <peter.nycander@gmail.com>
89
89
  Prakash Duggaraju <duggaraju@gmail.com>
90
90
  Robert Colantuoni <rgc@colantuoni.com>
91
91
  Robert Galluccio <robertnw5@gmail.com>
92
+ Rodolphe Breton <robloche@gmail.com>
92
93
  Rohit Makasana <rohitbm@google.com>
93
94
  Roi Lipman <roilipman@gmail.com>
94
95
  Roksolana Ivanyshyn <roksolana.ivanyshyn.pub@gmail.com>
package/dist/deps.js CHANGED
@@ -68,7 +68,7 @@ goog.addDependency('../../../../lib/media/manifest_parser.js', ['shaka.media.Man
68
68
  goog.addDependency('../../../../lib/media/media_source_engine.js', ['shaka.media.MediaSourceEngine'], ['goog.asserts', 'shaka.log', 'shaka.media.ContentWorkarounds', 'shaka.media.IClosedCaptionParser', 'shaka.media.TimeRangesUtils', 'shaka.media.Transmuxer', 'shaka.text.TextEngine', 'shaka.util.Destroyer', 'shaka.util.Error', 'shaka.util.EventManager', 'shaka.util.Functional', 'shaka.util.IDestroyable', 'shaka.util.ManifestParserUtils', 'shaka.util.MimeUtils', 'shaka.util.Platform', 'shaka.util.PublicPromise'], {'lang': 'es8'});
69
69
  goog.addDependency('../../../../lib/media/mp4_segment_index_parser.js', ['shaka.media.Mp4SegmentIndexParser'], ['goog.asserts', 'shaka.log', 'shaka.media.InitSegmentReference', 'shaka.media.SegmentReference', 'shaka.util.Error', 'shaka.util.Mp4Parser'], {'lang': 'es6'});
70
70
  goog.addDependency('../../../../lib/media/play_rate_controller.js', ['shaka.media.PlayRateController'], ['goog.asserts', 'shaka.log', 'shaka.util.IReleasable', 'shaka.util.Timer'], {'lang': 'es6'});
71
- goog.addDependency('../../../../lib/media/playhead.js', ['shaka.media.MediaSourcePlayhead', 'shaka.media.Playhead', 'shaka.media.SrcEqualsPlayhead'], ['goog.asserts', 'shaka.log', 'shaka.media.GapJumpingController', 'shaka.media.StallDetector', 'shaka.media.StallDetector.MediaElementImplementation', 'shaka.media.TimeRangesUtils', 'shaka.media.VideoWrapper', 'shaka.util.EventManager', 'shaka.util.IReleasable', 'shaka.util.MediaReadyState', 'shaka.util.Timer'], {'lang': 'es6'});
71
+ goog.addDependency('../../../../lib/media/playhead.js', ['shaka.media.MediaSourcePlayhead', 'shaka.media.Playhead', 'shaka.media.SrcEqualsPlayhead'], ['goog.asserts', 'shaka.log', 'shaka.media.GapJumpingController', 'shaka.media.StallDetector', 'shaka.media.StallDetector.MediaElementImplementation', 'shaka.media.TimeRangesUtils', 'shaka.media.VideoWrapper', 'shaka.util.EventManager', 'shaka.util.IReleasable', 'shaka.util.MediaReadyState', 'shaka.util.Timer'], {'lang': 'es8'});
72
72
  goog.addDependency('../../../../lib/media/playhead_observer.js', ['shaka.media.IPlayheadObserver', 'shaka.media.PlayheadObserverManager'], ['shaka.util.IReleasable', 'shaka.util.Timer'], {'lang': 'es6'});
73
73
  goog.addDependency('../../../../lib/media/presentation_timeline.js', ['shaka.media.PresentationTimeline'], ['goog.asserts', 'shaka.log', 'shaka.media.SegmentReference'], {'lang': 'es6'});
74
74
  goog.addDependency('../../../../lib/media/region_observer.js', ['shaka.media.RegionObserver'], ['shaka.media.IPlayheadObserver', 'shaka.media.RegionTimeline', 'shaka.util.EventManager', 'shaka.util.FakeEvent', 'shaka.util.FakeEventTarget'], {'lang': 'es6'});
@@ -112,7 +112,7 @@ goog.addDependency('../../../../lib/polyfill/aria.js', ['shaka.polyfill.Aria'],
112
112
  goog.addDependency('../../../../lib/polyfill/encryption_scheme.js', ['shaka.polyfill.EncryptionScheme'], ['shaka.polyfill'], {'lang': 'es6'});
113
113
  goog.addDependency('../../../../lib/polyfill/fullscreen.js', ['shaka.polyfill.Fullscreen'], ['shaka.polyfill'], {'lang': 'es6'});
114
114
  goog.addDependency('../../../../lib/polyfill/mathround.js', ['shaka.polyfill.MathRound'], ['shaka.log', 'shaka.polyfill'], {'lang': 'es6'});
115
- goog.addDependency('../../../../lib/polyfill/media_capabilities.js', ['shaka.polyfill.MediaCapabilities'], ['shaka.log', 'shaka.polyfill', 'shaka.util.Platform'], {'lang': 'es8'});
115
+ goog.addDependency('../../../../lib/polyfill/media_capabilities.js', ['shaka.polyfill.MediaCapabilities'], ['shaka.log', 'shaka.polyfill', 'shaka.util.Error', 'shaka.util.Platform'], {'lang': 'es8'});
116
116
  goog.addDependency('../../../../lib/polyfill/mediasource.js', ['shaka.polyfill.MediaSource'], ['shaka.log', 'shaka.polyfill', 'shaka.util.MimeUtils', 'shaka.util.Platform'], {'lang': 'es6'});
117
117
  goog.addDependency('../../../../lib/polyfill/orientation.js', ['shaka.polyfill.Orientation'], ['shaka.polyfill', 'shaka.util.FakeEvent', 'shaka.util.FakeEventTarget'], {'lang': 'es6'});
118
118
  goog.addDependency('../../../../lib/polyfill/patchedmediakeys_apple.js', ['shaka.polyfill.PatchedMediaKeysApple'], ['goog.asserts', 'shaka.log', 'shaka.media.DrmEngine', 'shaka.polyfill', 'shaka.util.BufferUtils', 'shaka.util.EventManager', 'shaka.util.FakeEvent', 'shaka.util.FakeEventTarget', 'shaka.util.MediaReadyState', 'shaka.util.PublicPromise', 'shaka.util.StringUtils'], {'lang': 'es6'});
package/dist/locales.js CHANGED
@@ -719,43 +719,43 @@ shaka.ui.Locales.addTo = function(localization) {
719
719
  * @const
720
720
  */
721
721
  shaka.ui.Locales.Ids = {
722
- LOOP: 'LOOP',
723
- NOT_APPLICABLE: 'NOT_APPLICABLE',
724
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
725
- MUTE: 'MUTE',
726
- EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
727
- AD_TIME: 'AD_TIME',
728
- BACK: 'BACK',
729
- LANGUAGE: 'LANGUAGE',
730
- PLAY: 'PLAY',
731
- UNMUTE: 'UNMUTE',
732
- OFF: 'OFF',
733
722
  SKIP_TO_LIVE: 'SKIP_TO_LIVE',
734
- REPLAY: 'REPLAY',
735
- SEEK: 'SEEK',
736
- CAST: 'CAST',
737
- AUTO_QUALITY: 'AUTO_QUALITY',
738
- ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
739
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
740
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
741
- PLAYBACK_RATE: 'PLAYBACK_RATE',
742
- VOLUME: 'VOLUME',
723
+ UNMUTE: 'UNMUTE',
743
724
  AD_PROGRESS: 'AD_PROGRESS',
725
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
726
+ ON: 'ON',
727
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
728
+ AIRPLAY: 'AIRPLAY',
744
729
  PAUSE: 'PAUSE',
730
+ FAST_FORWARD: 'FAST_FORWARD',
731
+ OFF: 'OFF',
732
+ CAPTIONS: 'CAPTIONS',
733
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
734
+ BACK: 'BACK',
735
+ NOT_APPLICABLE: 'NOT_APPLICABLE',
745
736
  SUBTITLE_FORCED: 'SUBTITLE_FORCED',
737
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
738
+ VOLUME: 'VOLUME',
739
+ FULL_SCREEN: 'FULL_SCREEN',
740
+ RESOLUTION: 'RESOLUTION',
746
741
  SKIP_AD: 'SKIP_AD',
747
- LIVE: 'LIVE',
748
- FAST_FORWARD: 'FAST_FORWARD',
749
- AD_DURATION: 'AD_DURATION',
742
+ ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
743
+ LANGUAGE: 'LANGUAGE',
750
744
  EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
751
- AIRPLAY: 'AIRPLAY',
752
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
753
- ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
754
- RESOLUTION: 'RESOLUTION',
755
- CAPTIONS: 'CAPTIONS',
745
+ CAST: 'CAST',
746
+ REPLAY: 'REPLAY',
747
+ AD_DURATION: 'AD_DURATION',
756
748
  MORE_SETTINGS: 'MORE_SETTINGS',
757
- ON: 'ON',
758
- FULL_SCREEN: 'FULL_SCREEN',
759
- REWIND: 'REWIND',
749
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
750
+ ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
751
+ LOOP: 'LOOP',
752
+ AD_TIME: 'AD_TIME',
753
+ PLAY: 'PLAY',
754
+ SEEK: 'SEEK',
755
+ EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
756
+ AUTO_QUALITY: 'AUTO_QUALITY',
757
+ MUTE: 'MUTE',
758
+ LIVE: 'LIVE',
760
759
  MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
760
+ REWIND: 'REWIND',
761
761
  };
@@ -301,7 +301,7 @@ declare namespace shaka {
301
301
  * If the player has loaded content, and streaming seen an error, but the
302
302
  * could not resume streaming, this will return <code>false</code>.
303
303
  */
304
- retryStreaming ( ) : boolean ;
304
+ retryStreaming (retryDelaySeconds ? : number ) : boolean ;
305
305
  /**
306
306
  * Get the range of time (in seconds) that seeking is allowed. If the player
307
307
  * has not loaded content, this will return a range from 0 to 0.
@@ -301,7 +301,7 @@ declare namespace shaka {
301
301
  * If the player has loaded content, and streaming seen an error, but the
302
302
  * could not resume streaming, this will return <code>false</code>.
303
303
  */
304
- retryStreaming ( ) : boolean ;
304
+ retryStreaming (retryDelaySeconds ? : number ) : boolean ;
305
305
  /**
306
306
  * Get the range of time (in seconds) that seeking is allowed. If the player
307
307
  * has not loaded content, this will return a range from 0 to 0.
@@ -2567,9 +2567,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2567
2567
  * <p>
2568
2568
  * If the player has loaded content, and streaming seen an error, but the
2569
2569
  * could not resume streaming, this will return <code>false</code>.
2570
+ * @param {number=} retryDelaySeconds
2570
2571
  * @return {boolean}
2571
2572
  */
2572
- retryStreaming() {}
2573
+ retryStreaming(retryDelaySeconds) {}
2573
2574
  /**
2574
2575
  * Get the manifest that the player has loaded. If the player has not loaded
2575
2576
  * any content, this will return <code>null</code>.