shaka-player 4.2.4 → 4.2.6

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 (70) hide show
  1. package/.github/workflows/build-and-test.yaml +13 -0
  2. package/AUTHORS +2 -0
  3. package/CHANGELOG.md +35 -0
  4. package/CONTRIBUTORS +2 -0
  5. package/demo/index.html +1 -1
  6. package/dist/demo.compiled.debug.js +64 -64
  7. package/dist/demo.compiled.debug.map +2 -2
  8. package/dist/demo.compiled.js +64 -64
  9. package/dist/demo.compiled.map +2 -2
  10. package/dist/deps.js +3 -2
  11. package/dist/locales.js +30 -30
  12. package/dist/receiver.compiled.debug.js +12 -12
  13. package/dist/receiver.compiled.debug.map +2 -2
  14. package/dist/receiver.compiled.js +12 -12
  15. package/dist/receiver.compiled.map +2 -2
  16. package/dist/shaka-player.compiled.d.ts +10 -0
  17. package/dist/shaka-player.compiled.debug.d.ts +10 -0
  18. package/dist/shaka-player.compiled.debug.externs.js +93 -79
  19. package/dist/shaka-player.compiled.debug.js +585 -577
  20. package/dist/shaka-player.compiled.debug.map +4 -4
  21. package/dist/shaka-player.compiled.externs.js +93 -79
  22. package/dist/shaka-player.compiled.js +816 -814
  23. package/dist/shaka-player.compiled.map +4 -4
  24. package/dist/shaka-player.ui.d.ts +10 -0
  25. package/dist/shaka-player.ui.debug.d.ts +10 -0
  26. package/dist/shaka-player.ui.debug.externs.js +93 -79
  27. package/dist/shaka-player.ui.debug.js +615 -606
  28. package/dist/shaka-player.ui.debug.map +4 -4
  29. package/dist/shaka-player.ui.externs.js +93 -79
  30. package/dist/shaka-player.ui.js +964 -962
  31. package/dist/shaka-player.ui.map +4 -4
  32. package/docs/tutorials/ui.md +7 -7
  33. package/docs/tutorials/welcome.md +2 -2
  34. package/externs/shaka/player.js +2 -1
  35. package/lib/ads/ad_manager.js +2 -2
  36. package/lib/cea/cea708_window.js +2 -2
  37. package/lib/dash/segment_template.js +1 -1
  38. package/lib/hls/hls_parser.js +24 -6
  39. package/lib/media/content_workarounds.js +12 -0
  40. package/lib/media/media_source_engine.js +16 -0
  41. package/lib/media/segment_reference.js +3 -0
  42. package/lib/media/streaming_engine.js +33 -10
  43. package/lib/player.js +6 -2
  44. package/lib/polyfill/abort_controller.js +143 -0
  45. package/lib/polyfill/media_capabilities.js +59 -9
  46. package/lib/text/ttml_text_parser.js +32 -7
  47. package/lib/text/ui_text_displayer.js +22 -5
  48. package/lib/util/platform.js +9 -1
  49. package/lib/util/player_configuration.js +10 -3
  50. package/lib/util/stream_utils.js +30 -10
  51. package/package.json +1 -1
  52. package/shaka-player.uncompiled.js +1 -0
  53. package/test/dash/dash_parser_manifest_unit.js +1 -0
  54. package/test/hls/hls_parser_unit.js +1 -0
  55. package/test/media/drm_engine_unit.js +11 -1
  56. package/test/media/media_source_engine_integration.js +78 -2
  57. package/test/player_integration.js +10 -3
  58. package/test/polyfill/media_capabilities_unit.js +261 -0
  59. package/test/test/boot.js +29 -11
  60. package/test/test/util/manifest_parser_util.js +4 -3
  61. package/test/test/util/stream_generator.js +212 -8
  62. package/test/test/util/test_scheme.js +5 -4
  63. package/test/test/util/util.js +3 -2
  64. package/test/text/mp4_ttml_parser_unit.js +6 -4
  65. package/test/text/ttml_text_parser_unit.js +119 -86
  66. package/test/text/ui_text_displayer_unit.js +76 -0
  67. package/test/ui/text_displayer_layout_unit.js +14 -0
  68. package/test/util/stream_utils_unit.js +18 -0
  69. package/test/util/xml_utils_unit.js +6 -1
  70. package/ui/controls.js +49 -36
@@ -1469,6 +1469,16 @@ declare namespace shaka {
1469
1469
  }
1470
1470
  }
1471
1471
  // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.compiled.externs.js
