shaka-player 4.0.0 → 4.0.3

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 (84) hide show
  1. package/.github/config.yml +1 -0
  2. package/.github/workflows/release-please.yaml +6 -11
  3. package/AUTHORS +1 -0
  4. package/CHANGELOG.md +39 -0
  5. package/CONTRIBUTORS +1 -0
  6. package/README.md +4 -4
  7. package/build/misspellings.txt +1 -0
  8. package/build/test.py +1 -1
  9. package/demo/common/assets.js +1 -1
  10. package/demo/demo.less +0 -1
  11. package/demo/main.js +3 -3
  12. package/dist/controls.css +3 -3
  13. package/dist/controls.css.map +1 -1
  14. package/dist/demo.compiled.debug.js +3 -3
  15. package/dist/demo.compiled.debug.map +2 -2
  16. package/dist/demo.compiled.js +3 -3
  17. package/dist/demo.compiled.map +2 -2
  18. package/dist/demo.css +1 -1
  19. package/dist/demo.css.map +1 -1
  20. package/dist/deps.js +1 -1
  21. package/dist/locales.js +33 -33
  22. package/dist/receiver.compiled.debug.js +1 -1
  23. package/dist/receiver.compiled.debug.map +1 -1
  24. package/dist/receiver.compiled.js +1 -1
  25. package/dist/receiver.compiled.map +1 -1
  26. package/dist/shaka-player.compiled.d.ts +2 -1
  27. package/dist/shaka-player.compiled.debug.d.ts +2 -1
  28. package/dist/shaka-player.compiled.debug.externs.js +4 -2
  29. package/dist/shaka-player.compiled.debug.js +278 -267
  30. package/dist/shaka-player.compiled.debug.map +4 -4
  31. package/dist/shaka-player.compiled.externs.js +4 -2
  32. package/dist/shaka-player.compiled.js +815 -806
  33. package/dist/shaka-player.compiled.map +4 -4
  34. package/dist/shaka-player.ui.d.ts +2 -1
  35. package/dist/shaka-player.ui.debug.d.ts +2 -1
  36. package/dist/shaka-player.ui.debug.externs.js +4 -2
  37. package/dist/shaka-player.ui.debug.js +305 -293
  38. package/dist/shaka-player.ui.debug.map +4 -4
  39. package/dist/shaka-player.ui.externs.js +4 -2
  40. package/dist/shaka-player.ui.js +966 -959
  41. package/dist/shaka-player.ui.map +4 -4
  42. package/docs/tutorials/upgrade.md +4 -2
  43. package/externs/shaka/player.js +15 -2
  44. package/karma.conf.js +4 -0
  45. package/lib/abr/simple_abr_manager.js +2 -1
  46. package/lib/dash/dash_parser.js +2 -2
  47. package/lib/hls/hls_parser.js +211 -82
  48. package/lib/media/drm_engine.js +19 -0
  49. package/lib/media/media_source_engine.js +91 -37
  50. package/lib/media/segment_index.js +26 -1
  51. package/lib/media/segment_reference.js +10 -3
  52. package/lib/media/streaming_engine.js +2 -3
  53. package/lib/offline/indexeddb/storage_mechanism.js +4 -2
  54. package/lib/player.js +165 -107
  55. package/lib/text/vtt_text_parser.js +7 -7
  56. package/lib/util/config_utils.js +25 -0
  57. package/lib/util/error.js +7 -0
  58. package/lib/util/manifest_parser_utils.js +1 -1
  59. package/lib/util/mime_utils.js +62 -6
  60. package/lib/util/periods.js +5 -4
  61. package/lib/util/player_configuration.js +14 -14
  62. package/lib/util/stream_utils.js +5 -2
  63. package/package.json +6 -3
  64. package/test/hls/hls_live_unit.js +79 -7
  65. package/test/hls/hls_parser_unit.js +102 -8
  66. package/test/hls/manifest_text_parser_unit.js +19 -0
  67. package/test/offline/indexeddb_storage_unit.js +1 -1
  68. package/test/offline/storage_compatibility_unit.js +1 -1
  69. package/test/player_external.js +7 -1
  70. package/test/player_integration.js +6 -10
  71. package/test/player_src_equals_integration.js +81 -83
  72. package/test/player_unit.js +98 -1
  73. package/test/test/boot.js +9 -0
  74. package/test/test/externs/filters.js +4 -0
  75. package/test/test/util/simple_fakes.js +31 -2
  76. package/test/text/vtt_text_parser_unit.js +64 -5
  77. package/test/util/mime_utils_unit.js +54 -0
  78. package/test/util/periods_unit.js +79 -0
  79. package/ui/less/containers.less +1 -1
  80. package/ui/less/general.less +1 -1
  81. package/ui/less/range_elements.less +1 -0
  82. package/ui/resolution_selection.js +1 -1
  83. package/.github/pull_request_template.md +0 -10
  84. package/docs/tutorials/gsoc-ideas-list.md +0 -3
