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.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;
|
|
@@ -3218,6 +3228,10 @@ declare namespace muxjs.mp4 {
|
|
|
3218
3228
|
*/
|
|
3219
3229
|
on (type : string , listener : Function | null ) : any ;
|
|
3220
3230
|
push (data : Uint8Array ) : any ;
|
|
3231
|
+
/**
|
|
3232
|
+
* Reset captions.
|
|
3233
|
+
*/
|
|
3234
|
+
resetCaptions ( ) : any ;
|
|
3221
3235
|
setBaseMediaDecodeTime (time : number ) : any ;
|
|
3222
3236
|
}
|
|
3223
3237
|
}
|
|
@@ -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.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;
|
|
@@ -3218,6 +3228,10 @@ declare namespace muxjs.mp4 {
|
|
|
3218
3228
|
*/
|
|
3219
3229
|
on (type : string , listener : Function | null ) : any ;
|
|
3220
3230
|
push (data : Uint8Array ) : any ;
|
|
3231
|
+
/**
|
|
3232
|
+
* Reset captions.
|
|
3233
|
+
*/
|
|
3234
|
+
resetCaptions ( ) : any ;
|
|
3221
3235
|
setBaseMediaDecodeTime (time : number ) : any ;
|
|
3222
3236
|
}
|
|
3223
3237
|
}
|
|
@@ -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
|
*/
|
|
@@ -2772,9 +2851,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2772
2851
|
* <p>
|
|
2773
2852
|
* If the player has loaded content, and streaming seen an error, but the
|
|
2774
2853
|
* could not resume streaming, this will return <code>false</code>.
|
|
2854
|
+
* @param {number=} retryDelaySeconds
|
|
2775
2855
|
* @return {boolean}
|
|
2776
2856
|
*/
|
|
2777
|
-
retryStreaming() {}
|
|
2857
|
+
retryStreaming(retryDelaySeconds) {}
|
|
2778
2858
|
/**
|
|
2779
2859
|
* Get the manifest that the player has loaded. If the player has not loaded
|
|
2780
2860
|
* any content, this will return <code>null</code>.
|
|
@@ -3656,6 +3736,20 @@ shaka.polyfill = class {
|
|
|
3656
3736
|
*/
|
|
3657
3737
|
static register(polyfill, priority) {}
|
|
3658
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
|
+
};
|
|
3659
3753
|
/**
|
|
3660
3754
|
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
3661
3755
|
* browsers that do not implement it (e.g. Firefox).
|
|
@@ -3989,82 +4083,3 @@ shaka.text.SsaTextParser = class {
|
|
|
3989
4083
|
*/
|
|
3990
4084
|
parseMedia(data, time) {}
|
|
3991
4085
|
};
|
|
3992
|
-
/**
|
|
3993
|
-
* @summary A set of FairPlay utility functions.
|
|
3994
|
-
*/
|
|
3995
|
-
shaka.util.FairPlayUtils = class {
|
|
3996
|
-
/**
|
|
3997
|
-
* Check if FairPlay is supported.
|
|
3998
|
-
* @return {!Promise.<boolean>}
|
|
3999
|
-
*/
|
|
4000
|
-
static isFairPlaySupported() {}
|
|
4001
|
-
/**
|
|
4002
|
-
* Using the default method, extract a content ID from the init data. This is
|
|
4003
|
-
* based on the FairPlay example documentation.
|
|
4004
|
-
* @param {!BufferSource} initData
|
|
4005
|
-
* @return {string}
|
|
4006
|
-
*/
|
|
4007
|
-
static defaultGetContentId(initData) {}
|
|
4008
|
-
/**
|
|
4009
|
-
* Transforms the init data buffer using the given data. The format is:
|
|
4010
|
-
* <pre>
|
|
4011
|
-
* [4 bytes] initDataSize
|
|
4012
|
-
* [initDataSize bytes] initData
|
|
4013
|
-
* [4 bytes] contentIdSize
|
|
4014
|
-
* [contentIdSize bytes] contentId
|
|
4015
|
-
* [4 bytes] certSize
|
|
4016
|
-
* [certSize bytes] cert
|
|
4017
|
-
* </pre>
|
|
4018
|
-
* @param {!BufferSource} initData
|
|
4019
|
-
* @param {!BufferSource|string} contentId
|
|
4020
|
-
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
4021
|
-
* provided.
|
|
4022
|
-
* @return {!Uint8Array}
|
|
4023
|
-
*/
|
|
4024
|
-
static initDataTransform(initData, contentId, cert) {}
|
|
4025
|
-
/**
|
|
4026
|
-
* Verimatrix initDataTransform configuration.
|
|
4027
|
-
* @param {!Uint8Array} initData
|
|
4028
|
-
* @param {string} initDataType
|
|
4029
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4030
|
-
*/
|
|
4031
|
-
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4032
|
-
/**
|
|
4033
|
-
* EZDRM initDataTransform configuration.
|
|
4034
|
-
* @param {!Uint8Array} initData
|
|
4035
|
-
* @param {string} initDataType
|
|
4036
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4037
|
-
*/
|
|
4038
|
-
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4039
|
-
/**
|
|
4040
|
-
* Conax initDataTransform configuration.
|
|
4041
|
-
* @param {!Uint8Array} initData
|
|
4042
|
-
* @param {string} initDataType
|
|
4043
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
4044
|
-
*/
|
|
4045
|
-
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
4046
|
-
/**
|
|
4047
|
-
* Verimatrix FairPlay request.
|
|
4048
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4049
|
-
* @param {shaka.extern.Request} request
|
|
4050
|
-
*/
|
|
4051
|
-
static verimatrixFairPlayRequest(type, request) {}
|
|
4052
|
-
/**
|
|
4053
|
-
* EZDRM FairPlay request.
|
|
4054
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4055
|
-
* @param {shaka.extern.Request} request
|
|
4056
|
-
*/
|
|
4057
|
-
static ezdrmFairPlayRequest(type, request) {}
|
|
4058
|
-
/**
|
|
4059
|
-
* Conax FairPlay request.
|
|
4060
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4061
|
-
* @param {shaka.extern.Request} request
|
|
4062
|
-
*/
|
|
4063
|
-
static conaxFairPlayRequest(type, request) {}
|
|
4064
|
-
/**
|
|
4065
|
-
* Common FairPlay response transform for some DRMs providers.
|
|
4066
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
4067
|
-
* @param {shaka.extern.Response} response
|
|
4068
|
-
*/
|
|
4069
|
-
static commonFairPlayResponse(type, response) {}
|
|
4070
|
-
};
|