1472
+ declare namespace shaka.polyfill {
1473
+ class AbortController extends AbortController {
1474
+ private noStructuralTyping_shaka_polyfill_AbortController : any;
1475
+ /**
1476
+ * Install the polyfill if needed.
1477
+ */
1478
+ static install ( ) : any ;
1479
+ }
1480
+ }
1481
+ // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.compiled.externs.js
1472
1482
  declare namespace shaka.polyfill {
1473
1483
  class Aria {
1474
1484
  private noStructuralTyping_shaka_polyfill_Aria : any;
@@ -1469,6 +1469,16 @@ declare namespace shaka {
1469
1469
  }
1470
1470
  }
1471
1471
  // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.compiled.debug.externs.js
1472
+ declare namespace shaka.polyfill {
1473
+ class AbortController extends AbortController {
1474
+ private noStructuralTyping_shaka_polyfill_AbortController : any;
1475
+ /**
1476
+ * Install the polyfill if needed.
1477
+ */
1478
+ static install ( ) : any ;
1479
+ }
1480
+ }
1481
+ // Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.compiled.debug.externs.js
1472
1482
  declare namespace shaka.polyfill {
1473
1483
  class Aria {
1474
1484
  private noStructuralTyping_shaka_polyfill_Aria : any;
@@ -2259,6 +2259,85 @@ shaka.util.ConfigUtils = class {
2259
2259
  */
2260
2260
  static convertToConfigObject(fieldName, value) {}
2261
2261
  };
2262
+ /**
2263
+ * @summary A set of FairPlay utility functions.
2264
+ */
2265
+ shaka.util.FairPlayUtils = class {
2266
+ /**
2267
+ * Check if FairPlay is supported.
2268
+ * @return {!Promise.<boolean>}
2269
+ */
2270
+ static isFairPlaySupported() {}
2271
+ /**
2272
+ * Using the default method, extract a content ID from the init data. This is
2273
+ * based on the FairPlay example documentation.
2274
+ * @param {!BufferSource} initData
2275
+ * @return {string}
2276
+ */
2277
+ static defaultGetContentId(initData) {}
2278
+ /**
2279
+ * Transforms the init data buffer using the given data. The format is:
2280
+ * <pre>
2281
+ * [4 bytes] initDataSize
2282
+ * [initDataSize bytes] initData
2283
+ * [4 bytes] contentIdSize
2284
+ * [contentIdSize bytes] contentId
2285
+ * [4 bytes] certSize
2286
+ * [certSize bytes] cert
2287
+ * </pre>
2288
+ * @param {!BufferSource} initData
2289
+ * @param {!BufferSource|string} contentId
2290
+ * @param {?BufferSource} cert The server certificate; this will throw if not
2291
+ * provided.
2292
+ * @return {!Uint8Array}
2293
+ */
2294
+ static initDataTransform(initData, contentId, cert) {}
2295
+ /**
2296
+ * Verimatrix initDataTransform configuration.
2297
+ * @param {!Uint8Array} initData
2298
+ * @param {string} initDataType
2299
+ * @param {?shaka.extern.DrmInfo} drmInfo
2300
+ */
2301
+ static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
2302
+ /**
2303
+ * EZDRM initDataTransform configuration.
2304
+ * @param {!Uint8Array} initData
2305
+ * @param {string} initDataType
2306
+ * @param {?shaka.extern.DrmInfo} drmInfo
2307
+ */
2308
+ static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
2309
+ /**
2310
+ * Conax initDataTransform configuration.
2311
+ * @param {!Uint8Array} initData
2312
+ * @param {string} initDataType
2313
+ * @param {?shaka.extern.DrmInfo} drmInfo
2314
+ */
2315
+ static conaxInitDataTransform(initData, initDataType, drmInfo) {}
2316
+ /**
2317
+ * Verimatrix FairPlay request.
2318
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2319
+ * @param {shaka.extern.Request} request
2320
+ */
2321
+ static verimatrixFairPlayRequest(type, request) {}
2322
+ /**
2323
+ * EZDRM FairPlay request.
2324
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2325
+ * @param {shaka.extern.Request} request
2326
+ */
2327
+ static ezdrmFairPlayRequest(type, request) {}
2328
+ /**
2329
+ * Conax FairPlay request.
2330
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2331
+ * @param {shaka.extern.Request} request
2332
+ */
2333
+ static conaxFairPlayRequest(type, request) {}
2334
+ /**
2335
+ * Common FairPlay response transform for some DRMs providers.
2336
+ * @param {shaka.net.NetworkingEngine.RequestType} type
2337
+ * @param {shaka.extern.Response} response
2338
+ */
2339
+ static commonFairPlayResponse(type, response) {}
2340
+ };
2262
2341
  /**
2263
2342
  * @final
2264
2343
  */
@@ -3657,6 +3736,20 @@ shaka.polyfill = class {
3657
3736
  */
3658
3737
  static register(polyfill, priority) {}
3659
3738
  };
3739
+ /**
3740
+ * @summary A polyfill for systems that do not implement AbortController.
3741
+ * This is used both with the fetch API for HTTP requests and inside the HLS
3742
+ * parser.
3743
+ * @extends AbortController
3744
+ */
3745
+ shaka.polyfill.AbortController = class {
3746
+ /**
3747
+ * Install the polyfill if needed.
3748
+ */
3749
+ static install() {}
3750
+ /** */
3751
+ constructor() {}
3752
+ };
3660
3753
  /**
3661
3754
  * @summary A polyfill to add support for the ARIAMixin interface mixin, for
3662
3755
  * browsers that do not implement it (e.g. Firefox).
@@ -3990,82 +4083,3 @@ shaka.text.SsaTextParser = class {
3990
4083
  */
3991
4084
  parseMedia(data, time) {}
3992
4085
  };
3993
- /**
3994
- * @summary A set of FairPlay utility functions.
3995
- */
3996
- shaka.util.FairPlayUtils = class {
3997
- /**
3998
- * Check if FairPlay is supported.
3999
- * @return {!Promise.<boolean>}
4000
- */
4001
- static isFairPlaySupported() {}
4002
- /**
4003
- * Using the default method, extract a content ID from the init data. This is
4004
- * based on the FairPlay example documentation.
4005
- * @param {!BufferSource} initData
4006
- * @return {string}
4007
- */
4008
- static defaultGetContentId(initData) {}
4009
- /**
4010
- * Transforms the init data buffer using the given data. The format is:
4011
- * <pre>
4012
- * [4 bytes] initDataSize
4013
- * [initDataSize bytes] initData
4014
- * [4 bytes] contentIdSize
4015
- * [contentIdSize bytes] contentId
4016
- * [4 bytes] certSize
4017
- * [certSize bytes] cert
4018
- * </pre>
4019
- * @param {!BufferSource} initData
4020
- * @param {!BufferSource|string} contentId
4021
- * @param {?BufferSource} cert The server certificate; this will throw if not
4022
- * provided.
4023
- * @return {!Uint8Array}
4024
- */
4025
- static initDataTransform(initData, contentId, cert) {}
4026
- /**
4027
- * Verimatrix initDataTransform configuration.
4028
- * @param {!Uint8Array} initData
4029
- * @param {string} initDataType
4030
- * @param {?shaka.extern.DrmInfo} drmInfo
4031
- */
4032
- static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
4033
- /**
4034
- * EZDRM initDataTransform configuration.
4035
- * @param {!Uint8Array} initData
4036
- * @param {string} initDataType
4037
- * @param {?shaka.extern.DrmInfo} drmInfo
4038
- */
4039
- static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
4040
- /**
4041
- * Conax initDataTransform configuration.
4042
- * @param {!Uint8Array} initData
4043
- * @param {string} initDataType
4044
- * @param {?shaka.extern.DrmInfo} drmInfo
4045
- */
4046
- static conaxInitDataTransform(initData, initDataType, drmInfo) {}
4047
- /**
4048
- * Verimatrix FairPlay request.
4049
- * @param {shaka.net.NetworkingEngine.RequestType} type
4050
- * @param {shaka.extern.Request} request
4051
- */
4052
- static verimatrixFairPlayRequest(type, request) {}
4053
- /**
4054
- * EZDRM FairPlay request.
4055
- * @param {shaka.net.NetworkingEngine.RequestType} type
4056
- * @param {shaka.extern.Request} request
4057
- */
4058
- static ezdrmFairPlayRequest(type, request) {}
4059
- /**
4060
- * Conax FairPlay request.
4061
- * @param {shaka.net.NetworkingEngine.RequestType} type
4062
- * @param {shaka.extern.Request} request
4063
- */
4064
- static conaxFairPlayRequest(type, request) {}
4065
- /**
4066
- * Common FairPlay response transform for some DRMs providers.
4067
- * @param {shaka.net.NetworkingEngine.RequestType} type
4068
- * @param {shaka.extern.Response} response
4069
- */
4070
- static commonFairPlayResponse(type, response) {}
4071
- };