shaka-player 4.11.12 → 4.11.14

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 (40) hide show
  1. package/.eslintrc.js +1 -0
  2. package/AUTHORS +1 -0
  3. package/CONTRIBUTORS +1 -0
  4. package/dist/deps.js +1 -1
  5. package/dist/locales.js +35 -35
  6. package/dist/shaka-player.compiled.d.ts +8 -8
  7. package/dist/shaka-player.compiled.debug.d.ts +8 -8
  8. package/dist/shaka-player.compiled.debug.externs.js +1 -1
  9. package/dist/shaka-player.compiled.debug.js +160 -157
  10. package/dist/shaka-player.compiled.debug.map +3 -3
  11. package/dist/shaka-player.compiled.externs.js +1 -1
  12. package/dist/shaka-player.compiled.js +1254 -1253
  13. package/dist/shaka-player.compiled.map +3 -3
  14. package/dist/shaka-player.ui.d.ts +8 -8
  15. package/dist/shaka-player.ui.debug.d.ts +8 -8
  16. package/dist/shaka-player.ui.debug.externs.js +1 -1
  17. package/dist/shaka-player.ui.debug.js +153 -150
  18. package/dist/shaka-player.ui.debug.map +3 -3
  19. package/dist/shaka-player.ui.externs.js +1 -1
  20. package/dist/shaka-player.ui.js +1477 -1476
  21. package/dist/shaka-player.ui.map +3 -3
  22. package/externs/shaka/abortable.js +36 -36
  23. package/lib/ads/interstitial_ad_manager.js +6 -3
  24. package/lib/hls/hls_parser.js +1 -1
  25. package/lib/media/drm_engine.js +2 -0
  26. package/lib/media/media_source_engine.js +61 -3
  27. package/lib/media/preload_manager.js +6 -1
  28. package/lib/media/segment_reference.js +1 -1
  29. package/lib/media/streaming_engine.js +9 -11
  30. package/lib/net/networking_engine.js +3 -3
  31. package/lib/player.js +12 -2
  32. package/lib/polyfill/media_capabilities.js +46 -8
  33. package/lib/text/ui_text_displayer.js +8 -0
  34. package/lib/text/vtt_text_parser.js +2 -8
  35. package/lib/util/abortable_operation.js +8 -6
  36. package/lib/util/error.js +1 -1
  37. package/lib/util/platform.js +18 -7
  38. package/package.json +2 -2
  39. package/ui/chapter_selection.js +6 -2
  40. package/ui/playback_rate_selection.js +6 -2
