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
@@ -345,6 +345,7 @@ shaka.util.Error.Code = {
345
345
  'DASH_UNSUPPORTED_AES_128': 4051,
346
346
  'DASH_INVALID_PATCH': 4052,
347
347
  'HLS_EMPTY_MEDIA_PLAYLIST': 4053,
348
+ 'DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED': 4054,
348
349
  'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
349
350
  'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
350
351
  'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
@@ -2309,12 +2310,12 @@ shaka.media.SegmentReference = class {
2309
2310
  hasByterangeOptimization() {}
2310
2311
  /**
2311
2312
  * Set the segment's thumbnail sprite.
2312
- * @param {shaka.media.SegmentReference.ThumbnailSprite} thumbnailSprite
2313
+ * @param {shaka.extern.ThumbnailSprite} thumbnailSprite
2313
2314
  */
2314
2315
  setThumbnailSprite(thumbnailSprite) {}
2315
2316
  /**
2316
2317
  * Returns the segment's thumbnail sprite.
2317
- * @return {?shaka.media.SegmentReference.ThumbnailSprite}
2318
+ * @return {?shaka.extern.ThumbnailSprite}
2318
2319
  */
2319
2320
  getThumbnailSprite() {}
2320
2321
  /**
@@ -2367,6 +2368,14 @@ shaka.media.SegmentReference.Status = {
2367
2368
  * The thumbnail width in px.
2368
2369
  */
2369
2370
  shaka.media.SegmentReference.ThumbnailSprite;
2371
+ /** */
2372
+ shaka.util.Dom = class {
2373
+ /**
2374
+ * Remove all of the child nodes of an element.
2375
+ * @param {!Element} element
2376
+ */
2377
+ static removeAllChildren(element) {}
2378
+ };
2370
2379
  /**
2371
2380
  * @summary A set of Id3Utils utility functions.
2372
2381
  */
@@ -3167,6 +3176,10 @@ shaka.text.SimpleTextDisplayer = class {
3167
3176
  * @override
3168
3177
  */
3169
3178
  setTextVisibility(on) {}
3179
+ /**
3180
+ * @override
3181
+ */
3182
+ setTextLanguage(language) {}
3170
3183
  };
3171
3184
  /**
3172
3185
  * A stub text displayer plugin that does nothing
@@ -3197,14 +3210,10 @@ shaka.text.StubTextDisplayer = class {
3197
3210
  * @override
3198
3211
  */
3199
3212
  setTextVisibility(on) {}
3200
- };
3201
- /** */
3202
- shaka.util.Dom = class {
3203
3213
  /**
3204
- * Remove all of the child nodes of an element.
3205
- * @param {!Element} element
3214
+ * @override
3206
3215
  */
3207
- static removeAllChildren(element) {}
3216
+ setTextLanguage(language) {}
3208
3217
  };
3209
3218
  /**
3210
3219
  * The text displayer plugin for the Shaka Player UI. Can also be used directly
@@ -3244,6 +3253,10 @@ shaka.text.UITextDisplayer = class {
3244
3253
  * @override
3245
3254
  */
3246
3255
  setTextVisibility(on) {}
3256
+ /**
3257
+ * @override
3258
+ */
3259
+ setTextLanguage(language) {}
3247
3260
  };
3248
3261
  /**
3249
3262
  * @summary Manage the conversion to WebVTT.
@@ -3963,6 +3976,10 @@ shaka.ads.ClientSideAd = class {
3963
3976
  * @override
3964
3977
  */
3965
3978
  isClientRendering() {}
3979
+ /**
3980
+ * @override
3981
+ */
3982
+ isUsingAnotherMediaElement() {}
3966
3983
  /**
3967
3984
  * @override
3968
3985
  */
@@ -4274,11 +4291,13 @@ shaka.ads.InterstitialAd = class {
4274
4291
  * @param {HTMLMediaElement} video
4275
4292
  * @param {boolean} isSkippable
4276
4293
  * @param {?number} skipOffset
4294
+ * @param {?number} skipFor
4277
4295
  * @param {function()} onSkip
4278
4296
  * @param {number} sequenceLength
4279
4297
  * @param {number} adPosition
4298
+ * @param {boolean} isUsingAnotherMediaElement
4280
4299
  */
4281
- constructor(video, isSkippable, skipOffset, onSkip, sequenceLength, adPosition) {}
4300
+ constructor(video, isSkippable, skipOffset, skipFor, onSkip, sequenceLength, adPosition, isUsingAnotherMediaElement) {}
4282
4301
  /**
4283
4302
  * @override
4284
4303
  */
@@ -4287,6 +4306,10 @@ shaka.ads.InterstitialAd = class {
4287
4306
  * @override
4288
4307
  */
4289
4308
  isClientRendering() {}
4309
+ /**
4310
+ * @override
4311
+ */
4312
+ isUsingAnotherMediaElement() {}
4290
4313
  /**
4291
4314
  * @override
4292
4315
  */
@@ -4427,6 +4450,10 @@ shaka.ads.MediaTailorAd = class {
4427
4450
  * @override
4428
4451
  */
4429
4452
  isClientRendering() {}
4453
+ /**
4454
+ * @override
4455
+ */
4456
+ isUsingAnotherMediaElement() {}
4430
4457
  /**
4431
4458
  * @override
4432
4459
  */
@@ -4565,6 +4592,10 @@ shaka.ads.ServerSideAd = class {
4565
4592
  * @override
4566
4593
  */
4567
4594
  isClientRendering() {}
4595
+ /**
4596
+ * @override
4597
+ */
4598
+ isUsingAnotherMediaElement() {}
4568
4599
  /**
4569
4600
  * @override
4570
4601
  */
@@ -5594,8 +5625,12 @@ shaka.offline.Storage = class {
5594
5625
  * application-specific metadata you need associated with the stored
5595
5626
  * content. For details on the data types that can be stored here, please
5596
5627
  * refer to {@link https://bit.ly/StructClone}
5597
- * @param {string=} mimeType
5628
+ * @param {?string=} mimeType
5598
5629
  * The mime type for the content |manifestUri| points to.
5630
+ * @param {?Array.<string>=} externalThumbnails
5631
+ * The external thumbnails to store along the main content.
5632
+ * @param {?Array.<shaka.extern.ExtraText>=} externalText
5633
+ * The external text to store along the main content.
5599
5634
  * @return {!shaka.extern.IAbortableOperation.<shaka.extern.StoredContent>}
5600
5635
  * An AbortableOperation that resolves with a structure representing what
5601
5636
  * was stored. The "offlineUri" member is the URI that should be given to
@@ -5604,7 +5639,7 @@ shaka.offline.Storage = class {
5604
5639
  * If you want to cancel this download, call the "abort" method on
5605
5640
  * AbortableOperation.
5606
5641
  */
5607
- store(uri, appMetadata, mimeType) {}
5642
+ store(uri, appMetadata, mimeType, externalThumbnails, externalText) {}
5608
5643
  /**
5609
5644
  * Removes the given stored content. This will also attempt to release the
5610
5645
  * licenses, if any.