shaka-player 4.11.13 → 4.12.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 (71) hide show
  1. package/README.md +47 -0
  2. package/dist/deps.js +8 -8
  3. package/dist/locales.js +35 -35
  4. package/dist/shaka-player.compiled.d.ts +36 -13
  5. package/dist/shaka-player.compiled.debug.d.ts +36 -13
  6. package/dist/shaka-player.compiled.debug.externs.js +46 -11
  7. package/dist/shaka-player.compiled.debug.js +543 -517
  8. package/dist/shaka-player.compiled.debug.map +4 -4
  9. package/dist/shaka-player.compiled.externs.js +46 -11
  10. package/dist/shaka-player.compiled.js +1348 -1331
  11. package/dist/shaka-player.compiled.map +4 -4
  12. package/dist/shaka-player.ui.d.ts +37 -14
  13. package/dist/shaka-player.ui.debug.d.ts +37 -14
  14. package/dist/shaka-player.ui.debug.externs.js +46 -11
  15. package/dist/shaka-player.ui.debug.js +629 -598
  16. package/dist/shaka-player.ui.debug.map +4 -4
  17. package/dist/shaka-player.ui.externs.js +46 -11
  18. package/dist/shaka-player.ui.js +1624 -1603
  19. package/dist/shaka-player.ui.map +4 -4
  20. package/externs/shaka/ads.js +9 -0
  21. package/externs/shaka/manifest.js +26 -1
  22. package/externs/shaka/offline.js +8 -2
  23. package/externs/shaka/player.js +80 -28
  24. package/externs/shaka/text.js +9 -0
  25. package/lib/ads/ad_manager.js +6 -0
  26. package/lib/ads/ad_utils.js +1 -0
  27. package/lib/ads/client_side_ad.js +8 -0
  28. package/lib/ads/interstitial_ad.js +25 -4
  29. package/lib/ads/interstitial_ad_manager.js +67 -8
  30. package/lib/ads/media_tailor_ad.js +8 -0
  31. package/lib/ads/server_side_ad.js +8 -0
  32. package/lib/dash/content_protection.js +31 -0
  33. package/lib/dash/dash_parser.js +22 -12
  34. package/lib/hls/hls_parser.js +63 -49
  35. package/lib/media/adaptation_set.js +11 -17
  36. package/lib/media/adaptation_set_criteria.js +4 -9
  37. package/lib/media/drm_engine.js +3 -1
  38. package/lib/media/manifest_filterer.js +2 -1
  39. package/lib/media/media_source_engine.js +286 -20
  40. package/lib/media/playhead.js +3 -1
  41. package/lib/media/preload_manager.js +10 -7
  42. package/lib/media/segment_prefetch.js +32 -13
  43. package/lib/media/segment_reference.js +3 -3
  44. package/lib/media/streaming_engine.js +87 -261
  45. package/lib/mss/mss_parser.js +1 -0
  46. package/lib/offline/download_info.js +5 -1
  47. package/lib/offline/indexeddb/storage_mechanism.js +4 -3
  48. package/lib/offline/indexeddb/v1_storage_cell.js +2 -0
  49. package/lib/offline/indexeddb/v2_storage_cell.js +2 -0
  50. package/lib/offline/manifest_converter.js +4 -0
  51. package/lib/offline/storage.js +277 -5
  52. package/lib/player.js +224 -78
  53. package/lib/text/simple_text_displayer.js +7 -0
  54. package/lib/text/stub_text_displayer.js +7 -0
  55. package/lib/text/ui_text_displayer.js +12 -0
  56. package/lib/util/dom_utils.js +14 -0
  57. package/lib/util/error.js +5 -0
  58. package/lib/util/periods.js +2 -0
  59. package/lib/util/platform.js +15 -0
  60. package/lib/util/player_configuration.js +11 -4
  61. package/lib/util/stream_utils.js +20 -1
  62. package/package.json +1 -1
  63. package/ui/ad_statistics_button.js +12 -0
  64. package/ui/controls.js +31 -7
  65. package/ui/externs/ui.js +8 -1
  66. package/ui/fullscreen_button.js +9 -0
  67. package/ui/locales/be.json +49 -0
  68. package/ui/mute_button.js +42 -11
  69. package/ui/skip_ad_button.js +16 -11
  70. package/ui/statistics_button.js +12 -0
  71. package/ui/ui.js +10 -5