package/.eslintrc.js CHANGED
@@ -84,6 +84,7 @@ module.exports = {
84
84
  'no-empty': ['error', {'allowEmptyCatch': true}],
85
85
  'no-misleading-character-class': 'error',
86
86
  'no-template-curly-in-string': 'error',
87
+ 'no-fallthrough': ['error', {'allowEmptyCase': true}],
87
88
  // TODO: Try to re-enable this if possible. Right now, it produces way too
88
89
  // many false-positives with eslint 7. It worked well enough in eslint 5.
89
90
  // 'require-atomic-updates': 'error',
package/AUTHORS CHANGED
@@ -32,6 +32,7 @@ Cristian Atehortua <cristian25a32@gmail.com>
32
32
  Damien Deis <developer.deis@gmail.com>
33
33
  Dany L'Hébreux <danylhebreux@gmail.com>
34
34
  Dave Nicholas <davenicholasuk@gmail.com>
35
+ David Pfister <pfisterdd10@gmail.com>
35
36
  Davide Zordan <mail@davide.dev>
36
37
  Dl Dador <dldador@gmail.com>
37
38
  Edgeware AB <*@edgeware.tv>
package/CONTRIBUTORS CHANGED
@@ -48,6 +48,7 @@ Cristian Atehortua <cristian25a32@gmail.com>
48
48
  Damien Deis <developer.deis@gmail.com>
49
49
  Dany L'Hébreux <danylhebreux@gmail.com>
50
50
  Dave Nicholas <davenicholasuk@gmail.com>
51
+ David Pfister <pfisterdd10@gmail.com>
51
52
  Davide Zordan <mail@davide.dev>
52
53
  Dl Dador <dldador@gmail.com>
53
54
  Donato Borrello <donato@jwplayer.com>
package/dist/deps.js CHANGED
@@ -156,7 +156,7 @@ goog.addDependency('../../../../lib/text/stub_text_displayer.js', ['shaka.text.S
156
156
  goog.addDependency('../../../../lib/text/text_engine.js', ['shaka.text.TextEngine'], ['goog.asserts', 'shaka.Deprecate', 'shaka.media.ClosedCaptionParser', 'shaka.text.Cue', 'shaka.util.BufferUtils', 'shaka.util.IDestroyable', 'shaka.util.MimeUtils'], {'lang': 'es8'});
157
157
  goog.addDependency('../../../../lib/text/text_utils.js', ['shaka.text.Utils'], ['shaka.log', 'shaka.text.Cue', 'shaka.text.CueRegion'], {'lang': 'es6'});
158
158
  goog.addDependency('../../../../lib/text/ttml_text_parser.js', ['shaka.text.TtmlTextParser'], ['goog.Uri', 'goog.asserts', 'shaka.log', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.TextEngine', 'shaka.util.ArrayUtils', 'shaka.util.Error', 'shaka.util.StringUtils', 'shaka.util.TXml'], {'lang': 'es6'});
159
- goog.addDependency('../../../../lib/text/ui_text_displayer.js', ['shaka.text.UITextDisplayer'], ['goog.asserts', 'shaka.Deprecate', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.Utils', 'shaka.util.Dom', 'shaka.util.EventManager', 'shaka.util.Timer'], {'lang': 'es6'});
159
+ goog.addDependency('../../../../lib/text/ui_text_displayer.js', ['shaka.text.UITextDisplayer'], ['goog.asserts', 'shaka.Deprecate', 'shaka.log', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.Utils', 'shaka.util.Dom', 'shaka.util.EventManager', 'shaka.util.Timer'], {'lang': 'es6'});
160
160
  goog.addDependency('../../../../lib/text/vtt_text_parser.js', ['shaka.text.VttTextParser'], ['goog.asserts', 'shaka.log', 'shaka.media.ManifestParser', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.TextEngine', 'shaka.util.Error', 'shaka.util.StringUtils', 'shaka.util.TextParser'], {'lang': 'es6'});
161
161
  goog.addDependency('../../../../lib/text/web_vtt_generator.js', ['shaka.text.WebVttGenerator'], ['shaka.text.Cue', 'shaka.text.Utils'], {'lang': 'es6'});
162
162
  goog.addDependency('../../../../lib/transmuxer/aac_transmuxer.js', ['shaka.transmuxer.AacTransmuxer'], ['shaka.media.Capabilities', 'shaka.transmuxer.ADTS', 'shaka.transmuxer.TransmuxerEngine', 'shaka.util.BufferUtils', 'shaka.util.Error', 'shaka.util.Id3Utils', 'shaka.util.ManifestParserUtils', 'shaka.util.MimeUtils', 'shaka.util.Mp4Generator', 'shaka.util.Uint8ArrayUtils'], {'lang': 'es6'});
package/dist/locales.js CHANGED
@@ -912,51 +912,51 @@ shaka.ui.Locales.addTo = function(localization) {
912
912
  * @const
913
913
  */
914
914
  shaka.ui.Locales.Ids = {
915
- CHAPTERS: 'CHAPTERS',
916
- STATISTICS: 'STATISTICS',
917
- EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
918
- REPLAY: 'REPLAY',
919
- AD_STATISTICS: 'AD_STATISTICS',
915
+ NOT_APPLICABLE: 'NOT_APPLICABLE',
920
916
  LIVE: 'LIVE',
921
- RECENTER_VR: 'RECENTER_VR',
922
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
923
- TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
924
- CAST: 'CAST',
925
- AD_TIME: 'AD_TIME',
926
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
927
- PAUSE: 'PAUSE',
928
917
  REWIND: 'REWIND',
918
+ SKIP_TO_LIVE: 'SKIP_TO_LIVE',
919
+ CAST: 'CAST',
929
920
  SURROUND: 'SURROUND',
930
- SUBTITLE_FORCED: 'SUBTITLE_FORCED',
931
- ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
932
- RESOLUTION: 'RESOLUTION',
921
+ LANGUAGE: 'LANGUAGE',
933
922
  AIRPLAY: 'AIRPLAY',
934
- DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
935
- LOOP: 'LOOP',
936
- CAPTIONS: 'CAPTIONS',
923
+ EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
924
+ QUALITY: 'QUALITY',
925
+ UNMUTE: 'UNMUTE',
926
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
927
+ FULL_SCREEN: 'FULL_SCREEN',
928
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
929
+ CHAPTERS: 'CHAPTERS',
930
+ ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
931
+ AD_DURATION: 'AD_DURATION',
932
+ MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
937
933
  PLAY: 'PLAY',
938
934
  FAST_FORWARD: 'FAST_FORWARD',
939
- ON: 'ON',
940
- ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
941
- BACK: 'BACK',
942
- FULL_SCREEN: 'FULL_SCREEN',
943
- SKIP_AD: 'SKIP_AD',
935
+ REPLAY: 'REPLAY',
936
+ SUBTITLE_FORCED: 'SUBTITLE_FORCED',
937
+ MORE_SETTINGS: 'MORE_SETTINGS',
944
938
  AD_PROGRESS: 'AD_PROGRESS',
939
+ CAPTIONS: 'CAPTIONS',
940
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
945
941
  VOLUME: 'VOLUME',
946
- AD_DURATION: 'AD_DURATION',
947
- MORE_SETTINGS: 'MORE_SETTINGS',
948
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
942
+ AD_STATISTICS: 'AD_STATISTICS',
943
+ LOOP: 'LOOP',
944
+ EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
945
+ RESOLUTION: 'RESOLUTION',
946
+ TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
947
+ BACK: 'BACK',
948
+ STATISTICS: 'STATISTICS',
949
+ OFF: 'OFF',
949
950
  SEEK: 'SEEK',
950
951
  PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
951
- MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
952
+ ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
953
+ DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
952
954
  MUTE: 'MUTE',
953
- PLAYBACK_RATE: 'PLAYBACK_RATE',
955
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
954
956
  AUTO_QUALITY: 'AUTO_QUALITY',
955
- QUALITY: 'QUALITY',
956
- LANGUAGE: 'LANGUAGE',
957
- SKIP_TO_LIVE: 'SKIP_TO_LIVE',
958
- NOT_APPLICABLE: 'NOT_APPLICABLE',
959
- UNMUTE: 'UNMUTE',
960
- EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
961
- OFF: 'OFF',
957
+ PAUSE: 'PAUSE',
958
+ RECENTER_VR: 'RECENTER_VR',
959
+ ON: 'ON',
960
+ SKIP_AD: 'SKIP_AD',
961
+ AD_TIME: 'AD_TIME',
962
962
  };
@@ -3406,7 +3406,7 @@ declare namespace shaka.util.Error {
3406
3406
  UNEXPECTED_TEST_REQUEST = 1009.0 ,
3407
3407
  UNSUPPORTED_EXTERNAL_THUMBNAILS_URI = 2017.0 ,
3408
3408
  UNSUPPORTED_SCHEME = 1000.0 ,
3409
- VAST_INVALID_XML = 4001.0 ,
3409
+ VAST_INVALID_XML = 10007.0 ,
3410
3410
  VIDEO_ERROR = 3016.0 ,
3411
3411
  WEBM_CUES_ELEMENT_MISSING = 3007.0 ,
3412
3412
  WEBM_CUE_TIME_ELEMENT_MISSING = 3013.0 ,
@@ -4048,6 +4048,13 @@ declare namespace shaka.extern {
4048
4048
  * whereas aborting only means that further work is stopped.
4049
4049
  */
4050
4050
  interface IAbortableOperation < T > {
4051
+ /**
4052
+ * A Promise which represents the underlying operation. It is resolved when
4053
+ * the operation is complete, and rejected if the operation fails or is
4054
+ * aborted. Aborted operations should be rejected with a shaka.util.Error
4055
+ * object using the error code OPERATION_ABORTED.
4056
+ */
4057
+ promise : Promise < T > ;
4051
4058
  /**
4052
4059
  * Can be called by anyone holding this object to abort the underlying
4053
4060
  * operation. This is not cancelation, and will not necessarily result in
@@ -4057,13 +4064,6 @@ declare namespace shaka.extern {
4057
4064
  */
4058
4065
  abort ( ) : Promise < any > ;
4059
4066
  finally (onFinal : (a : boolean ) => any ) : shaka.extern.IAbortableOperation < T > ;
4060
- /**
4061
- * A Promise which represents the underlying operation. It is resolved when
4062
- * the operation is complete, and rejected if the operation fails or is
4063
- * aborted. Aborted operations should be rejected with a shaka.util.Error
4064
- * object using the error code OPERATION_ABORTED.
4065
- */
4066
- promise : Promise < T > ;
4067
4067
  }
4068
4068
  }
4069
4069
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/abr_manager.js
@@ -3406,7 +3406,7 @@ declare namespace shaka.util.Error {
3406
3406
  UNEXPECTED_TEST_REQUEST = 1009.0 ,
3407
3407
  UNSUPPORTED_EXTERNAL_THUMBNAILS_URI = 2017.0 ,
3408
3408
  UNSUPPORTED_SCHEME = 1000.0 ,
3409
- VAST_INVALID_XML = 4001.0 ,
3409
+ VAST_INVALID_XML = 10007.0 ,
3410
3410
  VIDEO_ERROR = 3016.0 ,
3411
3411
  WEBM_CUES_ELEMENT_MISSING = 3007.0 ,
3412
3412
  WEBM_CUE_TIME_ELEMENT_MISSING = 3013.0 ,
@@ -4048,6 +4048,13 @@ declare namespace shaka.extern {
4048
4048
  * whereas aborting only means that further work is stopped.
4049
4049
  */
4050
4050
  interface IAbortableOperation < T > {
4051
+ /**
4052
+ * A Promise which represents the underlying operation. It is resolved when
4053
+ * the operation is complete, and rejected if the operation fails or is
4054
+ * aborted. Aborted operations should be rejected with a shaka.util.Error
4055
+ * object using the error code OPERATION_ABORTED.
4056
+ */
4057
+ promise : Promise < T > ;
4051
4058
  /**
4052
4059
  * Can be called by anyone holding this object to abort the underlying
4053
4060
  * operation. This is not cancelation, and will not necessarily result in
@@ -4057,13 +4064,6 @@ declare namespace shaka.extern {
4057
4064
  */
4058
4065
  abort ( ) : Promise < any > ;
4059
4066
  finally (onFinal : (a : boolean ) => any ) : shaka.extern.IAbortableOperation < T > ;
4060
- /**
4061
- * A Promise which represents the underlying operation. It is resolved when
4062
- * the operation is complete, and rejected if the operation fails or is
4063
- * aborted. Aborted operations should be rejected with a shaka.util.Error
4064
- * object using the error code OPERATION_ABORTED.
4065
- */
4066
- promise : Promise < T > ;
4067
4067
  }
4068
4068
  }
4069
4069
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/abr_manager.js
@@ -514,7 +514,7 @@ shaka.util.Error.Code = {
514
514
  'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
515
515
  'MT_AD_MANAGER_NOT_INITIALIZED': 10005,
516
516
  'INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED': 10006,
517
- 'VAST_INVALID_XML': 4001
517
+ 'VAST_INVALID_XML': 10007
518
518
  };
519
519
  /**
520
520
  * A timer allows a single function to be executed at a later time or at