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.
- package/.github/workflows/build-and-test.yaml +13 -0
- package/AUTHORS +2 -0
- package/CHANGELOG.md +35 -0
- package/CONTRIBUTORS +2 -0
- package/demo/index.html +1 -1
- package/dist/demo.compiled.debug.js +64 -64
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +64 -64
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +3 -2
- package/dist/locales.js +30 -30
- package/dist/receiver.compiled.debug.js +12 -12
- package/dist/receiver.compiled.debug.map +2 -2
- package/dist/receiver.compiled.js +12 -12
- package/dist/receiver.compiled.map +2 -2
- package/dist/shaka-player.compiled.d.ts +10 -0
- package/dist/shaka-player.compiled.debug.d.ts +10 -0
- package/dist/shaka-player.compiled.debug.externs.js +93 -79
- package/dist/shaka-player.compiled.debug.js +585 -577
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +93 -79
- package/dist/shaka-player.compiled.js +816 -814
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +10 -0
- package/dist/shaka-player.ui.debug.d.ts +10 -0
- package/dist/shaka-player.ui.debug.externs.js +93 -79
- package/dist/shaka-player.ui.debug.js +615 -606
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +93 -79
- package/dist/shaka-player.ui.js +964 -962
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ui.md +7 -7
- package/docs/tutorials/welcome.md +2 -2
- package/externs/shaka/player.js +2 -1
- package/lib/ads/ad_manager.js +2 -2
- package/lib/cea/cea708_window.js +2 -2
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +24 -6
- package/lib/media/content_workarounds.js +12 -0
- package/lib/media/media_source_engine.js +16 -0
- package/lib/media/segment_reference.js +3 -0
- package/lib/media/streaming_engine.js +33 -10
- package/lib/player.js +6 -2
- package/lib/polyfill/abort_controller.js +143 -0
- package/lib/polyfill/media_capabilities.js +59 -9
- package/lib/text/ttml_text_parser.js +32 -7
- package/lib/text/ui_text_displayer.js +22 -5
- package/lib/util/platform.js +9 -1
- package/lib/util/player_configuration.js +10 -3
- package/lib/util/stream_utils.js +30 -10
- package/package.json +1 -1
- package/shaka-player.uncompiled.js +1 -0
- package/test/dash/dash_parser_manifest_unit.js +1 -0
- package/test/hls/hls_parser_unit.js +1 -0
- package/test/media/drm_engine_unit.js +11 -1
- package/test/media/media_source_engine_integration.js +78 -2
- package/test/player_integration.js +10 -3
- package/test/polyfill/media_capabilities_unit.js +261 -0
- package/test/test/boot.js +29 -11
- package/test/test/util/manifest_parser_util.js +4 -3
- package/test/test/util/stream_generator.js +212 -8
- package/test/test/util/test_scheme.js +5 -4
- package/test/test/util/util.js +3 -2
- package/test/text/mp4_ttml_parser_unit.js +6 -4
- package/test/text/ttml_text_parser_unit.js +119 -86
- package/test/text/ui_text_displayer_unit.js +76 -0
- package/test/ui/text_displayer_layout_unit.js +14 -0
- package/test/util/stream_utils_unit.js +18 -0
- package/test/util/xml_utils_unit.js +6 -1
- 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.ui.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.ui.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.ui.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.ui.debug.externs.js
|
|
1472
1482
|
declare namespace shaka.polyfill {
|
|
1473
1483
|
class Aria {
|
|
1474
1484
|
private noStructuralTyping_shaka_polyfill_Aria : any;
|
|
@@ -2366,6 +2366,85 @@ shaka.util.ConfigUtils = class {
|
|
|
2366
2366
|
*/
|
|
2367
2367
|
static convertToConfigObject(fieldName, value) {}
|
|
2368
2368
|
};
|
|
2369
|
+
/**
|
|
2370
|
+
* @summary A set of FairPlay utility functions.
|
|
2371
|
+
*/
|
|
2372
|
+
shaka.util.FairPlayUtils = class {
|
|
2373
|
+
/**
|
|
2374
|
+
* Check if FairPlay is supported.
|
|
2375
|
+
* @return {!Promise.<boolean>}
|
|
2376
|
+
*/
|
|
2377
|
+
static isFairPlaySupported() {}
|
|
2378
|
+
/**
|
|
2379
|
+
* Using the default method, extract a content ID from the init data. This is
|
|
2380
|
+
* based on the FairPlay example documentation.
|
|
2381
|
+
* @param {!BufferSource} initData
|
|
2382
|
+
* @return {string}
|
|
2383
|
+
*/
|
|
2384
|
+
static defaultGetContentId(initData) {}
|
|
2385
|
+
/**
|
|
2386
|
+
* Transforms the init data buffer using the given data. The format is:
|
|
2387
|
+
* <pre>
|
|
2388
|
+
* [4 bytes] initDataSize
|
|
2389
|
+
* [initDataSize bytes] initData
|
|
2390
|
+
* [4 bytes] contentIdSize
|
|
2391
|
+
* [contentIdSize bytes] contentId
|
|
2392
|
+
* [4 bytes] certSize
|
|
2393
|
+
* [certSize bytes] cert
|
|
2394
|
+
* </pre>
|
|
2395
|
+
* @param {!BufferSource} initData
|
|
2396
|
+
* @param {!BufferSource|string} contentId
|
|
2397
|
+
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
2398
|
+
* provided.
|
|
2399
|
+
* @return {!Uint8Array}
|
|
2400
|
+
*/
|
|
2401
|
+
static initDataTransform(initData, contentId, cert) {}
|
|
2402
|
+
/**
|
|
2403
|
+
* Verimatrix initDataTransform configuration.
|
|
2404
|
+
* @param {!Uint8Array} initData
|
|
2405
|
+
* @param {string} initDataType
|
|
2406
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2407
|
+
*/
|
|
2408
|
+
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2409
|
+
/**
|
|
2410
|
+
* EZDRM initDataTransform configuration.
|
|
2411
|
+
* @param {!Uint8Array} initData
|
|
2412
|
+
* @param {string} initDataType
|
|
2413
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2414
|
+
*/
|
|
2415
|
+
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2416
|
+
/**
|
|
2417
|
+
* Conax initDataTransform configuration.
|
|
2418
|
+
* @param {!Uint8Array} initData
|
|
2419
|
+
* @param {string} initDataType
|
|
2420
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2421
|
+
*/
|
|
2422
|
+
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2423
|
+
/**
|
|
2424
|
+
* Verimatrix FairPlay request.
|
|
2425
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2426
|
+
* @param {shaka.extern.Request} request
|
|
2427
|
+
*/
|
|
2428
|
+
static verimatrixFairPlayRequest(type, request) {}
|
|
2429
|
+
/**
|
|
2430
|
+
* EZDRM FairPlay request.
|
|
2431
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2432
|
+
* @param {shaka.extern.Request} request
|
|
2433
|
+
*/
|
|
2434
|
+
static ezdrmFairPlayRequest(type, request) {}
|
|
2435
|
+
/**
|
|
2436
|
+
* Conax FairPlay request.
|
|
2437
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2438
|
+
* @param {shaka.extern.Request} request
|
|
2439
|
+
*/
|
|
2440
|
+
static conaxFairPlayRequest(type, request) {}
|
|
2441
|
+
/**
|
|
2442
|
+
* Common FairPlay response transform for some DRMs providers.
|
|
2443
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2444
|
+
* @param {shaka.extern.Response} response
|
|
2445
|
+
*/
|
|
2446
|
+
static commonFairPlayResponse(type, response) {}
|
|
2447
|
+
};
|
|
2369
2448
|
/**
|
|
2370
2449
|
* @final
|
|
2371
2450
|
*/
|
|
@@ -3764,6 +3843,20 @@ shaka.polyfill = class {
|
|
|
3764
3843
|
*/
|
|
3765
3844
|
static register(polyfill, priority) {}
|
|
3766
3845
|
};
|
|
3846
|
+
/**
|
|
3847
|
+
* @summary A polyfill for systems that do not implement AbortController.
|
|
3848
|
+
* This is used both with the fetch API for HTTP requests and inside the HLS
|
|
3849
|
+
* parser.
|
|
3850
|
+
* @extends AbortController
|
|
3851
|
+
*/
|
|
3852
|
+
shaka.polyfill.AbortController = class {
|
|
3853
|
+
/**
|
|
3854
|
+
* Install the polyfill if needed.
|
|
3855
|
+
*/
|
|
3856
|
+
static install() {}
|
|
3857
|
+
/** */
|
|
3858
|
+
constructor() {}
|
|
3859
|
+
};
|
|
3767
3860
|
/**
|
|
3768
3861
|
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
3769
3862
|
* browsers that do not implement it (e.g. Firefox).
|
|
@@ -4097,85 +4190,6 @@ shaka.text.SsaTextParser = class {
|
|
|
4097
4190
|
*/
|
|
4098
4191
|
parseMedia(data, time) {}
|
|
4099
4192
|
};
|
|
4100
|
-
/**
|
|
4101
|
-
* @summary A set of FairPlay utility functions.
|
|
4102
|
-
*/
|
|
4103
|
-
shaka.util.FairPlayUtils = class {
|
|
4104
|
-
/**
|
|
4105
|
-
* Check if FairPlay is supported.
|
|
4106
|
-
* @return {!Promise.<boolean>}
|
|
4107
|
-
*/
|
|
4108
|
-
static isFairPlaySupported() {}
|
|
4109
|
-
/**
|
|
4110
|
-
* Using the default method, extract a content ID from the init data. This is
|
|
4111
|
-
* based on the FairPlay example documentation.
|
|
4112
|
-
* @param {!BufferSource} initData
|
|
4113
|
-
* @return {string}
|
|
4114
|
-
*/
|
|
4115
|
-
static defaultGetContentId(initData) {}
|
|
4116
|
-
/**
|
|
4117
|
-
* Transforms the init data buffer using the given data. The format is:
|
|
4118
|
-
* <pre>
|
|
4119
|
-
* [4 bytes] initDataSize
|
|
4120
|
-
* [initDataSize bytes] initData
|
|
4121
|
-
* [4 bytes] contentIdSize
|
|
4122
|
-
* [contentIdSize bytes] contentId
|
|
4123
|
-
* [4 bytes] certSize
|
|
4124
|
-
* [certSize bytes] cert
|
|
4125
|
-
* </pre>
|
|
4126
|
-
* @param {!BufferSource} initData
|
|
4127
|
-
* @param {!BufferSource|string} contentId
|
|
4128
|
-
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
4129
|
-
* provided.
|
|
4130
|
-
* @return {!Uint8Array}
|
|
4131
|
-
*/
|
|
4132
|
-
static initDataTransform(initData, contentId, cert) {}
|
|
4133
|
-
/**
|
|
4134
|
-
* Verimatrix initDataTransform configuration.
|
|
4135
|
-
* @param {!Uint8Array} initData
|
|
4136
|
-
* @param {string} initDataType
|
|
4137
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4138
|
-
*/
|
|
4139
|
-
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4140
|
-
/**
|
|
4141
|
-
* EZDRM initDataTransform configuration.
|
|
4142
|
-
* @param {!Uint8Array} initData
|
|
4143
|
-
* @param {string} initDataType
|
|
4144
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4145
|
-
*/
|
|
4146
|
-
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4147
|
-
/**
|
|
4148
|
-
* Conax initDataTransform configuration.
|
|
4149
|
-
* @param {!Uint8Array} initData
|
|
4150
|
-
* @param {string} initDataType
|
|
4151
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4152
|
-
*/
|
|
4153
|
-
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4154
|
-
/**
|
|
4155
|
-
* Verimatrix FairPlay request.
|
|
4156
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4157
|
-
* @param {shaka.extern.Request} request
|
|
4158
|
-
*/
|
|
4159
|
-
static verimatrixFairPlayRequest(type, request) {}
|
|
4160
|
-
/**
|
|
4161
|
-
* EZDRM FairPlay request.
|
|
4162
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4163
|
-
* @param {shaka.extern.Request} request
|
|
4164
|
-
*/
|
|
4165
|
-
static ezdrmFairPlayRequest(type, request) {}
|
|
4166
|
-
/**
|
|
4167
|
-
* Conax FairPlay request.
|
|
4168
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4169
|
-
* @param {shaka.extern.Request} request
|
|
4170
|
-
*/
|
|
4171
|
-
static conaxFairPlayRequest(type, request) {}
|
|
4172
|
-
/**
|
|
4173
|
-
* Common FairPlay response transform for some DRMs providers.
|
|
4174
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4175
|
-
* @param {shaka.extern.Response} response
|
|
4176
|
-
*/
|
|
4177
|
-
static commonFairPlayResponse(type, response) {}
|
|
4178
|
-
};
|
|
4179
4193
|
/**
|
|
4180
4194
|
* @implements {shaka.extern.IUIElement}
|
|
4181
4195
|
* @abstract
|