shaka-player 4.2.3 → 4.2.5
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/AUTHORS +2 -0
- package/CHANGELOG.md +39 -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 +5 -4
- package/dist/locales.js +32 -32
- 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 +15 -1
- package/dist/shaka-player.compiled.debug.d.ts +15 -1
- package/dist/shaka-player.compiled.debug.externs.js +95 -80
- package/dist/shaka-player.compiled.debug.js +583 -573
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +95 -80
- package/dist/shaka-player.compiled.js +823 -820
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +15 -1
- package/dist/shaka-player.ui.debug.d.ts +15 -1
- package/dist/shaka-player.ui.debug.externs.js +95 -80
- package/dist/shaka-player.ui.debug.js +612 -602
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +95 -80
- package/dist/shaka-player.ui.js +963 -960
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ui.md +7 -7
- package/docs/tutorials/welcome.md +2 -2
- package/externs/mux.js +3 -0
- package/externs/shaka/player.js +2 -1
- package/lib/cast/cast_proxy.js +2 -1
- package/lib/cast/cast_receiver.js +19 -5
- package/lib/cast/cast_sender.js +2 -1
- package/lib/cast/cast_utils.js +16 -6
- package/lib/cea/cea708_window.js +2 -2
- package/lib/dash/segment_template.js +1 -1
- package/lib/hls/hls_parser.js +21 -4
- package/lib/media/content_workarounds.js +12 -0
- package/lib/media/media_source_engine.js +6 -0
- package/lib/media/playhead.js +23 -1
- package/lib/media/streaming_engine.js +3 -12
- package/lib/media/transmuxer.js +6 -0
- package/lib/player.js +24 -11
- 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/manifest_parser_utils.js +4 -0
- 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/roadmap.md +24 -6
- package/shaka-player.uncompiled.js +1 -0
- package/test/cast/cast_receiver_integration.js +97 -16
- package/test/cast/cast_receiver_unit.js +17 -12
- package/test/cast/cast_utils_unit.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 +108 -1
- package/test/media/playhead_unit.js +41 -0
- package/test/media/streaming_engine_integration.js +13 -0
- package/test/media/streaming_engine_unit.js +36 -23
- package/test/player_unit.js +87 -0
- package/test/polyfill/media_capabilities_unit.js +261 -0
- package/test/test/util/simple_fakes.js +3 -0
- package/test/test/util/stream_generator.js +212 -8
- package/test/test/util/test_scheme.js +3 -2
- 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 -37
- package/ui/settings_menu.js +11 -2
|
@@ -294,7 +294,7 @@ declare namespace shaka {
|
|
|
294
294
|
* If the player has loaded content, and streaming seen an error, but the
|
|
295
295
|
* could not resume streaming, this will return <code>false</code>.
|
|
296
296
|
*/
|
|
297
|
-
retryStreaming ( ) : boolean ;
|
|
297
|
+
retryStreaming (retryDelaySeconds ? : number ) : boolean ;
|
|
298
298
|
/**
|
|
299
299
|
* Get the range of time (in seconds) that seeking is allowed. If the player
|
|
300
300
|
* has not loaded content, this will return a range from 0 to 0.
|
|
@@ -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;
|
|
@@ -3685,6 +3695,10 @@ declare namespace muxjs.mp4 {
|
|
|
3685
3695
|
*/
|
|
3686
3696
|
on (type : string , listener : Function | null ) : any ;
|
|
3687
3697
|
push (data : Uint8Array ) : any ;
|
|
3698
|
+
/**
|
|
3699
|
+
* Reset captions.
|
|
3700
|
+
*/
|
|
3701
|
+
resetCaptions ( ) : any ;
|
|
3688
3702
|
setBaseMediaDecodeTime (time : number ) : any ;
|
|
3689
3703
|
}
|
|
3690
3704
|
}
|
|
@@ -294,7 +294,7 @@ declare namespace shaka {
|
|
|
294
294
|
* If the player has loaded content, and streaming seen an error, but the
|
|
295
295
|
* could not resume streaming, this will return <code>false</code>.
|
|
296
296
|
*/
|
|
297
|
-
retryStreaming ( ) : boolean ;
|
|
297
|
+
retryStreaming (retryDelaySeconds ? : number ) : boolean ;
|
|
298
298
|
/**
|
|
299
299
|
* Get the range of time (in seconds) that seeking is allowed. If the player
|
|
300
300
|
* has not loaded content, this will return a range from 0 to 0.
|
|
@@ -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;
|
|
@@ -3685,6 +3695,10 @@ declare namespace muxjs.mp4 {
|
|
|
3685
3695
|
*/
|
|
3686
3696
|
on (type : string , listener : Function | null ) : any ;
|
|
3687
3697
|
push (data : Uint8Array ) : any ;
|
|
3698
|
+
/**
|
|
3699
|
+
* Reset captions.
|
|
3700
|
+
*/
|
|
3701
|
+
resetCaptions ( ) : any ;
|
|
3688
3702
|
setBaseMediaDecodeTime (time : number ) : any ;
|
|
3689
3703
|
}
|
|
3690
3704
|
}
|
|
@@ -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
|
*/
|
|
@@ -2879,9 +2958,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2879
2958
|
* <p>
|
|
2880
2959
|
* If the player has loaded content, and streaming seen an error, but the
|
|
2881
2960
|
* could not resume streaming, this will return <code>false</code>.
|
|
2961
|
+
* @param {number=} retryDelaySeconds
|
|
2882
2962
|
* @return {boolean}
|
|
2883
2963
|
*/
|
|
2884
|
-
retryStreaming() {}
|
|
2964
|
+
retryStreaming(retryDelaySeconds) {}
|
|
2885
2965
|
/**
|
|
2886
2966
|
* Get the manifest that the player has loaded. If the player has not loaded
|
|
2887
2967
|
* any content, this will return <code>null</code>.
|
|
@@ -3763,6 +3843,20 @@ shaka.polyfill = class {
|
|
|
3763
3843
|
*/
|
|
3764
3844
|
static register(polyfill, priority) {}
|
|
3765
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
|
+
};
|
|
3766
3860
|
/**
|
|
3767
3861
|
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
3768
3862
|
* browsers that do not implement it (e.g. Firefox).
|
|
@@ -4096,85 +4190,6 @@ shaka.text.SsaTextParser = class {
|
|
|
4096
4190
|
*/
|
|
4097
4191
|
parseMedia(data, time) {}
|
|
4098
4192
|
};
|
|
4099
|
-
/**
|
|
4100
|
-
* @summary A set of FairPlay utility functions.
|
|
4101
|
-
*/
|
|
4102
|
-
shaka.util.FairPlayUtils = class {
|
|
4103
|
-
/**
|
|
4104
|
-
* Check if FairPlay is supported.
|
|
4105
|
-
* @return {!Promise.<boolean>}
|
|
4106
|
-
*/
|
|
4107
|
-
static isFairPlaySupported() {}
|
|
4108
|
-
/**
|
|
4109
|
-
* Using the default method, extract a content ID from the init data. This is
|
|
4110
|
-
* based on the FairPlay example documentation.
|
|
4111
|
-
* @param {!BufferSource} initData
|
|
4112
|
-
* @return {string}
|
|
4113
|
-
*/
|
|
4114
|
-
static defaultGetContentId(initData) {}
|
|
4115
|
-
/**
|
|
4116
|
-
* Transforms the init data buffer using the given data. The format is:
|
|
4117
|
-
* <pre>
|
|
4118
|
-
* [4 bytes] initDataSize
|
|
4119
|
-
* [initDataSize bytes] initData
|
|
4120
|
-
* [4 bytes] contentIdSize
|
|
4121
|
-
* [contentIdSize bytes] contentId
|
|
4122
|
-
* [4 bytes] certSize
|
|
4123
|
-
* [certSize bytes] cert
|
|
4124
|
-
* </pre>
|
|
4125
|
-
* @param {!BufferSource} initData
|
|
4126
|
-
* @param {!BufferSource|string} contentId
|
|
4127
|
-
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
4128
|
-
* provided.
|
|
4129
|
-
* @return {!Uint8Array}
|
|
4130
|
-
*/
|
|
4131
|
-
static initDataTransform(initData, contentId, cert) {}
|
|
4132
|
-
/**
|
|
4133
|
-
* Verimatrix initDataTransform configuration.
|
|
4134
|
-
* @param {!Uint8Array} initData
|
|
4135
|
-
* @param {string} initDataType
|
|
4136
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4137
|
-
*/
|
|
4138
|
-
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4139
|
-
/**
|
|
4140
|
-
* EZDRM initDataTransform configuration.
|
|
4141
|
-
* @param {!Uint8Array} initData
|
|
4142
|
-
* @param {string} initDataType
|
|
4143
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4144
|
-
*/
|
|
4145
|
-
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4146
|
-
/**
|
|
4147
|
-
* Conax initDataTransform configuration.
|
|
4148
|
-
* @param {!Uint8Array} initData
|
|
4149
|
-
* @param {string} initDataType
|
|
4150
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4151
|
-
*/
|
|
4152
|
-
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4153
|
-
/**
|
|
4154
|
-
* Verimatrix FairPlay request.
|
|
4155
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4156
|
-
* @param {shaka.extern.Request} request
|
|
4157
|
-
*/
|
|
4158
|
-
static verimatrixFairPlayRequest(type, request) {}
|
|
4159
|
-
/**
|
|
4160
|
-
* EZDRM FairPlay request.
|
|
4161
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4162
|
-
* @param {shaka.extern.Request} request
|
|
4163
|
-
*/
|
|
4164
|
-
static ezdrmFairPlayRequest(type, request) {}
|
|
4165
|
-
/**
|
|
4166
|
-
* Conax FairPlay request.
|
|
4167
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4168
|
-
* @param {shaka.extern.Request} request
|
|
4169
|
-
*/
|
|
4170
|
-
static conaxFairPlayRequest(type, request) {}
|
|
4171
|
-
/**
|
|
4172
|
-
* Common FairPlay response transform for some DRMs providers.
|
|
4173
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4174
|
-
* @param {shaka.extern.Response} response
|
|
4175
|
-
*/
|
|
4176
|
-
static commonFairPlayResponse(type, response) {}
|
|
4177
|
-
};
|
|
4178
4193
|
/**
|
|
4179
4194
|
* @implements {shaka.extern.IUIElement}
|
|
4180
4195
|
* @abstract
|