shaka-player 4.12.5 → 4.12.7
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/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +3 -3
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.d.ts +12 -4
- package/dist/shaka-player.compiled.debug.d.ts +12 -4
- package/dist/shaka-player.compiled.debug.externs.js +10 -6
- package/dist/shaka-player.compiled.debug.js +439 -425
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +10 -6
- package/dist/shaka-player.compiled.js +1352 -1345
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +12 -4
- package/dist/shaka-player.ui.debug.d.ts +12 -4
- package/dist/shaka-player.ui.debug.externs.js +10 -6
- package/dist/shaka-player.ui.debug.js +439 -425
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +10 -6
- package/dist/shaka-player.ui.js +1596 -1588
- package/dist/shaka-player.ui.map +3 -3
- package/externs/shaka/codecs.js +21 -0
- package/externs/shaka/offline.js +4 -0
- package/lib/cast/cast_utils.js +1 -0
- package/lib/cea/cea708_service.js +27 -2
- package/lib/cea/dtvcc_packet_builder.js +15 -0
- package/lib/dash/dash_parser.js +5 -2
- package/lib/dash/mpd_utils.js +7 -4
- package/lib/dash/segment_template.js +30 -17
- package/lib/hls/hls_parser.js +31 -7
- package/lib/media/drm_engine.js +55 -12
- package/lib/media/media_source_engine.js +127 -41
- package/lib/media/segment_utils.js +65 -47
- package/lib/net/http_fetch_plugin.js +1 -1
- package/lib/net/http_plugin_utils.js +3 -0
- 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 +53 -22
- 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/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/drm_utils.js +20 -0
- package/lib/util/stream_utils.js +0 -60
- package/lib/util/ts_parser.js +111 -85
- package/package.json +1 -1
- package/ui/audio_language_selection.js +1 -1
- package/ui/controls.js +4 -0
- package/ui/fast_forward_button.js +7 -0
- package/ui/play_button.js +1 -1
- package/ui/playback_rate_selection.js +1 -1
- package/ui/rewind_button.js +7 -0
|
@@ -289,6 +289,10 @@ declare namespace shaka {
|
|
|
289
289
|
* return <code>false</code>.
|
|
290
290
|
*/
|
|
291
291
|
isBuffering ( ) : boolean ;
|
|
292
|
+
/**
|
|
293
|
+
* Indicate if the video has ended.
|
|
294
|
+
*/
|
|
295
|
+
isEnded ( ) : boolean ;
|
|
292
296
|
/**
|
|
293
297
|
* Indicates if the player has fully loaded the stream.
|
|
294
298
|
*/
|
|
@@ -370,7 +374,7 @@ declare namespace shaka {
|
|
|
370
374
|
* language, role and channel count, and chooses a new variant if need be.
|
|
371
375
|
* If the player has not loaded any content, this will be a no-op.
|
|
372
376
|
*/
|
|
373
|
-
selectAudioLanguage (language : string , role ? : string , channelsCount ? : number , safeMargin ? : number , codec ? : string ) : any ;
|
|
377
|
+
selectAudioLanguage (language : string , role ? : string , channelsCount ? : number , safeMargin ? : number , codec ? : string , spatialAudio ? : boolean ) : any ;
|
|
374
378
|
/**
|
|
375
379
|
* Sets the current text language and current text role to the selected
|
|
376
380
|
* language and role, and chooses a new variant if need be. If the player has
|
|
@@ -2883,7 +2887,7 @@ declare namespace shaka.text {
|
|
|
2883
2887
|
* The text displayer plugin for the Shaka Player UI. Can also be used directly
|
|
2884
2888
|
* by providing an appropriate container element.
|
|
2885
2889
|
*/
|
|
2886
|
-
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null
|
|
2890
|
+
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null ) ;
|
|
2887
2891
|
append (cues : any ) : any ;
|
|
2888
2892
|
configure (config : any ) : any ;
|
|
2889
2893
|
destroy ( ) : any ;
|
|
@@ -4590,7 +4594,7 @@ declare namespace shaka.util {
|
|
|
4590
4594
|
* The code is based on hls.js
|
|
4591
4595
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
4592
4596
|
*/
|
|
4593
|
-
parseNalus (pes : shaka.extern.MPEG_PES ,
|
|
4597
|
+
parseNalus (pes : shaka.extern.MPEG_PES , lastInfo : { nalu : shaka.extern.VideoNalu | null , state : number | null } ) : shaka.extern.VideoNalu [] ;
|
|
4594
4598
|
static Timescale : number ;
|
|
4595
4599
|
/**
|
|
4596
4600
|
* Check if the passed data corresponds to an MPEG2-TS
|
|
@@ -4964,6 +4968,10 @@ declare namespace shaka.extern {
|
|
|
4964
4968
|
declare namespace shaka.extern {
|
|
4965
4969
|
type VideoNalu = { data : Uint8Array , fullData : Uint8Array , time : number | null , type : number } ;
|
|
4966
4970
|
}
|
|
4971
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js
|
|
4972
|
+
declare namespace shaka.extern {
|
|
4973
|
+
type VideoSample = { data : Uint8Array , dts : number | null , frame : boolean , isKeyframe : boolean , nalus : shaka.extern.VideoNalu [] , pts : number | null } ;
|
|
4974
|
+
}
|
|
4967
4975
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/drm_info.js
|
|
4968
4976
|
declare namespace shaka.extern {
|
|
4969
4977
|
type DrmInfo = { audioRobustness : string , distinctiveIdentifierRequired : boolean , encryptionScheme : string , initData : shaka.extern.InitDataOverride [] | null , keyIds : Set < string > | null , keySystem : string , keySystemUris ? : Set < string > | null , licenseServerUri : string , persistentStateRequired : boolean , serverCertificate : Uint8Array | null , serverCertificateUri : string , sessionType : string , videoRobustness : string } ;
|
|
@@ -5383,7 +5391,7 @@ declare namespace shaka.extern {
|
|
|
5383
5391
|
}
|
|
5384
5392
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js
|
|
5385
5393
|
declare namespace shaka.extern {
|
|
5386
|
-
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 , isAudioMuxedInVideo : boolean , 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 } ;
|
|
5394
|
+
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 , isAudioMuxedInVideo : boolean , 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 } ;
|
|
5387
5395
|
}
|
|
5388
5396
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js
|
|
5389
5397
|
declare namespace shaka.extern {
|
|
@@ -289,6 +289,10 @@ declare namespace shaka {
|
|
|
289
289
|
* return <code>false</code>.
|
|
290
290
|
*/
|
|
291
291
|
isBuffering ( ) : boolean ;
|
|
292
|
+
/**
|
|
293
|
+
* Indicate if the video has ended.
|
|
294
|
+
*/
|
|
295
|
+
isEnded ( ) : boolean ;
|
|
292
296
|
/**
|
|
293
297
|
* Indicates if the player has fully loaded the stream.
|
|
294
298
|
*/
|
|
@@ -370,7 +374,7 @@ declare namespace shaka {
|
|
|
370
374
|
* language, role and channel count, and chooses a new variant if need be.
|
|
371
375
|
* If the player has not loaded any content, this will be a no-op.
|
|
372
376
|
*/
|
|
373
|
-
selectAudioLanguage (language : string , role ? : string , channelsCount ? : number , safeMargin ? : number , codec ? : string ) : any ;
|
|
377
|
+
selectAudioLanguage (language : string , role ? : string , channelsCount ? : number , safeMargin ? : number , codec ? : string , spatialAudio ? : boolean ) : any ;
|
|
374
378
|
/**
|
|
375
379
|
* Sets the current text language and current text role to the selected
|
|
376
380
|
* language and role, and chooses a new variant if need be. If the player has
|
|
@@ -2883,7 +2887,7 @@ declare namespace shaka.text {
|
|
|
2883
2887
|
* The text displayer plugin for the Shaka Player UI. Can also be used directly
|
|
2884
2888
|
* by providing an appropriate container element.
|
|
2885
2889
|
*/
|
|
2886
|
-
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null
|
|
2890
|
+
constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null ) ;
|
|
2887
2891
|
append (cues : any ) : any ;
|
|
2888
2892
|
configure (config : any ) : any ;
|
|
2889
2893
|
destroy ( ) : any ;
|
|
@@ -4590,7 +4594,7 @@ declare namespace shaka.util {
|
|
|
4590
4594
|
* The code is based on hls.js
|
|
4591
4595
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
4592
4596
|
*/
|
|
4593
|
-
parseNalus (pes : shaka.extern.MPEG_PES ,
|
|
4597
|
+
parseNalus (pes : shaka.extern.MPEG_PES , lastInfo : { nalu : shaka.extern.VideoNalu | null , state : number | null } ) : shaka.extern.VideoNalu [] ;
|
|
4594
4598
|
static Timescale : number ;
|
|
4595
4599
|
/**
|
|
4596
4600
|
* Check if the passed data corresponds to an MPEG2-TS
|
|
@@ -4964,6 +4968,10 @@ declare namespace shaka.extern {
|
|
|
4964
4968
|
declare namespace shaka.extern {
|
|
4965
4969
|
type VideoNalu = { data : Uint8Array , fullData : Uint8Array , time : number | null , type : number } ;
|
|
4966
4970
|
}
|
|
4971
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/codecs.js
|
|
4972
|
+
declare namespace shaka.extern {
|
|
4973
|
+
type VideoSample = { data : Uint8Array , dts : number | null , frame : boolean , isKeyframe : boolean , nalus : shaka.extern.VideoNalu [] , pts : number | null } ;
|
|
4974
|
+
}
|
|
4967
4975
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/drm_info.js
|
|
4968
4976
|
declare namespace shaka.extern {
|
|
4969
4977
|
type DrmInfo = { audioRobustness : string , distinctiveIdentifierRequired : boolean , encryptionScheme : string , initData : shaka.extern.InitDataOverride [] | null , keyIds : Set < string > | null , keySystem : string , keySystemUris ? : Set < string > | null , licenseServerUri : string , persistentStateRequired : boolean , serverCertificate : Uint8Array | null , serverCertificateUri : string , sessionType : string , videoRobustness : string } ;
|
|
@@ -5383,7 +5391,7 @@ declare namespace shaka.extern {
|
|
|
5383
5391
|
}
|
|
5384
5392
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline.js
|
|
5385
5393
|
declare namespace shaka.extern {
|
|
5386
|
-
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 , isAudioMuxedInVideo : boolean , 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 } ;
|
|
5394
|
+
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 , isAudioMuxedInVideo : boolean , 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 } ;
|
|
5387
5395
|
}
|
|
5388
5396
|
// Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/offline_compat_v1.js
|
|
5389
5397
|
declare namespace shaka.extern {
|
|
@@ -2438,11 +2438,10 @@ shaka.util.TsParser = class {
|
|
|
2438
2438
|
* The code is based on hls.js
|
|
2439
2439
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
2440
2440
|
* @param {shaka.extern.MPEG_PES} pes
|
|
2441
|
-
* @param {?shaka.extern.VideoNalu
|
|
2442
|
-
* @param {?number=} lastState
|
|
2441
|
+
* @param {{nalu: ?shaka.extern.VideoNalu, state: ?number}} lastInfo
|
|
2443
2442
|
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
2444
2443
|
*/
|
|
2445
|
-
parseNalus(pes,
|
|
2444
|
+
parseNalus(pes, lastInfo) {}
|
|
2446
2445
|
/**
|
|
2447
2446
|
* Return the ID3 metadata
|
|
2448
2447
|
* @return {!Array.<shaka.extern.ID3Metadata>}
|
|
@@ -3226,9 +3225,8 @@ shaka.text.UITextDisplayer = class {
|
|
|
3226
3225
|
* Constructor.
|
|
3227
3226
|
* @param {HTMLMediaElement} video
|
|
3228
3227
|
* @param {HTMLElement} videoContainer
|
|
3229
|
-
* @param {shaka.extern.TextDisplayerConfiguration} config
|
|
3230
3228
|
*/
|
|
3231
|
-
constructor(video, videoContainer
|
|
3229
|
+
constructor(video, videoContainer) {}
|
|
3232
3230
|
/**
|
|
3233
3231
|
* @override
|
|
3234
3232
|
*/
|
|
@@ -3763,8 +3761,9 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3763
3761
|
* @param {number=} channelsCount
|
|
3764
3762
|
* @param {number=} safeMargin
|
|
3765
3763
|
* @param {string=} codec
|
|
3764
|
+
* @param {boolean=} spatialAudio
|
|
3766
3765
|
*/
|
|
3767
|
-
selectAudioLanguage(language, role, channelsCount, safeMargin, codec) {}
|
|
3766
|
+
selectAudioLanguage(language, role, channelsCount, safeMargin, codec, spatialAudio) {}
|
|
3768
3767
|
/**
|
|
3769
3768
|
* Sets the current text language and current text role to the selected
|
|
3770
3769
|
* language and role, and chooses a new variant if need be. If the player has
|
|
@@ -3936,6 +3935,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3936
3935
|
* @return {boolean}
|
|
3937
3936
|
*/
|
|
3938
3937
|
isRemotePlayback() {}
|
|
3938
|
+
/**
|
|
3939
|
+
* Indicate if the video has ended.
|
|
3940
|
+
* @return {boolean}
|
|
3941
|
+
*/
|
|
3942
|
+
isEnded() {}
|
|
3939
3943
|
};
|
|
3940
3944
|
/**
|
|
3941
3945
|
* In order to know what method of loading the player used for some content, we
|