@@ -460,6 +460,7 @@ shaka.util.Error.Code = {
460
460
  'DASH_UNSUPPORTED_AES_128': 4051,
461
461
  'DASH_INVALID_PATCH': 4052,
462
462
  'HLS_EMPTY_MEDIA_PLAYLIST': 4053,
463
+ 'DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4054,
463
464
  'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
464
465
  'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
465
466
  'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
@@ -2197,12 +2198,12 @@ shaka.media.SegmentReference = class {
2197
2198
  hasByterangeOptimization() {}
2198
2199
  /**
2199
2200
  * Set the segment's thumbnail sprite.
2200
- * @param {shaka.media.SegmentReference.ThumbnailSprite} thumbnailSprite
2201
+ * @param {shaka.extern.ThumbnailSprite} thumbnailSprite
2201
2202
  */
2202
2203
  setThumbnailSprite(thumbnailSprite) {}
2203
2204
  /**
2204
2205
  * Returns the segment's thumbnail sprite.
2205
- * @return {?shaka.media.SegmentReference.ThumbnailSprite}
2206
+ * @return {?shaka.extern.ThumbnailSprite}
2206
2207
  */
2207
2208
  getThumbnailSprite() {}
2208
2209
  /**
@@ -2255,6 +2256,14 @@ shaka.media.SegmentReference.Status = {
2255
2256
  * The thumbnail width in px.
2256
2257
  */
2257
2258
  shaka.media.SegmentReference.ThumbnailSprite;
2259
+ /** */
2260
+ shaka.util.Dom = class {
2261
+ /**
2262
+ * Remove all of the child nodes of an element.
2263
+ * @param {!Element} element
2264
+ */
2265
+ static removeAllChildren(element) {}
2266
+ };
2258
2267
  /**
2259
2268
  * @summary A set of Id3Utils utility functions.
2260
2269
  */
@@ -3055,6 +3064,10 @@ shaka.text.SimpleTextDisplayer = class {
3055
3064
  * @override
3056
3065
  */
3057
3066
  setTextVisibility(on) {}
3067
+ /**
3068
+ * @override
3069
+ */
3070
+ setTextLanguage(language) {}
3058
3071
  };
3059
3072
  /**
3060
3073
  * A stub text displayer plugin that does nothing
@@ -3085,14 +3098,10 @@ shaka.text.StubTextDisplayer = class {
3085
3098
  * @override
3086
3099
  */
3087
3100
  setTextVisibility(on) {}
3088
- };
3089
- /** */
3090
- shaka.util.Dom = class {
3091
3101
  /**
3092
- * Remove all of the child nodes of an element.
3093
- * @param {!Element} element
3102
+ * @override
3094
3103
  */
3095
- static removeAllChildren(element) {}
3104
+ setTextLanguage(language) {}
3096
3105
  };
3097
3106
  /**
3098
3107
  * The text displayer plugin for the Shaka Player UI. Can also be used directly
@@ -3132,6 +3141,10 @@ shaka.text.UITextDisplayer = class {
3132
3141
  * @override
3133
3142
  */
3134
3143
  setTextVisibility(on) {}
3144
+ /**
3145
+ * @override
3146
+ */
3147
+ setTextLanguage(language) {}
3135
3148
  };
3136
3149
  /**
3137
3150
  * @summary Manage the conversion to WebVTT.
@@ -3851,6 +3864,10 @@ shaka.ads.ClientSideAd = class {
3851
3864
  * @override
3852
3865
  */
3853
3866
  isClientRendering() {}
3867
+ /**
3868
+ * @override
3869
+ */
3870
+ isUsingAnotherMediaElement() {}
3854
3871
  /**
3855
3872
  * @override
3856
3873
  */
@@ -4162,11 +4179,13 @@ shaka.ads.InterstitialAd = class {
4162
4179
  * @param {HTMLMediaElement} video
4163
4180
  * @param {boolean} isSkippable
4164
4181
  * @param {?number} skipOffset
4182
+ * @param {?number} skipFor
4165
4183
  * @param {function()} onSkip
4166
4184
  * @param {number} sequenceLength
4167
4185
  * @param {number} adPosition
4186
+ * @param {boolean} isUsingAnotherMediaElement
4168
4187
  */
4169
- constructor(video, isSkippable, skipOffset, onSkip, sequenceLength, adPosition) {}
4188
+ constructor(video, isSkippable, skipOffset, skipFor, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement) {}
4170
4189
  /**
4171
4190
  * @override
4172
4191
  */
@@ -4175,6 +4194,10 @@ shaka.ads.InterstitialAd = class {
4175
4194
  * @override
4176
4195
  */
4177
4196
  isClientRendering() {}
4197
+ /**
4198
+ * @override
4199
+ */
4200
+ isUsingAnotherMediaElement() {}
4178
4201
  /**
4179
4202
  * @override
4180
4203
  */
@@ -4315,6 +4338,10 @@ shaka.ads.MediaTailorAd = class {
4315
4338
  * @override
4316
4339
  */
4317
4340
  isClientRendering() {}
4341
+ /**
4342
+ * @override
4343
+ */
4344
+ isUsingAnotherMediaElement() {}
4318
4345
  /**
4319
4346
  * @override
4320
4347
  */
@@ -4453,6 +4480,10 @@ shaka.ads.ServerSideAd = class {
4453
4480
  * @override
4454
4481
  */
4455
4482
  isClientRendering() {}
4483
+ /**
4484
+ * @override
4485
+ */
4486
+ isUsingAnotherMediaElement() {}
4456
4487
  /**
4457
4488
  * @override
4458
4489
  */
@@ -5482,8 +5513,12 @@ shaka.offline.Storage = class {
5482
5513
  * application-specific metadata you need associated with the stored
5483
5514
  * content. For details on the data types that can be stored here, please
5484
5515
  * refer to {@link https://bit.ly/StructClone}
5485
- * @param {string=} mimeType
5516
+ * @param {?string=} mimeType
5486
5517
  * The mime type for the content |manifestUri| points to.
5518
+ * @param {?Array.<string>=} externalThumbnails
5519
+ * The external thumbnails to store along the main content.
5520
+ * @param {?Array.<shaka.extern.ExtraText>=} externalText
5521
+ * The external text to store along the main content.
5487
5522
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.StoredContent>}
5488
5523
  * An AbortableOperation that resolves with a structure representing what
5489
5524
  * was stored. The "offlineUri" member is the URI that should be given to
@@ -5492,7 +5527,7 @@ shaka.offline.Storage = class {
5492
5527
  * If you want to cancel this download, call the "abort" method on
5493
5528
  * AbortableOperation.
5494
5529
  */
5495
- store(uri, appMetadata, mimeType) {}
5530
+ store(uri, appMetadata, mimeType, externalThumbnails, externalText) {}
5496
5531
  /**
5497
5532
  * Removes the given stored content. This will also attempt to release the
5498
5533
  * licenses, if any.