shaka-player 4.9.32 → 4.9.34
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/dist/deps.js +6 -5
- package/dist/locales.js +36 -36
- package/dist/shaka-player.compiled.d.ts +11 -3
- package/dist/shaka-player.compiled.debug.d.ts +11 -3
- package/dist/shaka-player.compiled.debug.externs.js +8 -5
- package/dist/shaka-player.compiled.debug.js +453 -440
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +8 -5
- package/dist/shaka-player.compiled.js +1281 -1271
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +11 -3
- package/dist/shaka-player.ui.debug.d.ts +11 -3
- package/dist/shaka-player.ui.debug.externs.js +8 -5
- package/dist/shaka-player.ui.debug.js +483 -470
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +8 -5
- package/dist/shaka-player.ui.js +1478 -1468
- package/dist/shaka-player.ui.map +4 -4
- package/externs/managedmediasource.js +6 -0
- package/externs/shaka/codecs.js +21 -0
- package/externs/shaka/offline.js +4 -0
- package/lib/cast/cast_utils.js +1 -0
- package/lib/hls/hls_parser.js +26 -5
- package/lib/media/drm_engine.js +78 -18
- package/lib/media/media_source_capabilities.js +3 -2
- package/lib/media/media_source_engine.js +117 -36
- package/lib/media/segment_utils.js +57 -47
- package/lib/offline/download_info.js +5 -0
- package/lib/offline/download_manager.js +54 -0
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +11 -2
- package/lib/player.js +89 -53
- package/lib/polyfill/media_capabilities.js +1 -1
- package/lib/text/simple_text_displayer.js +9 -1
- package/lib/text/ui_text_displayer.js +2 -14
- package/lib/text/vtt_text_parser.js +9 -4
- package/lib/transmuxer/aac_transmuxer.js +11 -3
- package/lib/transmuxer/ac3_transmuxer.js +11 -3
- package/lib/transmuxer/ec3_transmuxer.js +11 -3
- package/lib/transmuxer/h264.js +143 -70
- package/lib/transmuxer/mp3_transmuxer.js +11 -3
- package/lib/transmuxer/ts_transmuxer.js +68 -28
- package/lib/util/abortable_operation.js +3 -0
- package/lib/util/drm_utils.js +20 -0
- package/lib/util/functional.js +27 -0
- package/lib/util/mime_utils.js +2 -0
- package/lib/util/number_utils.js +37 -0
- package/lib/util/object_utils.js +83 -0
- package/lib/util/platform.js +48 -40
- package/lib/util/stream_utils.js +27 -106
- package/lib/util/ts_parser.js +111 -85
- package/package.json +2 -2
- package/ui/controls.js +4 -0
- package/ui/fast_forward_button.js +7 -0
- package/ui/play_button.js +1 -1
- package/ui/rewind_button.js +7 -0
|
@@ -274,6 +274,10 @@ declare namespace shaka {
|
|
|
274
274
|
* return <code>false</code>.
|
|
275
275
|
*/
|
|
276
276
|
isBuffering ( ) : boolean ;
|
|
277
|
+
/**
|
|
278
|
+
* Indicate if the video has ended.
|
|
279
|
+
*/
|
|
280
|
+
isEnded ( ) : boolean ;
|
|
277
281
|
/**
|
|
278
282
|
* Get if the player is playing in-progress content. If the player has not
|
|
279
283
|
* loaded content, this will return <code>false</code>.
|
|
@@ -2581,7 +2585,7 @@ declare namespace shaka.text {
|
|
|
2581
2585
|
* The text displayer plugin for the Shaka Player UI. Can also be used directly
|
|
2582
2586
|
* by providing an appropriate container element.
|
|
2583
2587
|
*/
|
|
2584
|
-
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null
|
|
2588
|
+
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null ) ;
|
|
2585
2589
|
append (cues : any ) : any ;
|
|
2586
2590
|
configure (config : any ) : any ;
|
|
2587
2591
|
destroy ( ) : any ;
|
|
@@ -4259,7 +4263,7 @@ declare namespace shaka.util {
|
|
|
4259
4263
|
* The code is based on hls.js
|
|
4260
4264
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
4261
4265
|
*/
|
|
4262
|
-
parseNalus (pes : shaka.extern.MPEG_PES ,
|
|
4266
|
+
parseNalus (pes : shaka.extern.MPEG_PES , lastInfo : { nalu : shaka.extern.VideoNalu | null , state : number | null } ) : shaka.extern.VideoNalu [] ;
|
|
4263
4267
|
static Timescale : number ;
|
|
4264
4268
|
/**
|
|
4265
4269
|
* Check if the passed data corresponds to an MPEG2-TS
|
|
@@ -4622,6 +4626,10 @@ declare namespace shaka.extern {
|
|
|
4622
4626
|
declare namespace shaka.extern {
|
|
4623
4627
|
type VideoNalu = { data : Uint8Array , fullData : Uint8Array , time : number | null , type : number } ;
|
|
4624
4628
|
}
|
|
4629
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js
|
|
4630
|
+
declare namespace shaka.extern {
|
|
4631
|
+
type VideoSample = { data : Uint8Array , dts : number | null , frame : boolean , isKeyframe : boolean , nalus : shaka.extern.VideoNalu [] , pts : number | null } ;
|
|
4632
|
+
}
|
|
4625
4633
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/error.js
|
|
4626
4634
|
declare namespace shaka.extern {
|
|
4627
4635
|
interface Error {
|
|
@@ -5029,7 +5037,7 @@ declare namespace shaka.extern {
|
|
|
5029
5037
|
}
|
|
5030
5038
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js
|
|
5031
5039
|
declare namespace shaka.extern {
|
|
5032
|
-
type StreamDB = { audioSamplingRate : number | null , channelsCount : number | null , closedCaptions : Map < string , string > | null , codecs : string , colorGamut ? : string , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , groupId : string | null , hdr ? : string , height : number | null , id : number , keyIds : Set < string > , kind ? : string , label : string | null , language : string , mimeType : string , originalId : string | null , originalLanguage ? : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segments : shaka.extern.SegmentDB [] , spatialAudio : boolean , tilesLayout ? : string , type : string , variantIds : number [] , videoLayout ? : string , width : number | null } ;
|
|
5040
|
+
type StreamDB = { audioSamplingRate : number | null , channelsCount : number | null , closedCaptions : Map < string , string > | null , codecs : string , colorGamut ? : string , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , groupId : string | null , hdr ? : string , height : number | null , id : number , keyIds : Set < string > , kind ? : string , label : string | null , language : string , mimeType : string , mssPrivateData ? : shaka.extern.MssPrivateData , originalId : string | null , originalLanguage ? : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segments : shaka.extern.SegmentDB [] , spatialAudio : boolean , tilesLayout ? : string , type : string , variantIds : number [] , videoLayout ? : string , width : number | null } ;
|
|
5033
5041
|
}
|
|
5034
5042
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js
|
|
5035
5043
|
declare namespace shaka.extern {
|
|
@@ -274,6 +274,10 @@ declare namespace shaka {
|
|
|
274
274
|
* return <code>false</code>.
|
|
275
275
|
*/
|
|
276
276
|
isBuffering ( ) : boolean ;
|
|
277
|
+
/**
|
|
278
|
+
* Indicate if the video has ended.
|
|
279
|
+
*/
|
|
280
|
+
isEnded ( ) : boolean ;
|
|
277
281
|
/**
|
|
278
282
|
* Get if the player is playing in-progress content. If the player has not
|
|
279
283
|
* loaded content, this will return <code>false</code>.
|
|
@@ -2581,7 +2585,7 @@ declare namespace shaka.text {
|
|
|
2581
2585
|
* The text displayer plugin for the Shaka Player UI. Can also be used directly
|
|
2582
2586
|
* by providing an appropriate container element.
|
|
2583
2587
|
*/
|
|
2584
|
-
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null
|
|
2588
|
+
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null ) ;
|
|
2585
2589
|
append (cues : any ) : any ;
|
|
2586
2590
|
configure (config : any ) : any ;
|
|
2587
2591
|
destroy ( ) : any ;
|
|
@@ -4259,7 +4263,7 @@ declare namespace shaka.util {
|
|
|
4259
4263
|
* The code is based on hls.js
|
|
4260
4264
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
4261
4265
|
*/
|
|
4262
|
-
parseNalus (pes : shaka.extern.MPEG_PES ,
|
|
4266
|
+
parseNalus (pes : shaka.extern.MPEG_PES , lastInfo : { nalu : shaka.extern.VideoNalu | null , state : number | null } ) : shaka.extern.VideoNalu [] ;
|
|
4263
4267
|
static Timescale : number ;
|
|
4264
4268
|
/**
|
|
4265
4269
|
* Check if the passed data corresponds to an MPEG2-TS
|
|
@@ -4622,6 +4626,10 @@ declare namespace shaka.extern {
|
|
|
4622
4626
|
declare namespace shaka.extern {
|
|
4623
4627
|
type VideoNalu = { data : Uint8Array , fullData : Uint8Array , time : number | null , type : number } ;
|
|
4624
4628
|
}
|
|
4629
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js
|
|
4630
|
+
declare namespace shaka.extern {
|
|
4631
|
+
type VideoSample = { data : Uint8Array , dts : number | null , frame : boolean , isKeyframe : boolean , nalus : shaka.extern.VideoNalu [] , pts : number | null } ;
|
|
4632
|
+
}
|
|
4625
4633
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/error.js
|
|
4626
4634
|
declare namespace shaka.extern {
|
|
4627
4635
|
interface Error {
|
|
@@ -5029,7 +5037,7 @@ declare namespace shaka.extern {
|
|
|
5029
5037
|
}
|
|
5030
5038
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js
|
|
5031
5039
|
declare namespace shaka.extern {
|
|
5032
|
-
type StreamDB = { audioSamplingRate : number | null , channelsCount : number | null , closedCaptions : Map < string , string > | null , codecs : string , colorGamut ? : string , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , groupId : string | null , hdr ? : string , height : number | null , id : number , keyIds : Set < string > , kind ? : string , label : string | null , language : string , mimeType : string , originalId : string | null , originalLanguage ? : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segments : shaka.extern.SegmentDB [] , spatialAudio : boolean , tilesLayout ? : string , type : string , variantIds : number [] , videoLayout ? : string , width : number | null } ;
|
|
5040
|
+
type StreamDB = { audioSamplingRate : number | null , channelsCount : number | null , closedCaptions : Map < string , string > | null , codecs : string , colorGamut ? : string , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , groupId : string | null , hdr ? : string , height : number | null , id : number , keyIds : Set < string > , kind ? : string , label : string | null , language : string , mimeType : string , mssPrivateData ? : shaka.extern.MssPrivateData , originalId : string | null , originalLanguage ? : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segments : shaka.extern.SegmentDB [] , spatialAudio : boolean , tilesLayout ? : string , type : string , variantIds : number [] , videoLayout ? : string , width : number | null } ;
|
|
5033
5041
|
}
|
|
5034
5042
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js
|
|
5035
5043
|
declare namespace shaka.extern {
|
|
@@ -2408,11 +2408,10 @@ shaka.util.TsParser = class {
|
|
|
2408
2408
|
* The code is based on hls.js
|
|
2409
2409
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
2410
2410
|
* @param {shaka.extern.MPEG_PES} pes
|
|
2411
|
-
* @param {?shaka.extern.VideoNalu
|
|
2412
|
-
* @param {?number=} lastState
|
|
2411
|
+
* @param {{nalu: ?shaka.extern.VideoNalu, state: ?number}} lastInfo
|
|
2413
2412
|
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
2414
2413
|
*/
|
|
2415
|
-
parseNalus(pes,
|
|
2414
|
+
parseNalus(pes, lastInfo) {}
|
|
2416
2415
|
/**
|
|
2417
2416
|
* Return the ID3 metadata
|
|
2418
2417
|
* @return {!Array.<shaka.extern.ID3Metadata>}
|
|
@@ -3178,9 +3177,8 @@ shaka.text.UITextDisplayer = class {
|
|
|
3178
3177
|
* Constructor.
|
|
3179
3178
|
* @param {HTMLMediaElement} video
|
|
3180
3179
|
* @param {HTMLElement} videoContainer
|
|
3181
|
-
* @param {shaka.extern.TextDisplayerConfiguration} config
|
|
3182
3180
|
*/
|
|
3183
|
-
constructor(video, videoContainer
|
|
3181
|
+
constructor(video, videoContainer) {}
|
|
3184
3182
|
/**
|
|
3185
3183
|
* @override
|
|
3186
3184
|
*/
|
|
@@ -3849,6 +3847,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3849
3847
|
* @param {HTMLElement} videoContainer
|
|
3850
3848
|
*/
|
|
3851
3849
|
setVideoContainer(videoContainer) {}
|
|
3850
|
+
/**
|
|
3851
|
+
* Indicate if the video has ended.
|
|
3852
|
+
* @return {boolean}
|
|
3853
|
+
*/
|
|
3854
|
+
isEnded() {}
|
|
3852
3855
|
};
|
|
3853
3856
|
/**
|
|
3854
3857
|
* In order to know what method of loading the player used for some content, we
|