shaka-player 4.2.6 → 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 (37) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/deps.js +1 -1
  3. package/dist/locales.js +32 -32
  4. package/dist/shaka-player.compiled.d.ts +10 -0
  5. package/dist/shaka-player.compiled.debug.d.ts +10 -0
  6. package/dist/shaka-player.compiled.debug.externs.js +12 -0
  7. package/dist/shaka-player.compiled.debug.js +144 -139
  8. package/dist/shaka-player.compiled.debug.map +3 -3
  9. package/dist/shaka-player.compiled.externs.js +12 -0
  10. package/dist/shaka-player.compiled.js +384 -381
  11. package/dist/shaka-player.compiled.map +3 -3
  12. package/dist/shaka-player.ui.d.ts +10 -0
  13. package/dist/shaka-player.ui.debug.d.ts +10 -0
  14. package/dist/shaka-player.ui.debug.externs.js +12 -0
  15. package/dist/shaka-player.ui.debug.js +156 -152
  16. package/dist/shaka-player.ui.debug.map +3 -3
  17. package/dist/shaka-player.ui.externs.js +12 -0
  18. package/dist/shaka-player.ui.js +495 -493
  19. package/dist/shaka-player.ui.map +3 -3
  20. package/lib/hls/hls_parser.js +52 -15
  21. package/lib/media/media_source_engine.js +34 -4
  22. package/lib/media/segment_index.js +5 -10
  23. package/lib/media/segment_reference.js +39 -0
  24. package/lib/media/streaming_engine.js +15 -3
  25. package/lib/player.js +7 -1
  26. package/lib/text/ui_text_displayer.js +24 -4
  27. package/lib/text/web_vtt_generator.js +21 -9
  28. package/lib/util/dom_utils.js +3 -1
  29. package/lib/util/stream_utils.js +6 -0
  30. package/lib/util/timer.js +17 -0
  31. package/package.json +1 -1
  32. package/test/hls/hls_live_unit.js +8 -30
  33. package/test/hls/hls_parser_unit.js +30 -0
  34. package/test/media/segment_index_unit.js +28 -0
  35. package/test/player_integration.js +27 -0
  36. package/test/player_unit.js +4 -2
  37. package/test/text/ui_text_displayer_unit.js +70 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
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
+
3
23
  ## [4.2.6](https://github.com/shaka-project/shaka-player/compare/v4.2.5...v4.2.6) (2022-12-14)
4
24
 
5
25
 
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
@@ -721,45 +721,45 @@ shaka.ui.Locales.addTo = function(localization) {
721
721
  * @const
722
722
  */
723
723
  shaka.ui.Locales.Ids = {
724
- AUTO_QUALITY: 'AUTO_QUALITY',
725
724
  SUBTITLE_FORCED: 'SUBTITLE_FORCED',
726
- FAST_FORWARD: 'FAST_FORWARD',
727
- CAST: 'CAST',
728
- AIRPLAY: 'AIRPLAY',
729
- ON: 'ON',
730
- ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
731
- FULL_SCREEN: 'FULL_SCREEN',
732
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
733
- MUTE: 'MUTE',
734
- AD_DURATION: 'AD_DURATION',
735
- MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
725
+ AUTO_QUALITY: 'AUTO_QUALITY',
726
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
727
+ LIVE: 'LIVE',
736
728
  SKIP_TO_LIVE: 'SKIP_TO_LIVE',
737
- LOOP: 'LOOP',
738
- REWIND: 'REWIND',
739
- SEEK: 'SEEK',
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',
740
737
  VOLUME: 'VOLUME',
738
+ QUALITY: 'QUALITY',
739
+ LOOP: 'LOOP',
740
+ MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
741
+ FAST_FORWARD: 'FAST_FORWARD',
742
+ UNMUTE: 'UNMUTE',
741
743
  STATISTICS: 'STATISTICS',
742
- EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
743
- RESOLUTION: 'RESOLUTION',
744
- LIVE: 'LIVE',
745
- CAPTIONS: 'CAPTIONS',
746
- OFF: 'OFF',
747
- REPLAY: 'REPLAY',
748
- ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
744
+ ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
745
+ AD_PROGRESS: 'AD_PROGRESS',
749
746
  LANGUAGE: 'LANGUAGE',
747
+ CAST: 'CAST',
748
+ REWIND: 'REWIND',
749
+ REPLAY: 'REPLAY',
750
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
750
751
  MORE_SETTINGS: 'MORE_SETTINGS',
751
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
752
- AD_TIME: 'AD_TIME',
753
- EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
754
- PLAYBACK_RATE: 'PLAYBACK_RATE',
752
+ EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
755
753
  PAUSE: 'PAUSE',
756
- UNMUTE: 'UNMUTE',
757
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
758
- AD_PROGRESS: 'AD_PROGRESS',
759
- BACK: 'BACK',
760
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
754
+ SEEK: 'SEEK',
755
+ EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
756
+ AIRPLAY: 'AIRPLAY',
757
+ AD_DURATION: 'AD_DURATION',
761
758
  SKIP_AD: 'SKIP_AD',
762
- NOT_APPLICABLE: 'NOT_APPLICABLE',
763
- QUALITY: 'QUALITY',
759
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
764
760
  PLAY: 'PLAY',
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,