shaka-player 4.3.0 → 4.3.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/.github/workflows/build-and-test.yaml +7 -0
  2. package/AUTHORS +1 -0
  3. package/CHANGELOG.md +33 -0
  4. package/CONTRIBUTORS +1 -0
  5. package/conditional/dummy_cast_proxy.js +120 -0
  6. package/dist/demo.compiled.debug.js +104 -110
  7. package/dist/demo.compiled.debug.map +3 -3
  8. package/dist/demo.compiled.js +104 -110
  9. package/dist/demo.compiled.map +3 -3
  10. package/dist/deps.js +8 -6
  11. package/dist/locales.js +28 -28
  12. package/dist/receiver.compiled.debug.js +54 -60
  13. package/dist/receiver.compiled.debug.map +3 -3
  14. package/dist/receiver.compiled.js +54 -60
  15. package/dist/receiver.compiled.map +3 -3
  16. package/dist/shaka-player.compiled.d.ts +19 -2
  17. package/dist/shaka-player.compiled.debug.d.ts +19 -2
  18. package/dist/shaka-player.compiled.debug.externs.js +102 -80
  19. package/dist/shaka-player.compiled.debug.js +632 -628
  20. package/dist/shaka-player.compiled.debug.map +4 -4
  21. package/dist/shaka-player.compiled.externs.js +102 -80
  22. package/dist/shaka-player.compiled.js +903 -900
  23. package/dist/shaka-player.compiled.map +4 -4
  24. package/dist/shaka-player.ui.d.ts +19 -2
  25. package/dist/shaka-player.ui.debug.d.ts +19 -2
  26. package/dist/shaka-player.ui.debug.externs.js +102 -80
  27. package/dist/shaka-player.ui.debug.js +681 -678
  28. package/dist/shaka-player.ui.debug.map +4 -4
  29. package/dist/shaka-player.ui.externs.js +102 -80
  30. package/dist/shaka-player.ui.js +1033 -1031
  31. package/dist/shaka-player.ui.map +4 -4
  32. package/docs/tutorials/welcome.md +2 -2
  33. package/externs/shaka/mp4_parser.js +3 -0
  34. package/externs/shaka/player.js +2 -1
  35. package/lib/cea/cea708_window.js +2 -2
  36. package/lib/cea/mp4_cea_parser.js +37 -16
  37. package/lib/dash/segment_template.js +1 -1
  38. package/lib/hls/hls_parser.js +37 -19
  39. package/lib/media/content_workarounds.js +12 -0
  40. package/lib/media/media_source_capabilities.js +36 -0
  41. package/lib/media/media_source_engine.js +12 -7
  42. package/lib/media/transmuxer.js +6 -4
  43. package/lib/player.js +5 -5
  44. package/lib/polyfill/abort_controller.js +143 -0
  45. package/lib/polyfill/media_capabilities.js +65 -11
  46. package/lib/polyfill/patchedmediakeys_apple.js +33 -28
  47. package/lib/text/ttml_text_parser.js +32 -7
  48. package/lib/text/ui_text_displayer.js +17 -0
  49. package/lib/util/mp4_box_parsers.js +24 -0
  50. package/lib/util/mp4_parser.js +35 -0
  51. package/lib/util/player_configuration.js +10 -3
  52. package/lib/util/stream_utils.js +35 -13
  53. package/package.json +4 -4
  54. package/shaka-player.uncompiled.js +1 -0
  55. package/test/ads/ad_manager_unit.js +3 -1
  56. package/test/dash/dash_parser_manifest_unit.js +1 -0
  57. package/test/hls/hls_parser_unit.js +132 -0
  58. package/test/media/drm_engine_unit.js +11 -1
  59. package/test/media/media_source_engine_integration.js +78 -2
  60. package/test/polyfill/media_capabilities_unit.js +259 -0
  61. package/test/polyfill/patchedmediakeys_apple_unit.js +6 -0
  62. package/test/test/util/stream_generator.js +212 -8
  63. package/test/test/util/test_scheme.js +4 -3
  64. package/test/test/util/util.js +3 -2
  65. package/test/text/mp4_ttml_parser_unit.js +6 -4
  66. package/test/text/ttml_text_parser_unit.js +119 -86
  67. package/test/text/ui_text_displayer_unit.js +76 -0
  68. package/test/util/stream_utils_unit.js +18 -0
  69. package/test/util/xml_utils_unit.js +6 -1
  70. package/third_party/closure-uri/uri.js +1 -1
  71. package/ui/controls.js +45 -36
