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
|
@@ -1523,6 +1523,16 @@ declare namespace shaka {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
|
|
1526
|
+
declare namespace shaka.polyfill {
|
|
1527
|
+
class AbortController extends AbortController {
|
|
1528
|
+
private noStructuralTyping_shaka_polyfill_AbortController : any;
|
|
1529
|
+
/**
|
|
1530
|
+
* Install the polyfill if needed.
|
|
1531
|
+
*/
|
|
1532
|
+
static install ( ) : any ;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
|
|
1526
1536
|
declare namespace shaka.polyfill {
|
|
1527
1537
|
class Aria {
|
|
1528
1538
|
private noStructuralTyping_shaka_polyfill_Aria : any;
|
|
@@ -1596,7 +1606,7 @@ declare namespace shaka.polyfill {
|
|
|
1596
1606
|
* Installs the polyfill if needed.
|
|
1597
1607
|
* @param enableUninstall enables uninstalling the polyfill
|
|
1598
1608
|
*/
|
|
1599
|
-
static install (enableUninstall : boolean ) : any ;
|
|
1609
|
+
static install (enableUninstall ? : boolean ) : any ;
|
|
1600
1610
|
/**
|
|
1601
1611
|
* Uninstalls the polyfill if needed and enabled.
|
|
1602
1612
|
*/
|
|
@@ -3225,6 +3235,13 @@ declare namespace shaka.util {
|
|
|
3225
3235
|
* @param type The type of the box, a uint32.
|
|
3226
3236
|
*/
|
|
3227
3237
|
static typeToString (type : number ) : string ;
|
|
3238
|
+
/**
|
|
3239
|
+
* A callback that tells the Mp4 parser to treat the body of a box as a visual
|
|
3240
|
+
* sample entry. A visual sample entry has some fixed-sized fields
|
|
3241
|
+
* describing the video codec parameters, followed by an arbitrary number of
|
|
3242
|
+
* appended children. Each child is a box.
|
|
3243
|
+
*/
|
|
3244
|
+
static visualSampleEntry (box : shaka.extern.ParsedBox ) : any ;
|
|
3228
3245
|
}
|
|
3229
3246
|
}
|
|
3230
3247
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
|
|
@@ -4175,7 +4192,7 @@ declare namespace shaka.extern.ManifestParser {
|
|
|
4175
4192
|
}
|
|
4176
4193
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/mp4_parser.js
|
|
4177
4194
|
declare namespace shaka.extern {
|
|
4178
|
-
type ParsedBox = { flags : number | null , has64BitSize : boolean , parser : shaka.util.Mp4Parser , partialOkay : boolean , reader : shaka.util.DataViewReader , size : number , start : number , version : number | null } ;
|
|
4195
|
+
type ParsedBox = { flags : number | null , has64BitSize : boolean , name : string , parser : shaka.util.Mp4Parser , partialOkay : boolean , reader : shaka.util.DataViewReader , size : number , start : number , version : number | null } ;
|
|
4179
4196
|
}
|
|
4180
4197
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js
|
|
4181
4198
|
declare namespace shaka.extern {
|
|
@@ -1523,6 +1523,16 @@ declare namespace shaka {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
|
|
1526
|
+
declare namespace shaka.polyfill {
|
|
1527
|
+
class AbortController extends AbortController {
|
|
1528
|
+
private noStructuralTyping_shaka_polyfill_AbortController : any;
|
|
1529
|
+
/**
|
|
1530
|
+
* Install the polyfill if needed.
|
|
1531
|
+
*/
|
|
1532
|
+
static install ( ) : any ;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
|
|
1526
1536
|
declare namespace shaka.polyfill {
|
|
1527
1537
|
class Aria {
|
|
1528
1538
|
private noStructuralTyping_shaka_polyfill_Aria : any;
|
|
@@ -1596,7 +1606,7 @@ declare namespace shaka.polyfill {
|
|
|
1596
1606
|
* Installs the polyfill if needed.
|
|
1597
1607
|
* @param enableUninstall enables uninstalling the polyfill
|
|
1598
1608
|
*/
|
|
1599
|
-
static install (enableUninstall : boolean ) : any ;
|
|
1609
|
+
static install (enableUninstall ? : boolean ) : any ;
|
|
1600
1610
|
/**
|
|
1601
1611
|
* Uninstalls the polyfill if needed and enabled.
|
|
1602
1612
|
*/
|
|
@@ -3225,6 +3235,13 @@ declare namespace shaka.util {
|
|
|
3225
3235
|
* @param type The type of the box, a uint32.
|
|
3226
3236
|
*/
|
|
3227
3237
|
static typeToString (type : number ) : string ;
|
|
3238
|
+
/**
|
|
3239
|
+
* A callback that tells the Mp4 parser to treat the body of a box as a visual
|
|
3240
|
+
* sample entry. A visual sample entry has some fixed-sized fields
|
|
3241
|
+
* describing the video codec parameters, followed by an arbitrary number of
|
|
3242
|
+
* appended children. Each child is a box.
|
|
3243
|
+
*/
|
|
3244
|
+
static visualSampleEntry (box : shaka.extern.ParsedBox ) : any ;
|
|
3228
3245
|
}
|
|
3229
3246
|
}
|
|
3230
3247
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
|
|
@@ -4175,7 +4192,7 @@ declare namespace shaka.extern.ManifestParser {
|
|
|
4175
4192
|
}
|
|
4176
4193
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/mp4_parser.js
|
|
4177
4194
|
declare namespace shaka.extern {
|
|
4178
|
-
type ParsedBox = { flags : number | null , has64BitSize : boolean , parser : shaka.util.Mp4Parser , partialOkay : boolean , reader : shaka.util.DataViewReader , size : number , start : number , version : number | null } ;
|
|
4195
|
+
type ParsedBox = { flags : number | null , has64BitSize : boolean , name : string , parser : shaka.util.Mp4Parser , partialOkay : boolean , reader : shaka.util.DataViewReader , size : number , start : number , version : number | null } ;
|
|
4179
4196
|
}
|
|
4180
4197
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/net.js
|
|
4181
4198
|
declare namespace shaka.extern {
|
|
@@ -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
|