shaka-player 4.8.8 → 4.9.0

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 (60) hide show
  1. package/README.md +5 -0
  2. package/dist/controls.css +1 -1
  3. package/dist/controls.css.map +1 -1
  4. package/dist/deps.js +5 -5
  5. package/dist/locales.js +33 -33
  6. package/dist/shaka-player.compiled.d.ts +39 -17
  7. package/dist/shaka-player.compiled.debug.d.ts +39 -17
  8. package/dist/shaka-player.compiled.debug.externs.js +32 -11
  9. package/dist/shaka-player.compiled.debug.js +574 -516
  10. package/dist/shaka-player.compiled.debug.map +4 -4
  11. package/dist/shaka-player.compiled.externs.js +32 -11
  12. package/dist/shaka-player.compiled.js +1270 -1236
  13. package/dist/shaka-player.compiled.map +4 -4
  14. package/dist/shaka-player.ui.d.ts +39 -17
  15. package/dist/shaka-player.ui.debug.d.ts +39 -17
  16. package/dist/shaka-player.ui.debug.externs.js +43 -22
  17. package/dist/shaka-player.ui.debug.js +601 -543
  18. package/dist/shaka-player.ui.debug.map +4 -4
  19. package/dist/shaka-player.ui.externs.js +43 -22
  20. package/dist/shaka-player.ui.js +1483 -1448
  21. package/dist/shaka-player.ui.map +4 -4
  22. package/externs/shaka/manifest.js +11 -1
  23. package/externs/shaka/offline.js +3 -0
  24. package/externs/shaka/player.js +105 -12
  25. package/externs/tizen.js +1 -1
  26. package/lib/abr/simple_abr_manager.js +5 -0
  27. package/lib/ads/media_tailor_ad.js +11 -0
  28. package/lib/ads/media_tailor_ad_manager.js +37 -3
  29. package/lib/cea/cea608_data_channel.js +9 -0
  30. package/lib/cea/cea_decoder.js +6 -2
  31. package/lib/dash/dash_parser.js +655 -46
  32. package/lib/dash/mpd_utils.js +7 -8
  33. package/lib/dash/segment_template.js +65 -10
  34. package/lib/hls/hls_parser.js +92 -34
  35. package/lib/media/drm_engine.js +274 -40
  36. package/lib/media/manifest_filterer.js +10 -14
  37. package/lib/media/preload_manager.js +3 -10
  38. package/lib/media/segment_utils.js +14 -3
  39. package/lib/mss/mss_parser.js +2 -0
  40. package/lib/net/http_plugin_utils.js +2 -1
  41. package/lib/net/networking_engine.js +27 -0
  42. package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
  43. package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
  44. package/lib/offline/manifest_converter.js +2 -0
  45. package/lib/offline/storage.js +1 -0
  46. package/lib/player.js +221 -14
  47. package/lib/polyfill/media_capabilities.js +10 -35
  48. package/lib/util/config_utils.js +74 -6
  49. package/lib/util/error.js +7 -0
  50. package/lib/util/mp4_box_parsers.js +23 -2
  51. package/lib/util/periods.js +51 -28
  52. package/lib/util/platform.js +3 -1
  53. package/lib/util/player_configuration.js +20 -8
  54. package/lib/util/stream_utils.js +62 -30
  55. package/lib/util/tXml.js +74 -6
  56. package/package.json +2 -2
  57. package/support.html +1 -0
  58. package/ui/controls.js +4 -0
  59. package/ui/less/ad_controls.less +2 -1
  60. package/ui/resolution_selection.js +12 -3
