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.
- package/.github/workflows/build-and-test.yaml +7 -0
- package/AUTHORS +1 -0
- package/CHANGELOG.md +33 -0
- package/CONTRIBUTORS +1 -0
- package/conditional/dummy_cast_proxy.js +120 -0
- package/dist/demo.compiled.debug.js +104 -110
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +104 -110
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +8 -6
- package/dist/locales.js +28 -28
- package/dist/receiver.compiled.debug.js +54 -60
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +54 -60
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +19 -2
- package/dist/shaka-player.compiled.debug.d.ts +19 -2
- package/dist/shaka-player.compiled.debug.externs.js +102 -80
- package/dist/shaka-player.compiled.debug.js +632 -628
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +102 -80
- package/dist/shaka-player.compiled.js +903 -900
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +19 -2
- package/dist/shaka-player.ui.debug.d.ts +19 -2
- package/dist/shaka-player.ui.debug.externs.js +102 -80
- package/dist/shaka-player.ui.debug.js +681 -678
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +102 -80
- package/dist/shaka-player.ui.js +1033 -1031
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/welcome.md +2 -2
- package/externs/shaka/mp4_parser.js +3 -0
- package/externs/shaka/player.js +2 -1
- package/lib/cea/cea708_window.js +2 -2
- package/lib/cea/mp4_cea_parser.js +37 -16
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +37 -19
- package/lib/media/content_workarounds.js +12 -0
- package/lib/media/media_source_capabilities.js +36 -0
- package/lib/media/media_source_engine.js +12 -7
- package/lib/media/transmuxer.js +6 -4
- package/lib/player.js +5 -5
- package/lib/polyfill/abort_controller.js +143 -0
- package/lib/polyfill/media_capabilities.js +65 -11
- package/lib/polyfill/patchedmediakeys_apple.js +33 -28
- package/lib/text/ttml_text_parser.js +32 -7
- package/lib/text/ui_text_displayer.js +17 -0
- package/lib/util/mp4_box_parsers.js +24 -0
- package/lib/util/mp4_parser.js +35 -0
- package/lib/util/player_configuration.js +10 -3
- package/lib/util/stream_utils.js +35 -13
- package/package.json +4 -4
- package/shaka-player.uncompiled.js +1 -0
- package/test/ads/ad_manager_unit.js +3 -1
- package/test/dash/dash_parser_manifest_unit.js +1 -0
- package/test/hls/hls_parser_unit.js +132 -0
- package/test/media/drm_engine_unit.js +11 -1
- package/test/media/media_source_engine_integration.js +78 -2
- package/test/polyfill/media_capabilities_unit.js +259 -0
- package/test/polyfill/patchedmediakeys_apple_unit.js +6 -0
- package/test/test/util/stream_generator.js +212 -8
- package/test/test/util/test_scheme.js +4 -3
- 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/util/stream_utils_unit.js +18 -0
- package/test/util/xml_utils_unit.js +6 -1
- package/third_party/closure-uri/uri.js +1 -1
- package/ui/controls.js +45 -36
|
@@ -1588,6 +1588,14 @@ shaka.util.Mp4Parser = class {
|
|
|
1588
1588
|
* @param {!shaka.extern.ParsedBox} box
|
|
1589
1589
|
*/
|
|
1590
1590
|
static sampleDescription(box) {}
|
|
1591
|
+
/**
|
|
1592
|
+
* A callback that tells the Mp4 parser to treat the body of a box as a visual
|
|
1593
|
+
* sample entry. A visual sample entry has some fixed-sized fields
|
|
1594
|
+
* describing the video codec parameters, followed by an arbitrary number of
|
|
1595
|
+
* appended children. Each child is a box.
|
|
1596
|
+
* @param {!shaka.extern.ParsedBox} box
|
|
1597
|
+
*/
|
|
1598
|
+
static visualSampleEntry(box) {}
|
|
1591
1599
|
/**
|
|
1592
1600
|
* Create a callback that tells the Mp4 parser to treat the body of a box as a
|
|
1593
1601
|
* binary blob and to parse the body's contents using the provided callback.
|
|
@@ -2350,6 +2358,85 @@ shaka.util.ConfigUtils = class {
|
|
|
2350
2358
|
*/
|
|
2351
2359
|
static convertToConfigObject(fieldName, value) {}
|
|
2352
2360
|
};
|
|
2361
|
+
/**
|
|
2362
|
+
* @summary A set of FairPlay utility functions.
|
|
2363
|
+
*/
|
|
2364
|
+
shaka.util.FairPlayUtils = class {
|
|
2365
|
+
/**
|
|
2366
|
+
* Check if FairPlay is supported.
|
|
2367
|
+
* @return {!Promise.<boolean>}
|
|
2368
|
+
*/
|
|
2369
|
+
static isFairPlaySupported() {}
|
|
2370
|
+
/**
|
|
2371
|
+
* Using the default method, extract a content ID from the init data. This is
|
|
2372
|
+
* based on the FairPlay example documentation.
|
|
2373
|
+
* @param {!BufferSource} initData
|
|
2374
|
+
* @return {string}
|
|
2375
|
+
*/
|
|
2376
|
+
static defaultGetContentId(initData) {}
|
|
2377
|
+
/**
|
|
2378
|
+
* Transforms the init data buffer using the given data. The format is:
|
|
2379
|
+
* <pre>
|
|
2380
|
+
* [4 bytes] initDataSize
|
|
2381
|
+
* [initDataSize bytes] initData
|
|
2382
|
+
* [4 bytes] contentIdSize
|
|
2383
|
+
* [contentIdSize bytes] contentId
|
|
2384
|
+
* [4 bytes] certSize
|
|
2385
|
+
* [certSize bytes] cert
|
|
2386
|
+
* </pre>
|
|
2387
|
+
* @param {!BufferSource} initData
|
|
2388
|
+
* @param {!BufferSource|string} contentId
|
|
2389
|
+
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
2390
|
+
* provided.
|
|
2391
|
+
* @return {!Uint8Array}
|
|
2392
|
+
*/
|
|
2393
|
+
static initDataTransform(initData, contentId, cert) {}
|
|
2394
|
+
/**
|
|
2395
|
+
* Verimatrix initDataTransform configuration.
|
|
2396
|
+
* @param {!Uint8Array} initData
|
|
2397
|
+
* @param {string} initDataType
|
|
2398
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2399
|
+
*/
|
|
2400
|
+
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2401
|
+
/**
|
|
2402
|
+
* EZDRM initDataTransform configuration.
|
|
2403
|
+
* @param {!Uint8Array} initData
|
|
2404
|
+
* @param {string} initDataType
|
|
2405
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2406
|
+
*/
|
|
2407
|
+
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2408
|
+
/**
|
|
2409
|
+
* Conax initDataTransform configuration.
|
|
2410
|
+
* @param {!Uint8Array} initData
|
|
2411
|
+
* @param {string} initDataType
|
|
2412
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2413
|
+
*/
|
|
2414
|
+
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2415
|
+
/**
|
|
2416
|
+
* Verimatrix FairPlay request.
|
|
2417
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2418
|
+
* @param {shaka.extern.Request} request
|
|
2419
|
+
*/
|
|
2420
|
+
static verimatrixFairPlayRequest(type, request) {}
|
|
2421
|
+
/**
|
|
2422
|
+
* EZDRM FairPlay request.
|
|
2423
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2424
|
+
* @param {shaka.extern.Request} request
|
|
2425
|
+
*/
|
|
2426
|
+
static ezdrmFairPlayRequest(type, request) {}
|
|
2427
|
+
/**
|
|
2428
|
+
* Conax FairPlay request.
|
|
2429
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2430
|
+
* @param {shaka.extern.Request} request
|
|
2431
|
+
*/
|
|
2432
|
+
static conaxFairPlayRequest(type, request) {}
|
|
2433
|
+
/**
|
|
2434
|
+
* Common FairPlay response transform for some DRMs providers.
|
|
2435
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2436
|
+
* @param {shaka.extern.Response} response
|
|
2437
|
+
*/
|
|
2438
|
+
static commonFairPlayResponse(type, response) {}
|
|
2439
|
+
};
|
|
2353
2440
|
/**
|
|
2354
2441
|
* @final
|
|
2355
2442
|
*/
|
|
@@ -3782,6 +3869,20 @@ shaka.polyfill = class {
|
|
|
3782
3869
|
*/
|
|
3783
3870
|
static register(polyfill, priority) {}
|
|
3784
3871
|
};
|
|
3872
|
+
/**
|
|
3873
|
+
* @summary A polyfill for systems that do not implement AbortController.
|
|
3874
|
+
* This is used both with the fetch API for HTTP requests and inside the HLS
|
|
3875
|
+
* parser.
|
|
3876
|
+
* @extends AbortController
|
|
3877
|
+
*/
|
|
3878
|
+
shaka.polyfill.AbortController = class {
|
|
3879
|
+
/**
|
|
3880
|
+
* Install the polyfill if needed.
|
|
3881
|
+
*/
|
|
3882
|
+
static install() {}
|
|
3883
|
+
/** */
|
|
3884
|
+
constructor() {}
|
|
3885
|
+
};
|
|
3785
3886
|
/**
|
|
3786
3887
|
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
3787
3888
|
* browsers that do not implement it (e.g. Firefox).
|
|
@@ -3867,7 +3968,7 @@ shaka.polyfill.Orientation = class {
|
|
|
3867
3968
|
shaka.polyfill.PatchedMediaKeysApple = class {
|
|
3868
3969
|
/**
|
|
3869
3970
|
* Installs the polyfill if needed.
|
|
3870
|
-
* @param {boolean} enableUninstall enables uninstalling the polyfill
|
|
3971
|
+
* @param {boolean=} enableUninstall enables uninstalling the polyfill
|
|
3871
3972
|
*/
|
|
3872
3973
|
static install(enableUninstall) {}
|
|
3873
3974
|
/**
|
|
@@ -4120,82 +4221,3 @@ shaka.text.SsaTextParser = class {
|
|
|
4120
4221
|
*/
|
|
4121
4222
|
parseMedia(data, time) {}
|
|
4122
4223
|
};
|
|
4123
|
-
/**
|
|
4124
|
-
* @summary A set of FairPlay utility functions.
|
|
4125
|
-
*/
|
|
4126
|
-
shaka.util.FairPlayUtils = class {
|
|
4127
|
-
/**
|
|
4128
|
-
* Check if FairPlay is supported.
|
|
4129
|
-
* @return {!Promise.<boolean>}
|
|
4130
|
-
*/
|
|
4131
|
-
static isFairPlaySupported() {}
|
|
4132
|
-
/**
|
|
4133
|
-
* Using the default method, extract a content ID from the init data. This is
|
|
4134
|
-
* based on the FairPlay example documentation.
|
|
4135
|
-
* @param {!BufferSource} initData
|
|
4136
|
-
* @return {string}
|
|
4137
|
-
*/
|
|
4138
|
-
static defaultGetContentId(initData) {}
|
|
4139
|
-
/**
|
|
4140
|
-
* Transforms the init data buffer using the given data. The format is:
|
|
4141
|
-
* <pre>
|
|
4142
|
-
* [4 bytes] initDataSize
|
|
4143
|
-
* [initDataSize bytes] initData
|
|
4144
|
-
* [4 bytes] contentIdSize
|
|
4145
|
-
* [contentIdSize bytes] contentId
|
|
4146
|
-
* [4 bytes] certSize
|
|
4147
|
-
* [certSize bytes] cert
|
|
4148
|
-
* </pre>
|
|
4149
|
-
* @param {!BufferSource} initData
|
|
4150
|
-
* @param {!BufferSource|string} contentId
|
|
4151
|
-
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
4152
|
-
* provided.
|
|
4153
|
-
* @return {!Uint8Array}
|
|
4154
|
-
*/
|
|
4155
|
-
static initDataTransform(initData, contentId, cert) {}
|
|
4156
|
-
/**
|
|
4157
|
-
* Verimatrix initDataTransform configuration.
|
|
4158
|
-
* @param {!Uint8Array} initData
|
|
4159
|
-
* @param {string} initDataType
|
|
4160
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4161
|
-
*/
|
|
4162
|
-
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4163
|
-
/**
|
|
4164
|
-
* EZDRM initDataTransform configuration.
|
|
4165
|
-
* @param {!Uint8Array} initData
|
|
4166
|
-
* @param {string} initDataType
|
|
4167
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4168
|
-
*/
|
|
4169
|
-
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4170
|
-
/**
|
|
4171
|
-
* Conax initDataTransform configuration.
|
|
4172
|
-
* @param {!Uint8Array} initData
|
|
4173
|
-
* @param {string} initDataType
|
|
4174
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4175
|
-
*/
|
|
4176
|
-
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4177
|
-
/**
|
|
4178
|
-
* Verimatrix FairPlay request.
|
|
4179
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4180
|
-
* @param {shaka.extern.Request} request
|
|
4181
|
-
*/
|
|
4182
|
-
static verimatrixFairPlayRequest(type, request) {}
|
|
4183
|
-
/**
|
|
4184
|
-
* EZDRM FairPlay request.
|
|
4185
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4186
|
-
* @param {shaka.extern.Request} request
|
|
4187
|
-
*/
|
|
4188
|
-
static ezdrmFairPlayRequest(type, request) {}
|
|
4189
|
-
/**
|
|
4190
|
-
* Conax FairPlay request.
|
|
4191
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4192
|
-
* @param {shaka.extern.Request} request
|
|
4193
|
-
*/
|
|
4194
|
-
static conaxFairPlayRequest(type, request) {}
|
|
4195
|
-
/**
|
|
4196
|
-
* Common FairPlay response transform for some DRMs providers.
|
|
4197
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4198
|
-
* @param {shaka.extern.Response} response
|
|
4199
|
-
*/
|
|
4200
|
-
static commonFairPlayResponse(type, response) {}
|
|
4201
|
-
};
|