shaka-player 4.2.5 → 4.2.7

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 (45) hide show
  1. package/.github/workflows/build-and-test.yaml +13 -0
  2. package/AUTHORS +1 -0
  3. package/CHANGELOG.md +31 -0
  4. package/CONTRIBUTORS +1 -0
  5. package/dist/deps.js +1 -1
  6. package/dist/locales.js +31 -31
  7. package/dist/shaka-player.compiled.d.ts +10 -0
  8. package/dist/shaka-player.compiled.debug.d.ts +10 -0
  9. package/dist/shaka-player.compiled.debug.externs.js +12 -0
  10. package/dist/shaka-player.compiled.debug.js +252 -246
  11. package/dist/shaka-player.compiled.debug.map +3 -3
  12. package/dist/shaka-player.compiled.externs.js +12 -0
  13. package/dist/shaka-player.compiled.js +713 -708
  14. package/dist/shaka-player.compiled.map +3 -3
  15. package/dist/shaka-player.ui.d.ts +10 -0
  16. package/dist/shaka-player.ui.debug.d.ts +10 -0
  17. package/dist/shaka-player.ui.debug.externs.js +12 -0
  18. package/dist/shaka-player.ui.debug.js +266 -260
  19. package/dist/shaka-player.ui.debug.map +3 -3
  20. package/dist/shaka-player.ui.externs.js +12 -0
  21. package/dist/shaka-player.ui.js +844 -840
  22. package/dist/shaka-player.ui.map +3 -3
  23. package/lib/ads/ad_manager.js +2 -2
  24. package/lib/hls/hls_parser.js +63 -18
  25. package/lib/media/media_source_engine.js +49 -3
  26. package/lib/media/segment_index.js +5 -10
  27. package/lib/media/segment_reference.js +42 -0
  28. package/lib/media/streaming_engine.js +47 -12
  29. package/lib/player.js +12 -2
  30. package/lib/text/ui_text_displayer.js +24 -4
  31. package/lib/text/web_vtt_generator.js +21 -9
  32. package/lib/util/dom_utils.js +3 -1
  33. package/lib/util/stream_utils.js +6 -0
  34. package/lib/util/timer.js +17 -0
  35. package/package.json +1 -1
  36. package/test/hls/hls_live_unit.js +8 -30
  37. package/test/hls/hls_parser_unit.js +30 -0
  38. package/test/media/segment_index_unit.js +28 -0
  39. package/test/player_integration.js +37 -3
  40. package/test/player_unit.js +4 -2
  41. package/test/test/boot.js +29 -11
  42. package/test/test/util/manifest_parser_util.js +4 -3
  43. package/test/test/util/test_scheme.js +2 -2
  44. package/test/text/ui_text_displayer_unit.js +70 -0
  45. package/ui/controls.js +5 -1
@@ -87,6 +87,19 @@ jobs:
87
87
  if: matrix.os == 'ubuntu-latest' && matrix.browser == 'Firefox'
88
88
  run: sudo apt -y update && sudo apt -y install ffmpeg
89
89
 
90
+ # Edge 107 fails DRM tests due to an outdated Widevine CDM. Force Edge
91
+ # to update to 108+.
92
+ - name: Upgrade Edge
93
+ if: matrix.os == 'ubuntu-latest' && matrix.browser == 'Edge'
94
+ run: |
95
+ # If it's Edge 107, update it. Otherwise, don't. This way, we don't
96
+ # break something later when Edge 108+ is available by default in
97
+ # GitHub Actions.
98
+ if apt show microsoft-edge-stable | grep -q '^Version: 107'; then
99
+ wget https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_108.0.1462.46-1_amd64.deb
100
+ sudo dpkg -i microsoft-edge-stable_108.0.1462.46-1_amd64.deb
101
+ fi
102
+
90
103
  - name: Checkout code
91
104
  uses: actions/checkout@v3
92
105
  with:
package/AUTHORS CHANGED
@@ -65,6 +65,7 @@ Prakash <duggaraju@gmail.com>
65
65
  Robert Colantuoni <rgc@colantuoni.com>
