shaka-player 4.8.10 → 4.9.1

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 (66) 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 +34 -34
  6. package/dist/shaka-player.compiled.d.ts +39 -18
  7. package/dist/shaka-player.compiled.debug.d.ts +39 -18
  8. package/dist/shaka-player.compiled.debug.externs.js +32 -12
  9. package/dist/shaka-player.compiled.debug.js +638 -579
  10. package/dist/shaka-player.compiled.debug.map +4 -4
  11. package/dist/shaka-player.compiled.externs.js +32 -12
  12. package/dist/shaka-player.compiled.js +1272 -1237
  13. package/dist/shaka-player.compiled.map +4 -4
  14. package/dist/shaka-player.ui.d.ts +39 -18
  15. package/dist/shaka-player.ui.debug.d.ts +39 -18
  16. package/dist/shaka-player.ui.debug.externs.js +43 -23
  17. package/dist/shaka-player.ui.debug.js +668 -609
  18. package/dist/shaka-player.ui.debug.map +4 -4
  19. package/dist/shaka-player.ui.externs.js +43 -23
  20. package/dist/shaka-player.ui.js +1487 -1451
  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/dash/dash_parser.js +655 -46
  30. package/lib/dash/mpd_utils.js +7 -8
  31. package/lib/dash/segment_template.js +65 -10
  32. package/lib/hls/hls_parser.js +92 -34
  33. package/lib/media/content_workarounds.js +4 -2
  34. package/lib/media/drm_engine.js +274 -40
  35. package/lib/media/manifest_filterer.js +2 -2
  36. package/lib/media/media_source_engine.js +66 -31
  37. package/lib/media/segment_utils.js +14 -3
  38. package/lib/mss/mss_parser.js +2 -0
  39. package/lib/net/http_plugin_utils.js +2 -1
  40. package/lib/net/networking_engine.js +14 -0
  41. package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
  42. package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
  43. package/lib/offline/manifest_converter.js +2 -0
  44. package/lib/offline/storage.js +1 -0
  45. package/lib/player.js +220 -14
  46. package/lib/polyfill/media_capabilities.js +10 -35
  47. package/lib/transmuxer/aac_transmuxer.js +4 -2
  48. package/lib/transmuxer/ac3_transmuxer.js +2 -1
  49. package/lib/transmuxer/ec3_transmuxer.js +2 -1
  50. package/lib/transmuxer/mp3_transmuxer.js +4 -2
  51. package/lib/transmuxer/mpeg_ts_transmuxer.js +2 -1
  52. package/lib/transmuxer/mss_transmuxer.js +4 -2
  53. package/lib/transmuxer/ts_transmuxer.js +44 -24
  54. package/lib/util/config_utils.js +74 -6
  55. package/lib/util/error.js +17 -8
  56. package/lib/util/mp4_box_parsers.js +23 -2
  57. package/lib/util/periods.js +51 -28
  58. package/lib/util/platform.js +3 -1
  59. package/lib/util/player_configuration.js +20 -8
  60. package/lib/util/stream_utils.js +62 -30
  61. package/lib/util/tXml.js +74 -6
  62. package/package.json +2 -2
  63. package/support.html +1 -0
  64. package/ui/controls.js +4 -0
  65. package/ui/less/ad_controls.less +2 -1
  66. package/ui/resolution_selection.js +12 -3