@@ -2647,6 +2647,7 @@ declare namespace shaka.util.Error {
2647
2647
  CAST_CANCELED_BY_USER = 8004.0 ,
2648
2648
  CAST_CONNECTION_TIMED_OUT = 8005.0 ,
2649
2649
  CAST_RECEIVER_APP_UNAVAILABLE = 8006.0 ,
2650
+ CHAPTERS_TRACK_FAILED = 2015.0 ,
2650
2651
  CONTENT_NOT_LOADED = 7004.0 ,
2651
2652
  CONTENT_TRANSFORMATION_FAILED = 3019.0 ,
2652
2653
  CONTENT_UNSUPPORTED_BY_BROWSER = 4032.0 ,
@@ -4271,7 +4272,7 @@ declare namespace shaka.extern {
4271
4272
  }
4272
4273
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
4273
4274
  declare namespace shaka.extern {
4274
- type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
4275
+ type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , initDataTransform ? : (a : Uint8Array , b : string , c : shaka.extern.DrmInfo | null ) => Uint8Array , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
4275
4276
  }
4276
4277
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
4277
4278
  declare namespace shaka.extern {
@@ -2647,6 +2647,7 @@ declare namespace shaka.util.Error {
2647
2647
  CAST_CANCELED_BY_USER = 8004.0 ,
2648
2648
  CAST_CONNECTION_TIMED_OUT = 8005.0 ,
2649
2649
  CAST_RECEIVER_APP_UNAVAILABLE = 8006.0 ,
2650
+ CHAPTERS_TRACK_FAILED = 2015.0 ,
2650
2651
  CONTENT_NOT_LOADED = 7004.0 ,
2651
2652
  CONTENT_TRANSFORMATION_FAILED = 3019.0 ,
2652
2653
  CONTENT_UNSUPPORTED_BY_BROWSER = 4032.0 ,
@@ -4271,7 +4272,7 @@ declare namespace shaka.extern {
4271
4272
  }
4272
4273
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
4273
4274
  declare namespace shaka.extern {
4274
- type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
4275
+ type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , initDataTransform ? : (a : Uint8Array , b : string , c : shaka.extern.DrmInfo | null ) => Uint8Array , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
4275
4276
  }
4276
4277
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
4277
4278
  declare namespace shaka.extern {
@@ -211,6 +211,7 @@ shaka.util.Error.Code = {
211
211
  'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
212
212
  'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
213
213
  'MISSING_TEXT_PLUGIN': 2014,
214
+ 'CHAPTERS_TRACK_FAILED': 2015,
214
215
  'BUFFER_READ_OUT_OF_BOUNDS': 3000,
215
216
  'JS_INTEGER_OVERFLOW': 3001,
216
217
  'EBML_OVERFLOW': 3002,
@@ -1797,8 +1798,9 @@ shaka.media.SegmentReference = class {
1797
1798
  * If not provided, the duration should be automatically calculated based on
1798
1799
  * the duration of the reference.
1799
1800
  * @param {?number=} syncTime
1800
- * A time value, expressed in the same scale as the start and end time, which
1801
- * is used to synchronize between streams.
1801
+ * A time value, expressed in seconds since 1970, which is used to
1802
+ * synchronize between streams. Both produced and consumed by the HLS
1803
+ * parser. Other components should not need this value.
1802
1804
  * @param {shaka.media.SegmentReference.Status=} status
1803
1805
  * The segment status is used to indicate that a segment does not exist or is
1804
1806
  * not available.