@@ -344,6 +344,7 @@ shaka.util.Error.Code = {
344
344
  'AES_128_INVALID_KEY_LENGTH': 4049,
345
345
  'DASH_CONFLICTING_AES_128': 4050,
346
346
  'DASH_UNSUPPORTED_AES_128': 4051,
347
+ 'DASH_INVALID_PATCH': 4052,
347
348
  'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
348
349
  'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
349
350
  'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
@@ -1426,7 +1427,7 @@ shaka.util.StreamUtils = class {
1426
1427
  * @param {shaka.extern.Variant} variant
1427
1428
  * @param {shaka.extern.Restrictions} restrictions
1428
1429
  * Configured restrictions from the user.
1429
- * @param {{width: number, height: number}} maxHwRes
1430
+ * @param {shaka.extern.Resolution} maxHwRes
1430
1431
  * The maximum resolution the hardware can handle.
1431
1432
  * This is applied separately from user restrictions because the setting
1432
1433
  * should not be easily replaced by the user's configuration.
@@ -1650,6 +1651,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1650
1651
  * Called when receive the response
1651
1652
  */
1652
1653
  constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry, onResponse) {}
1654
+ /**
1655
+ * @param {boolean} forceHTTP
1656
+ */
1657
+ setForceHTTP(forceHTTP) {}
1653
1658
  /**
1654
1659
  * @param {boolean} forceHTTPS
1655
1660
  */
@@ -2942,6 +2947,12 @@ shaka.util.ConfigUtils = class {
2942
2947
  * @return {!Object}
2943
2948
  */
2944
2949
  static convertToConfigObject(fieldName, value) {}
2950
+ /**
2951
+ * @param {!Object} object
2952
+ * @param {!Object} base
2953
+ * @return {!Object}
2954
+ */
2955
+ static getDifferenceFromConfigObjects(object, base) {}
2945
2956
  };
2946
2957
  /**
2947
2958
  * @summary A set of FairPlay utility functions.
@@ -3359,6 +3370,17 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3359
3370
  * @return {!Promise.<?shaka.media.PreloadManager>}
3360
3371
  */
3361
3372
  unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
3373
+ /**
3374
+ * Detach the player from the current media element, if any, and returns a
3375
+ * PreloadManager that contains the loaded manifest of that asset, if any.
3376
+ * Allows for the asset to be re-loaded by this player faster, in the future.
3377
+ * When in src= mode, this detach but does not make a PreloadManager.
3378
+ * Leaves the player in a state where it cannot play media, until it has been
3379
+ * attached to something else.
3380
+ * @param {boolean=} keepAdManager
3381
+ * @return {!Promise.<?shaka.media.PreloadManager>}
3382
+ */
3383
+ detachAndSavePreload(keepAdManager) {}
3362
3384
  /**
3363
3385
  * Starts to preload a given asset, and returns a PreloadManager object that
3364
3386
  * represents that preloading process.
@@ -3415,6 +3437,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3415
3437
  * @return {shaka.extern.PlayerConfiguration}
3416
3438
  */
3417
3439
  getConfiguration() {}
3440
+ /**
3441
+ * Return a copy of the current non default configuration. Modifications of
3442
+ * the returned value will not affect the Player's active configuration.
3443
+ * You must call <code>player.configure()</code> to make changes.
3444
+ * @return {!Object}
3445
+ */
3446
+ getNonDefaultConfiguration() {}
3418
3447
  /**
3419
3448
  * Returns the ratio of video length buffered compared to buffering Goal
3420
3449
  * @return {number}
@@ -4688,9 +4717,10 @@ shaka.util.PeriodCombiner = class {
4688
4717
  /**
4689
4718
  * @param {!Array.<shaka.extern.Period>} periods
4690
4719
  * @param {boolean} isDynamic
4720
+ * @param {boolean=} isPatchUpdate
4691
4721
  * @return {!Promise}
4692
4722
  */
4693
- combinePeriods(periods, isDynamic) {}
4723
+ combinePeriods(periods, isDynamic, isPatchUpdate) {}
4694
4724
  /**
4695
4725
  * @param {boolean} allowed If set to true, multi-mimeType or multi-codec
4696
4726
  * variants will be allowed.
@@ -5145,15 +5175,6 @@ shaka.polyfill.MediaCapabilities = class {
5145
5175
  * @type {MediaCapabilities}
5146
5176
  */
5147
5177
  shaka.polyfill.MediaCapabilities.originalMcap;
5148
- /**
5149
- * A cache that stores the MediaKeySystemAccess result of calling
5150
- * `navigator.requestMediaKeySystemAccess` by a key combination of
5151
- * video/audio codec and key system string.
5152
- * @type {(Object<(!string), (!MediaKeySystemAccess)>)}
5153
- */
5154
- shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_ = {
5155
-
5156
- };
5157
5178
  /**
5158
5179
  * A cache that stores the canDisplayType result of calling
5159
5180
  * `cast.__platform__.canDisplayType`.
@@ -5915,6 +5936,17 @@ shaka.ui.SeekBar = class extends shaka.ui.RangeElement {
5915
5936
  */
5916
5937
  shaka.ui.SeekBar.Factory = class {
5917
5938
  };
5939
+ /**
5940
+ * @extends {shaka.ui.Element}
5941
+ * @final
5942
+ */
5943
+ shaka.ui.SkipAdButton = class extends shaka.ui.Element {
5944
+ /**
5945
+ * @param {!HTMLElement} parent
5946
+ * @param {!shaka.ui.Controls} controls
5947
+ */
5948
+ constructor(parent, controls) {}
5949
+ };
5918
5950
  /**
5919
5951
  * A container for custom video controls.
5920
5952
  * @implements {shaka.util.IDestroyable}
@@ -6369,17 +6401,6 @@ shaka.ui.RewindButton = class extends shaka.ui.Element {
6369
6401
  */
6370
6402
  constructor(parent, controls) {}
6371
6403
  };
6372
- /**
6373
- * @extends {shaka.ui.Element}
6374
- * @final
6375
- */
6376
- shaka.ui.SkipAdButton = class extends shaka.ui.Element {
6377
- /**
6378
- * @param {!HTMLElement} parent
6379
- * @param {!shaka.ui.Controls} controls
6380
- */
6381
- constructor(parent, controls) {}
6382
- };
6383
6404
  /**
6384
6405
  * @extends {shaka.ui.PlayButton}
6385
6406
  * @final