@@ -1695,6 +1695,14 @@ shaka.util.Mp4Parser = class {
1695
1695
  * @param {!shaka.extern.ParsedBox} box
1696
1696
  */
1697
1697
  static sampleDescription(box) {}
1698
+ /**
1699
+ * A callback that tells the Mp4 parser to treat the body of a box as a visual
1700
+ * sample entry. A visual sample entry has some fixed-sized fields
1701
+ * describing the video codec parameters, followed by an arbitrary number of
1702
+ * appended children. Each child is a box.
1703
+ * @param {!shaka.extern.ParsedBox} box
1704
+ */
1705
+ static visualSampleEntry(box) {}
1698
1706
  /**
1699
1707
  * Create a callback that tells the Mp4 parser to treat the body of a box as a
1700
1708
  * binary blob and to parse the body's contents using the provided callback.
@@ -2457,6 +2465,85 @@ shaka.util.ConfigUtils = class {
2457
2465
  */
2458
2466
  static convertToConfigObject(fieldName, value) {}
2459
2467
  };
2468
+ /**
2469
+ * @summary A set of FairPlay utility functions.
2470
+ */
2471
+ shaka.util.FairPlayUtils = class {
2472
+ /**
2473
+ * Check if FairPlay is supported.
2474
+ * @return {!Promise.<boolean>}
2475
+ */
2476
+ static isFairPlaySupported() {}
2477
+ /**
2478
+ * Using the default method, extract a content ID from the init data. This is
2479
+ * based on the FairPlay example documentation.
2480
+ * @param {!BufferSource} initData
2481
+ * @return {string}
2482
+ */
2483
+ static defaultGetContentId(initData) {}
2484
+ /**
2485
+ * Transforms the init data buffer using the given data. The format is:
2486
+ * <pre>
2487
+ * [4 bytes] initDataSize
2488
+ * [initDataSize bytes] initData
2489
+ * [4 bytes] contentIdSize
2490
+ * [contentIdSize bytes] contentId
2491
+ * [4 bytes] certSize
2492
+ * [certSize bytes] cert
2493
+ * </pre>
2494
+ * @param {!BufferSource} initData
2495
+ * @param {!BufferSource|string} contentId
2496
+ * @param {?BufferSource} cert The server certificate; this will throw if not
2497
+ * provided.
2498
+ * @return {!Uint8Array}
2499
+ */
2500
+ static initDataTransform(initData, contentId, cert) {}
2501
+ /**
2502
+ * Verimatrix initDataTransform configuration.
2503
+ * @param {!Uint8Array} initData
2504
+ * @param {string} initDataType
2505
+ * @param {?shaka.extern.DrmInfo} drmInfo
2506
+ */
2507
+ static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
2508
+ /**
2509
+ * EZDRM initDataTransform configuration.
2510
+ * @param {!Uint8Array} initData
2511
+ * @param {string} initDataType
2512
+ * @param {?shaka.extern.DrmInfo} drmInfo
2513
+ */
2514
+ static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
2515
+ /**
2516
+ * Conax initDataTransform configuration.
2517
+ * @param {!Uint8Array} initData
2518
+ * @param {string} initDataType
2519
+ * @param {?shaka.extern.DrmInfo} drmInfo
2520
+ */
2521
+ static conaxInitDataTransform(initData, initDataType, drmInfo) {}
2522
+ /**
2523
+ * Verimatrix FairPlay request.
2524
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2525
+ * @param {shaka.extern.Request} request
2526
+ */
2527
+ static verimatrixFairPlayRequest(type, request) {}
2528
+ /**
2529
+ * EZDRM FairPlay request.
2530
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2531
+ * @param {shaka.extern.Request} request
2532
+ */
2533
+ static ezdrmFairPlayRequest(type, request) {}
2534
+ /**
2535
+ * Conax FairPlay request.
2536
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2537
+ * @param {shaka.extern.Request} request
2538
+ */
2539
+ static conaxFairPlayRequest(type, request) {}
2540
+ /**
2541
+ * Common FairPlay response transform for some DRMs providers.
2542
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2543
+ * @param {shaka.extern.Response} response
2544
+ */
2545
+ static commonFairPlayResponse(type, response) {}
2546
+ };
2460
2547
  /**
2461
2548
  * @final
2462
2549
  */
@@ -3889,6 +3976,20 @@ shaka.polyfill = class {
3889
3976
  */
3890
3977
  static register(polyfill, priority) {}
3891
3978
  };