66
66
  Robert Galluccio <robertnw5@gmail.com>
67
67
  Rodolphe Breton <robloche@gmail.com>
68
+ Rohan Gupta <rohangupta1528@gmail.com>
68
69
  Roi Lipman <roilipman@gmail.com>
69
70
  Roksolana Ivanyshyn <roksolana.ivanyshyn.pub@gmail.com>
70
71
  Rostislav Hejduk <Ross-cz@users.noreply.github.com>
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.2.7](https://github.com/shaka-project/shaka-player/compare/v4.2.6...v4.2.7) (2023-01-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Fix exception enabling captions on HLS ([#4894](https://github.com/shaka-project/shaka-player/issues/4894)) ([45b3705](https://github.com/shaka-project/shaka-player/commit/45b37053e0a28ba0f4ee3ca09f8e35e1734caec4)), closes [#4889](https://github.com/shaka-project/shaka-player/issues/4889)
9
+ * Fix flattenedCues in WebVttGenerator ([#4867](https://github.com/shaka-project/shaka-player/issues/4867)) ([2b37820](https://github.com/shaka-project/shaka-player/commit/2b37820fecf23ba8876200cb80626d5454d90b3d))
10
+ * Fix legacy codec support by rewriting codec metadata ([#4858](https://github.com/shaka-project/shaka-player/issues/4858)) ([102c3d9](https://github.com/shaka-project/shaka-player/commit/102c3d902fba987c66c94f1d698ba28bcc0d9203))
11
+ * Fix media source duration when using sequence mode ([#4848](https://github.com/shaka-project/shaka-player/issues/4848)) ([177638c](https://github.com/shaka-project/shaka-player/commit/177638c0e47fb4e6461beefbc3164055f6a47e4b))
12
+ * Fix parsing error on Chromecast when resyncing HLS ([#4869](https://github.com/shaka-project/shaka-player/issues/4869)) ([13e7481](https://github.com/shaka-project/shaka-player/commit/13e7481915fb81430c3566ca91dffa9c13f32412)), closes [#4589](https://github.com/shaka-project/shaka-player/issues/4589)
13
+ * Fix potential AV sync issues after seek or adaptation ([#4886](https://github.com/shaka-project/shaka-player/issues/4886)) ([ac3afb4](https://github.com/shaka-project/shaka-player/commit/ac3afb45c4727abae9ca075597c82bc2a5f24754)), closes [#4589](https://github.com/shaka-project/shaka-player/issues/4589)
14
+ * Fix potential duplicate segments, AV sync issues ([#4884](https://github.com/shaka-project/shaka-player/issues/4884)) ([45b6ccb](https://github.com/shaka-project/shaka-player/commit/45b6ccb96d56ca9338ec7cd458abed0f1702f673)), closes [#4589](https://github.com/shaka-project/shaka-player/issues/4589)
15
+ * **HLS:** Fix discontinuity tracking ([#4881](https://github.com/shaka-project/shaka-player/issues/4881)) ([13d29fd](https://github.com/shaka-project/shaka-player/commit/13d29fd06d7cbf14241ea2507114ff34daeb760e)), closes [#4589](https://github.com/shaka-project/shaka-player/issues/4589)
16
+ * **HLS:** Fix support for mixed AES-128/NONE decryption ([#4847](https://github.com/shaka-project/shaka-player/issues/4847)) ([e866903](https://github.com/shaka-project/shaka-player/commit/e866903a845f375cc0a00ee2d2dd1419faaa6e4b))
17
+ * Make encoding problem detection more robust ([#4885](https://github.com/shaka-project/shaka-player/issues/4885)) ([208c2e2](https://github.com/shaka-project/shaka-player/commit/208c2e298fc53a83fa6842c0a754b6a82c817fdb)), closes [#4589](https://github.com/shaka-project/shaka-player/issues/4589)
18
+ * Release region timeline when unloading ([#4871](https://github.com/shaka-project/shaka-player/issues/4871)) ([af1ee47](https://github.com/shaka-project/shaka-player/commit/af1ee4719016f4bfbaa56e3d1ebfea88b90057bc)), closes [#4850](https://github.com/shaka-project/shaka-player/issues/4850)
19
+ * Sync each segment against EXT-X-PROGRAM-DATE-TIME ([#4870](https://github.com/shaka-project/shaka-player/issues/4870)) ([fadbeb6](https://github.com/shaka-project/shaka-player/commit/fadbeb64f5d31bcacc4872a2dad412bb1b776f73))
20
+ * Treat regions uniquely ([#4841](https://github.com/shaka-project/shaka-player/issues/4841)) ([7952af9](https://github.com/shaka-project/shaka-player/commit/7952af90bf0482a4fcb43520f42cc21bcca79081)), closes [#4839](https://github.com/shaka-project/shaka-player/issues/4839)
21
+ * **ui:** Avoid submitting form if player is inside form ([#4866](https://github.com/shaka-project/shaka-player/issues/4866)) ([c7db48a](https://github.com/shaka-project/shaka-player/commit/c7db48a3070a7bfe69623752ac90a290b75e2b05)), closes [#4861](https://github.com/shaka-project/shaka-player/issues/4861)
22
+
23
+ ## [4.2.6](https://github.com/shaka-project/shaka-player/compare/v4.2.5...v4.2.6) (2022-12-14)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **chapters:** removed duplicate chapters by id ([#4810](https://github.com/shaka-project/shaka-player/issues/4810)) ([50b7c91](https://github.com/shaka-project/shaka-player/commit/50b7c910f8381c035c061c0c58667b6c4be557b8))
29
+ * Fix duplicate updates in StreamingEngine ([#4840](https://github.com/shaka-project/shaka-player/issues/4840)) ([bb25ff8](https://github.com/shaka-project/shaka-player/commit/bb25ff876b4cb48df98d8f7d033a79a9026b2cdf)), closes [#4831](https://github.com/shaka-project/shaka-player/issues/4831)
30
+ * Fix rare exception after StreamingEngine teardown ([#4830](https://github.com/shaka-project/shaka-player/issues/4830)) ([e0f513e](https://github.com/shaka-project/shaka-player/commit/e0f513e7fec1c497ad1ef0135f700488dd9a6473)), closes [#4813](https://github.com/shaka-project/shaka-player/issues/4813)
31
+ * **HLS:** Fix AV sync over ad boundaries ([#4824](https://github.com/shaka-project/shaka-player/issues/4824)) ([12cbf96](https://github.com/shaka-project/shaka-player/commit/12cbf96734ba421adb00a5875e96d3a442363cf3)), closes [#4589](https://github.com/shaka-project/shaka-player/issues/4589)
32
+ * **UI:** Suppress error log from fullscreen button on desktop ([#4823](https://github.com/shaka-project/shaka-player/issues/4823)) ([6d5f112](https://github.com/shaka-project/shaka-player/commit/6d5f1124ad56e74f61aacb68bb9161bfd5bc192a)), closes [#4822](https://github.com/shaka-project/shaka-player/issues/4822)
33
+
3
34
  ## [4.2.5](https://github.com/shaka-project/shaka-player/compare/v4.2.4...v4.2.5) (2022-12-08)
4
35
 
5
36
 
package/CONTRIBUTORS CHANGED
@@ -97,6 +97,7 @@ Robert Colantuoni <rgc@colantuoni.com>
97
97
  Robert Galluccio <robertnw5@gmail.com>
98
98
  Rodolphe Breton <robloche@gmail.com>
99
99
  Rohit Makasana <rohitbm@google.com>
100
+ Rohan Gupta <rohangupta1528@gmail.com>
100
101
  Roi Lipman <roilipman@gmail.com>
101
102
  Roksolana Ivanyshyn <roksolana.ivanyshyn.pub@gmail.com>
102
103
  Rostislav Hejduk <Ross-cz@users.noreply.github.com>
package/dist/deps.js CHANGED
@@ -75,7 +75,7 @@ goog.addDependency('../../../../lib/media/quality_observer.js', ['shaka.media.Qu
75
75
  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'});
76
76
  goog.addDependency('../../../../lib/media/region_timeline.js', ['shaka.media.RegionTimeline'], ['shaka.util.FakeEvent', 'shaka.util.FakeEventTarget', 'shaka.util.IReleasable', 'shaka.util.Timer'], {'lang': 'es6'});
77
77
  goog.addDependency('../../../../lib/media/segment_index.js', ['shaka.media.MetaSegmentIndex', 'shaka.media.SegmentIndex', 'shaka.media.SegmentIterator'], ['goog.asserts', 'shaka.media.SegmentReference', 'shaka.util.IReleasable', 'shaka.util.Timer'], {'lang': 'es8'});
78
- goog.addDependency('../../../../lib/media/segment_reference.js', ['shaka.media.InitSegmentReference', 'shaka.media.SegmentReference'], ['goog.asserts', 'shaka.util.ArrayUtils'], {'lang': 'es6'});
78
+ goog.addDependency('../../../../lib/media/segment_reference.js', ['shaka.media.InitSegmentReference', 'shaka.media.SegmentReference'], ['goog.asserts', 'shaka.log', 'shaka.util.ArrayUtils'], {'lang': 'es6'});
79
79
  goog.addDependency('../../../../lib/media/stall_detector.js', ['shaka.media.StallDetector', 'shaka.media.StallDetector.Implementation', 'shaka.media.StallDetector.MediaElementImplementation'], ['shaka.media.TimeRangesUtils', 'shaka.util.FakeEvent', 'shaka.util.IReleasable'], {'lang': 'es6'});
80
80
  goog.addDependency('../../../../lib/media/streaming_engine.js', ['shaka.media.StreamingEngine'], ['goog.asserts', 'shaka.log', 'shaka.media.InitSegmentReference', 'shaka.media.MediaSourceEngine', 'shaka.media.SegmentIterator', 'shaka.media.SegmentReference', 'shaka.net.Backoff', 'shaka.net.NetworkingEngine', 'shaka.util.DelayedTick', 'shaka.util.Destroyer', 'shaka.util.Error', 'shaka.util.FakeEvent', 'shaka.util.IDestroyable', 'shaka.util.ManifestParserUtils', 'shaka.util.MimeUtils', 'shaka.util.Mp4Parser', 'shaka.util.Networking'], {'lang': 'es8'});
81
81
  goog.addDependency('../../../../lib/media/time_ranges_utils.js', ['shaka.media.TimeRangesUtils'], [], {'lang': 'es6'});
package/dist/locales.js CHANGED
@@ -722,44 +722,44 @@ shaka.ui.Locales.addTo = function(localization) {
722
722
  */
723
723
  shaka.ui.Locales.Ids = {
724
724
  SUBTITLE_FORCED: 'SUBTITLE_FORCED',
725
- LOOP: 'LOOP',
726
- VOLUME: 'VOLUME',
727
- ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
728
- SKIP_AD: 'SKIP_AD',
729
- ON: 'ON',
730
- UNMUTE: 'UNMUTE',
731
- MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
732
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
733
- AD_DURATION: 'AD_DURATION',
734
- EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
735
- STATISTICS: 'STATISTICS',
736
- CAPTIONS: 'CAPTIONS',
737
725
  AUTO_QUALITY: 'AUTO_QUALITY',
738
- LANGUAGE: 'LANGUAGE',
739
- AD_TIME: 'AD_TIME',
740
- MORE_SETTINGS: 'MORE_SETTINGS',
741
- SEEK: 'SEEK',
742
- REPLAY: 'REPLAY',
743
- FAST_FORWARD: 'FAST_FORWARD',
744
- MUTE: 'MUTE',
726
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
745
727
  LIVE: 'LIVE',
746
- NOT_APPLICABLE: 'NOT_APPLICABLE',
747
- OFF: 'OFF',
748
- EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
749
728
  SKIP_TO_LIVE: 'SKIP_TO_LIVE',
750
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
751
- AIRPLAY: 'AIRPLAY',
729
+ FULL_SCREEN: 'FULL_SCREEN',
730
+ AD_TIME: 'AD_TIME',
731
+ BACK: 'BACK',
732
+ ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
733
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
734
+ OFF: 'OFF',
735
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
736
+ RESOLUTION: 'RESOLUTION',
737
+ VOLUME: 'VOLUME',
738
+ QUALITY: 'QUALITY',
739
+ LOOP: 'LOOP',
740
+ MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
741
+ FAST_FORWARD: 'FAST_FORWARD',
742
+ UNMUTE: 'UNMUTE',
743
+ STATISTICS: 'STATISTICS',
752
744
  ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
753
745
  AD_PROGRESS: 'AD_PROGRESS',
754
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
746
+ LANGUAGE: 'LANGUAGE',
755
747
  CAST: 'CAST',
756
- FULL_SCREEN: 'FULL_SCREEN',
757
- BACK: 'BACK',
758
748
  REWIND: 'REWIND',
759
- RESOLUTION: 'RESOLUTION',
760
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
749
+ REPLAY: 'REPLAY',
750
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
751
+ MORE_SETTINGS: 'MORE_SETTINGS',
752
+ EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
761
753
  PAUSE: 'PAUSE',
762
- QUALITY: 'QUALITY',
754
+ SEEK: 'SEEK',
755
+ EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
756
+ AIRPLAY: 'AIRPLAY',
757
+ AD_DURATION: 'AD_DURATION',
758
+ SKIP_AD: 'SKIP_AD',
759
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
763
760
  PLAY: 'PLAY',
764
- PLAYBACK_RATE: 'PLAYBACK_RATE',
761
+ CAPTIONS: 'CAPTIONS',
762
+ NOT_APPLICABLE: 'NOT_APPLICABLE',
763
+ ON: 'ON',
764
+ MUTE: 'MUTE',
765
765
  };
@@ -1156,6 +1156,16 @@ declare namespace shaka.media {
1156
1156
  * Mark the reference as unavailable.
1157
1157
  */
1158
1158
  markAsUnavailable ( ) : any ;
1159
+ /**
1160
+ * Offset the segment reference by a fixed amount.
1161
+ * @param offset The amount to add to the segment's start and end times.
1162
+ */
1163
+ offset (offset : number ) : any ;
1164
+ /**
1165
+ * Sync this segment against a particular sync time that will serve as "0" in
1166
+ * the presentation timeline.
1167
+ */
1168
+ syncAgainst (lowestSyncTime : number ) : any ;
1159
1169
  }
1160
1170
  }
1161
1171
  // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.compiled.externs.js
@@ -1156,6 +1156,16 @@ declare namespace shaka.media {
1156
1156
  * Mark the reference as unavailable.
1157
1157
  */
1158
1158
  markAsUnavailable ( ) : any ;
1159
+ /**
1160
+ * Offset the segment reference by a fixed amount.
1161
+ * @param offset The amount to add to the segment's start and end times.
1162
+ */
1163
+ offset (offset : number ) : any ;
1164
+ /**
1165
+ * Sync this segment against a particular sync time that will serve as "0" in
1166
+ * the presentation timeline.
1167
+ */
1168
+ syncAgainst (lowestSyncTime : number ) : any ;
1159
1169
  }
1160
1170
  }
1161
1171
  // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.compiled.debug.externs.js
@@ -1762,6 +1762,18 @@ shaka.media.SegmentReference = class {
1762
1762
  * Mark the reference as unavailable.
1763
1763
  */
1764
1764
  markAsUnavailable() {}
1765
+ /**
1766
+ * Offset the segment reference by a fixed amount.
1767
+ * @param {number} offset The amount to add to the segment's start and end
1768
+ * times.
1769
+ */
1770
+ offset(offset) {}
1771
+ /**
1772
+ * Sync this segment against a particular sync time that will serve as "0" in
1773
+ * the presentation timeline.
1774
+ * @param {number} lowestSyncTime
1775
+ */
1776
+ syncAgainst(lowestSyncTime) {}
1765
1777
  };
1766
1778
  /**
1767
1779
  * Rather than using booleans to communicate what the state of the reference,