@@ -302,7 +302,6 @@ shaka.util.Error.Code = {
302
302
  'TRANSMUXING_FAILED': 3018,
303
303
  'CONTENT_TRANSFORMATION_FAILED': 3019,
304
304
  'MSS_MISSING_DATA_FOR_TRANSMUXING': 3020,
305
- 'MSS_TRANSMUXING_CODEC_UNKNOWN': 3021,
306
305
  'MSS_TRANSMUXING_FAILED': 3022,
307
306
  'TRANSMUXING_NO_VIDEO_DATA': 3023,
308
307
  'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
@@ -344,6 +343,7 @@ shaka.util.Error.Code = {
344
343
  'AES_128_INVALID_KEY_LENGTH': 4049,
345
344
  'DASH_CONFLICTING_AES_128': 4050,
346
345
  'DASH_UNSUPPORTED_AES_128': 4051,
346
+ 'DASH_INVALID_PATCH': 4052,
347
347
  'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
348
348
  'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
349
349
  'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
@@ -1426,7 +1426,7 @@ shaka.util.StreamUtils = class {
1426
1426
  * @param {shaka.extern.Variant} variant
1427
1427
  * @param {shaka.extern.Restrictions} restrictions
1428
1428
  * Configured restrictions from the user.
1429
- * @param {{width: number, height: number}} maxHwRes
1429
+ * @param {shaka.extern.Resolution} maxHwRes
1430
1430
  * The maximum resolution the hardware can handle.
1431
1431
  * This is applied separately from user restrictions because the setting
1432
1432
  * should not be easily replaced by the user's configuration.
@@ -1650,6 +1650,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
1650
1650
  * Called when receive the response
1651
1651
  */
1652
1652
  constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry, onResponse) {}
1653
+ /**
1654
+ * @param {boolean} forceHTTP
1655
+ */
1656
+ setForceHTTP(forceHTTP) {}
1653
1657
  /**
1654
1658
  * @param {boolean} forceHTTPS
1655
1659
  */
@@ -2942,6 +2946,12 @@ shaka.util.ConfigUtils = class {
2942
2946
  * @return {!Object}
2943
2947
  */
2944
2948
  static convertToConfigObject(fieldName, value) {}
2949
+ /**
2950
+ * @param {!Object} object
2951
+ * @param {!Object} base
2952
+ * @return {!Object}
2953
+ */
2954
+ static getDifferenceFromConfigObjects(object, base) {}
2945
2955
  };
2946
2956
  /**
2947
2957
  * @summary A set of FairPlay utility functions.
@@ -3359,6 +3369,17 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3359
3369
  * @return {!Promise.<?shaka.media.PreloadManager>}
3360
3370
  */
3361
3371
  unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
3372
+ /**
3373
+ * Detach the player from the current media element, if any, and returns a
3374
+ * PreloadManager that contains the loaded manifest of that asset, if any.
3375
+ * Allows for the asset to be re-loaded by this player faster, in the future.
3376
+ * When in src= mode, this detach but does not make a PreloadManager.
3377
+ * Leaves the player in a state where it cannot play media, until it has been
3378
+ * attached to something else.
3379
+ * @param {boolean=} keepAdManager
3380
+ * @return {!Promise.<?shaka.media.PreloadManager>}
3381
+ */
3382
+ detachAndSavePreload(keepAdManager) {}
3362
3383
  /**
3363
3384
  * Starts to preload a given asset, and returns a PreloadManager object that
3364
3385
  * represents that preloading process.
@@ -3415,6 +3436,13 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3415
3436
  * @return {shaka.extern.PlayerConfiguration}
3416
3437
  */
3417
3438
  getConfiguration() {}
3439
+ /**
3440
+ * Return a copy of the current non default configuration. Modifications of
3441
+ * the returned value will not affect the Player's active configuration.
3442
+ * You must call <code>player.configure()</code> to make changes.
3443
+ * @return {!Object}
3444
+ */
3445
+ getNonDefaultConfiguration() {}
3418
3446
  /**
3419
3447
  * Returns the ratio of video length buffered compared to buffering Goal
3420
3448
  * @return {number}
@@ -4688,9 +4716,10 @@ shaka.util.PeriodCombiner = class {
4688
4716
  /**
4689
4717
  * @param {!Array.<shaka.extern.Period>} periods
4690
4718
  * @param {boolean} isDynamic
4719
+ * @param {boolean=} isPatchUpdate
4691
4720
  * @return {!Promise}
4692
4721
  */
4693
- combinePeriods(periods, isDynamic) {}
4722
+ combinePeriods(periods, isDynamic, isPatchUpdate) {}
4694
4723
  /**
4695
4724
  * @param {boolean} allowed If set to true, multi-mimeType or multi-codec
4696
4725
  * variants will be allowed.
@@ -5145,15 +5174,6 @@ shaka.polyfill.MediaCapabilities = class {
5145
5174
  * @type {MediaCapabilities}
5146
5175
  */
5147
5176
  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
5177
  /**
5158
5178
  * A cache that stores the canDisplayType result of calling
5159
5179
  * `cast.__platform__.canDisplayType`.
@@ -5915,6 +5935,17 @@ shaka.ui.SeekBar = class extends shaka.ui.RangeElement {
5915
5935
  */
5916
5936
  shaka.ui.SeekBar.Factory = class {
5917
5937
  };
5938
+ /**
5939
+ * @extends {shaka.ui.Element}
5940
+ * @final
5941
+ */
5942
+ shaka.ui.SkipAdButton = class extends shaka.ui.Element {
5943
+ /**
5944
+ * @param {!HTMLElement} parent
5945
+ * @param {!shaka.ui.Controls} controls
5946
+ */
5947
+ constructor(parent, controls) {}
5948
+ };
5918
5949
  /**
5919
5950
  * A container for custom video controls.
5920
5951
  * @implements {shaka.util.IDestroyable}
@@ -6369,17 +6400,6 @@ shaka.ui.RewindButton = class extends shaka.ui.Element {
6369
6400
  */
6370
6401
  constructor(parent, controls) {}
6371
6402
  };
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
6403
  /**
6384
6404
  * @extends {shaka.ui.PlayButton}
6385
6405
  * @final