3979
+ /**
3980
+ * @summary A polyfill for systems that do not implement AbortController.
3981
+ * This is used both with the fetch API for HTTP requests and inside the HLS
3982
+ * parser.
3983
+ * @extends AbortController
3984
+ */
3985
+ shaka.polyfill.AbortController = class {
3986
+ /**
3987
+ * Install the polyfill if needed.
3988
+ */
3989
+ static install() {}
3990
+ /** */
3991
+ constructor() {}
3992
+ };
3892
3993
  /**
3893
3994
  * @summary A polyfill to add support for the ARIAMixin interface mixin, for
3894
3995
  * browsers that do not implement it (e.g. Firefox).
@@ -3974,7 +4075,7 @@ shaka.polyfill.Orientation = class {
3974
4075
  shaka.polyfill.PatchedMediaKeysApple = class {
3975
4076
  /**
3976
4077
  * Installs the polyfill if needed.
3977
- * @param {boolean} enableUninstall enables uninstalling the polyfill
4078
+ * @param {boolean=} enableUninstall enables uninstalling the polyfill
3978
4079
  */
3979
4080
  static install(enableUninstall) {}
3980
4081
  /**
@@ -4227,85 +4328,6 @@ shaka.text.SsaTextParser = class {
4227
4328
  */
4228
4329
  parseMedia(data, time) {}
4229
4330
  };
4230
- /**
4231
- * @summary A set of FairPlay utility functions.
4232
- */
4233
- shaka.util.FairPlayUtils = class {
4234
- /**
4235
- * Check if FairPlay is supported.
4236
- * @return {!Promise.<boolean>}
4237
- */
4238
- static isFairPlaySupported() {}
4239
- /**
4240
- * Using the default method, extract a content ID from the init data. This is
4241
- * based on the FairPlay example documentation.
4242
- * @param {!BufferSource} initData
4243
- * @return {string}
4244
- */
4245
- static defaultGetContentId(initData) {}
4246
- /**
4247
- * Transforms the init data buffer using the given data. The format is:
4248
- * <pre>
4249
- * [4 bytes] initDataSize
4250
- * [initDataSize bytes] initData
4251
- * [4 bytes] contentIdSize
4252
- * [contentIdSize bytes] contentId
4253
- * [4 bytes] certSize
4254
- * [certSize bytes] cert
4255
- * </pre>
4256
- * @param {!BufferSource} initData
4257
- * @param {!BufferSource|string} contentId
4258
- * @param {?BufferSource} cert The server certificate; this will throw if not
4259
- * provided.
4260
- * @return {!Uint8Array}
4261
- */
4262
- static initDataTransform(initData, contentId, cert) {}
4263
- /**
4264
- * Verimatrix initDataTransform configuration.
4265
- * @param {!Uint8Array} initData
4266
- * @param {string} initDataType
4267
- * @param {?shaka.extern.DrmInfo} drmInfo
4268
- */
4269
- static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
4270
- /**
4271
- * EZDRM initDataTransform configuration.
4272
- * @param {!Uint8Array} initData
4273
- * @param {string} initDataType
4274
- * @param {?shaka.extern.DrmInfo} drmInfo
4275
- */
4276
- static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
4277
- /**
4278
- * Conax initDataTransform configuration.
4279
- * @param {!Uint8Array} initData
4280
- * @param {string} initDataType
4281
- * @param {?shaka.extern.DrmInfo} drmInfo
4282
- */
4283
- static conaxInitDataTransform(initData, initDataType, drmInfo) {}
4284
- /**
4285
- * Verimatrix FairPlay request.
4286
- * @param {shaka.net.NetworkingEngine.RequestType} type
4287
- * @param {shaka.extern.Request} request
4288
- */
4289
- static verimatrixFairPlayRequest(type, request) {}
4290
- /**
4291
- * EZDRM FairPlay request.
4292
- * @param {shaka.net.NetworkingEngine.RequestType} type
4293
- * @param {shaka.extern.Request} request
4294
- */
4295
- static ezdrmFairPlayRequest(type, request) {}
4296
- /**
4297
- * Conax FairPlay request.
4298
- * @param {shaka.net.NetworkingEngine.RequestType} type
4299
- * @param {shaka.extern.Request} request
4300
- */
4301
- static conaxFairPlayRequest(type, request) {}
4302
- /**
4303
- * Common FairPlay response transform for some DRMs providers.
4304
- * @param {shaka.net.NetworkingEngine.RequestType} type
4305
- * @param {shaka.extern.Response} response
4306
- */
4307
- static commonFairPlayResponse(type, response) {}
4308
- };
4309
4331
  /**
4310
4332
  * @implements {shaka.extern.IUIElement}
4311
4333
  * @abstract