shaka-player 4.3.12 → 4.3.14
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/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/ISSUE_TEMPLATE/question.md +7 -0
- package/.github/workflows/release-please.yaml +2 -27
- package/AUTHORS +5 -0
- package/CHANGELOG.md +108 -0
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTORS +6 -0
- package/README.md +2 -0
- package/demo/common/asset.js +5 -1
- package/demo/common/assets.js +16 -2
- package/demo/common/message_ids.js +1 -0
- package/demo/custom.js +2 -0
- package/demo/locales/en.json +1 -0
- package/demo/locales/source.json +4 -0
- package/demo/main.js +1 -1
- package/dist/demo.compiled.debug.js +56 -54
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +56 -54
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +6 -6
- package/dist/locales.js +31 -31
- package/dist/receiver.compiled.debug.js +24 -22
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +24 -22
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +26 -6
- package/dist/shaka-player.compiled.debug.d.ts +26 -6
- package/dist/shaka-player.compiled.debug.externs.js +79 -49
- package/dist/shaka-player.compiled.debug.js +426 -410
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +79 -49
- package/dist/shaka-player.compiled.js +912 -901
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +38 -7
- package/dist/shaka-player.ui.debug.d.ts +38 -7
- package/dist/shaka-player.ui.debug.externs.js +80 -49
- package/dist/shaka-player.ui.debug.js +460 -442
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +80 -49
- package/dist/shaka-player.ui.js +1060 -1049
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ad_monetization.md +54 -0
- package/docs/tutorials/fairplay.md +2 -2
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/offline.md +1 -1
- package/docs/tutorials/plugins.md +4 -0
- package/docs/tutorials/text-displayer.md +15 -0
- package/docs/tutorials/ui-customization.md +29 -0
- package/docs/tutorials/ui.md +4 -1
- package/externs/lcevc.js +6 -0
- package/externs/shaka/manifest_parser.js +8 -0
- package/externs/shaka/player.js +1 -1
- package/externs/shaka/text.js +3 -1
- package/lib/abr/simple_abr_manager.js +1 -1
- package/lib/ads/client_side_ad.js +9 -0
- package/lib/ads/client_side_ad_manager.js +7 -2
- package/lib/ads/server_side_ad_manager.js +4 -0
- package/lib/cast/cast_proxy.js +18 -0
- package/lib/cea/cea608_memory.js +1 -1
- package/lib/cea/cea_decoder.js +11 -1
- package/lib/dash/dash_parser.js +79 -42
- package/lib/dash/mpd_utils.js +39 -27
- package/lib/hls/hls_parser.js +148 -49
- package/lib/hls/hls_utils.js +5 -5
- package/lib/media/content_workarounds.js +30 -0
- package/lib/media/drm_engine.js +16 -12
- package/lib/media/media_source_engine.js +4 -2
- package/lib/media/play_rate_controller.js +1 -0
- package/lib/media/presentation_timeline.js +11 -0
- package/lib/media/quality_observer.js +1 -1
- package/lib/media/segment_reference.js +16 -7
- package/lib/media/streaming_engine.js +64 -54
- package/lib/media/transmuxer.js +1 -1
- package/lib/media/video_wrapper.js +4 -3
- package/lib/offline/offline_manifest_parser.js +5 -0
- package/lib/offline/session_deleter.js +0 -8
- package/lib/offline/storage.js +4 -1
- package/lib/player.js +79 -18
- package/lib/polyfill/media_capabilities.js +23 -3
- package/lib/text/mp4_ttml_parser.js +2 -2
- package/lib/text/simple_text_displayer.js +7 -6
- package/lib/text/srt_text_parser.js +2 -2
- package/lib/text/text_engine.js +3 -2
- package/lib/text/ttml_text_parser.js +33 -5
- package/lib/text/ui_text_displayer.js +81 -15
- package/lib/text/vtt_text_parser.js +13 -0
- package/lib/util/buffer_utils.js +26 -4
- package/lib/util/cmcd_manager.js +16 -1
- package/lib/util/fairplay_utils.js +1 -1
- package/lib/util/manifest_parser_utils.js +20 -8
- package/lib/util/object_utils.js +1 -1
- package/lib/util/periods.js +91 -36
- package/lib/util/platform.js +39 -2
- package/lib/util/player_configuration.js +5 -3
- package/lib/util/stream_utils.js +36 -28
- package/lib/util/ts_parser.js +3 -3
- package/lib/util/xml_utils.js +5 -0
- package/package.json +2 -2
- package/test/cea/cea_decoder_unit.js +40 -0
- package/test/dash/dash_parser_live_unit.js +5 -8
- package/test/dash/dash_parser_manifest_unit.js +5 -0
- package/test/dash/dash_parser_segment_base_unit.js +5 -0
- package/test/dash/dash_parser_segment_list_unit.js +21 -17
- package/test/dash/dash_parser_segment_template_unit.js +5 -0
- package/test/hls/hls_live_unit.js +33 -0
- package/test/hls/hls_parser_unit.js +52 -60
- package/test/media/buffering_observer_unit.js +13 -0
- package/test/media/content_workarounds_unit.js +1 -1
- package/test/media/drm_engine_unit.js +30 -3
- package/test/media/media_source_engine_unit.js +1 -1
- package/test/media/transmuxer_integration.js +2 -2
- package/test/offline/storage_integration.js +3 -0
- package/test/player_integration.js +40 -40
- package/test/player_unit.js +31 -0
- package/test/polyfill/media_capabilities_unit.js +12 -6
- package/test/test/util/dash_parser_util.js +16 -7
- package/test/test/util/fake_drm_engine.js +7 -0
- package/test/test/util/layout_tests.js +2 -1
- package/test/test/util/simple_fakes.js +2 -2
- package/test/test/util/test_scheme.js +3 -0
- package/test/test/util/waiter.js +5 -0
- package/test/text/mp4_ttml_parser_unit.js +4 -4
- package/test/text/simple_text_displayer_unit.js +1 -1
- package/test/text/srt_text_parser_unit.js +1 -1
- package/test/text/text_engine_unit.js +6 -0
- package/test/text/ttml_text_parser_unit.js +49 -18
- package/test/text/ui_text_displayer_unit.js +9 -0
- package/test/text/vtt_text_parser_unit.js +2 -17
- package/test/util/buffer_utils_unit.js +1 -1
- package/test/util/periods_unit.js +113 -0
- package/test/util/ts_parser_unit.js +1 -1
- package/third_party/closure-uri/uri.js +1 -1
- package/ui/externs/ui.js +24 -0
- package/ui/language_utils.js +11 -5
- package/ui/play_button.js +20 -0
- package/ui/playback_rate_selection.js +4 -0
- package/ui/presentation_time.js +5 -5
- package/ui/small_play_button.js +2 -2
- package/ui/volume_bar.js +10 -6
- /package/.github/{config.yml → ISSUE_TEMPLATE/config.yml} +0 -0
|
@@ -796,6 +796,7 @@ declare namespace shaka.dash {
|
|
|
796
796
|
private noStructuralTyping_shaka_dash_DashParser : any;
|
|
797
797
|
configure (config : any ) : any ;
|
|
798
798
|
onExpirationUpdated (sessionId : any , expiration : any ) : any ;
|
|
799
|
+
onInitialVariantChosen (variant : any ) : any ;
|
|
799
800
|
start (uri : any , playerInterface : any ) : any ;
|
|
800
801
|
stop ( ) : any ;
|
|
801
802
|
update ( ) : any ;
|
|
@@ -833,6 +834,7 @@ declare namespace shaka.hls {
|
|
|
833
834
|
private noStructuralTyping_shaka_hls_HlsParser : any;
|
|
834
835
|
configure (config : any ) : any ;
|
|
835
836
|
onExpirationUpdated (sessionId : any , expiration : any ) : any ;
|
|
837
|
+
onInitialVariantChosen (variant : any ) : any ;
|
|
836
838
|
start (uri : any , playerInterface : any ) : any ;
|
|
837
839
|
stop ( ) : any ;
|
|
838
840
|
update ( ) : any ;
|
|
@@ -857,7 +859,7 @@ declare namespace shaka.media {
|
|
|
857
859
|
*/
|
|
858
860
|
class InitSegmentReference {
|
|
859
861
|
private noStructuralTyping_shaka_media_InitSegmentReference : any;
|
|
860
|
-
constructor (uris : ( ) => string [] , startByte : number , endByte : number | null , mediaQuality ? : null | shaka.extern.MediaQualityInfo , timescale ? : number ) ;
|
|
862
|
+
constructor (uris : ( ) => string [] , startByte : number , endByte : number | null , mediaQuality ? : null | shaka.extern.MediaQualityInfo , timescale ? : null | number , aes128Key ? : shaka.extern.HlsAes128Key | null ) ;
|
|
861
863
|
/**
|
|
862
864
|
* Returns the offset from the start of the resource to the end of the
|
|
863
865
|
* segment, inclusive. A value of null indicates that the segment extends
|
|
@@ -962,6 +964,10 @@ declare namespace shaka.media {
|
|
|
962
964
|
getSegmentAvailabilityStart ( ) : number ;
|
|
963
965
|
isInProgress ( ) : boolean ;
|
|
964
966
|
isLive ( ) : boolean ;
|
|
967
|
+
/**
|
|
968
|
+
* Returns if the presentation timeline's start time is locked.
|
|
969
|
+
*/
|
|
970
|
+
isStartTimeLocked ( ) : boolean ;
|
|
965
971
|
/**
|
|
966
972
|
* Lock the presentation timeline's start time. After this is called, no
|
|
967
973
|
* further adjustments to presentationStartTime_ will be permitted.
|
|
@@ -1960,7 +1966,7 @@ declare namespace shaka.text {
|
|
|
1960
1966
|
class Mp4TtmlParser implements shaka.extern.TextParser {
|
|
1961
1967
|
private noStructuralTyping_shaka_text_Mp4TtmlParser : any;
|
|
1962
1968
|
parseInit (data : any ) : any ;
|
|
1963
|
-
parseMedia (data : any , time : any ) : any ;
|
|
1969
|
+
parseMedia (data : any , time : any , uri : any ) : any ;
|
|
1964
1970
|
setSequenceMode (sequenceMode : any ) : any ;
|
|
1965
1971
|
}
|
|
1966
1972
|
}
|
|
@@ -1992,7 +1998,7 @@ declare namespace shaka.text {
|
|
|
1992
1998
|
/**
|
|
1993
1999
|
* A text displayer plugin using the browser's native VTTCue interface.
|
|
1994
2000
|
*/
|
|
1995
|
-
constructor (video : HTMLMediaElement | null ) ;
|
|
2001
|
+
constructor (video : HTMLMediaElement | null , label : string ) ;
|
|
1996
2002
|
append (cues : any ) : any ;
|
|
1997
2003
|
destroy ( ) : any ;
|
|
1998
2004
|
isTextVisible ( ) : any ;
|
|
@@ -2005,7 +2011,7 @@ declare namespace shaka.text {
|
|
|
2005
2011
|
class SrtTextParser implements shaka.extern.TextParser {
|
|
2006
2012
|
private noStructuralTyping_shaka_text_SrtTextParser : any;
|
|
2007
2013
|
parseInit (data : any ) : any ;
|
|
2008
|
-
parseMedia (data : any , time : any ) : any ;
|
|
2014
|
+
parseMedia (data : any , time : any , uri : any ) : any ;
|
|
2009
2015
|
setSequenceMode (sequenceMode : any ) : any ;
|
|
2010
2016
|
/**
|
|
2011
2017
|
* Convert a SRT format to WebVTT
|
|
@@ -2042,7 +2048,7 @@ declare namespace shaka.text {
|
|
|
2042
2048
|
class TtmlTextParser implements shaka.extern.TextParser {
|
|
2043
2049
|
private noStructuralTyping_shaka_text_TtmlTextParser : any;
|
|
2044
2050
|
parseInit (data : any ) : any ;
|
|
2045
|
-
parseMedia (data : any , time : any ) : any ;
|
|
2051
|
+
parseMedia (data : any , time : any , uri : any ) : any ;
|
|
2046
2052
|
setSequenceMode (sequenceMode : any ) : any ;
|
|
2047
2053
|
}
|
|
2048
2054
|
}
|
|
@@ -2394,9 +2400,12 @@ declare namespace shaka.ui {
|
|
|
2394
2400
|
}
|
|
2395
2401
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
|
|
2396
2402
|
declare namespace shaka.ui {
|
|
2397
|
-
class PlayButton extends shaka.ui.Element {
|
|
2403
|
+
class PlayButton extends shaka.ui.Element implements shaka.extern.IUIPlayButton {
|
|
2398
2404
|
private noStructuralTyping_shaka_ui_PlayButton : any;
|
|
2399
2405
|
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ;
|
|
2406
|
+
button : HTMLButtonElement ;
|
|
2407
|
+
isEnded ( ) : boolean ;
|
|
2408
|
+
isPaused ( ) : boolean ;
|
|
2400
2409
|
}
|
|
2401
2410
|
}
|
|
2402
2411
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.externs.js
|
|
@@ -2593,6 +2602,15 @@ declare namespace shaka.util {
|
|
|
2593
2602
|
* Creates a DataView over the given buffer.
|
|
2594
2603
|
*/
|
|
2595
2604
|
static toDataView (buffer : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : DataView ;
|
|
2605
|
+
/**
|
|
2606
|
+
* Creates a new Uint16Array view on the same buffer. This clamps the values
|
|
2607
|
+
* to be within the same view (i.e. you can't use this to move past the end
|
|
2608
|
+
* of the view, even if the underlying buffer is larger). However, you can
|
|
2609
|
+
* pass a negative offset to access the data before the view.
|
|
2610
|
+
* @param offset The offset from the beginning of this data's view to start the new view at.
|
|
2611
|
+
* @param length The byte length of the new view.
|
|
2612
|
+
*/
|
|
2613
|
+
static toUint16 (data : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : Uint16Array ;
|
|
2596
2614
|
/**
|
|
2597
2615
|
* Creates a new Uint8Array view on the same buffer. This clamps the values
|
|
2598
2616
|
* to be within the same view (i.e. you can't use this to move past the end
|
|
@@ -4206,6 +4224,10 @@ declare namespace shaka.extern {
|
|
|
4206
4224
|
* Implementing this is optional.
|
|
4207
4225
|
*/
|
|
4208
4226
|
onExpirationUpdated (sessionId : string , expiration : number ) : any ;
|
|
4227
|
+
/**
|
|
4228
|
+
* Tell the parser that the initial variant has been chosen.
|
|
4229
|
+
*/
|
|
4230
|
+
onInitialVariantChosen (variant : shaka.extern.Variant ) : any ;
|
|
4209
4231
|
/**
|
|
4210
4232
|
* Initialize and start the parser. When |start| resolves, it should return
|
|
4211
4233
|
* the initial version of the manifest. |start| will only be called once. If
|
|
@@ -4920,8 +4942,9 @@ declare namespace shaka.extern {
|
|
|
4920
4942
|
* Parse a media segment and return the cues that make up the segment.
|
|
4921
4943
|
* @param data The next section of buffer.
|
|
4922
4944
|
* @param timeContext The time information that should be used to adjust the times values for each cue.
|
|
4945
|
+
* @param uri The media uri.
|
|
4923
4946
|
*/
|
|
4924
|
-
parseMedia (data : Uint8Array , timeContext : shaka.extern.TextParser.TimeContext ) : shaka.extern.Cue [] ;
|
|
4947
|
+
parseMedia (data : Uint8Array , timeContext : shaka.extern.TextParser.TimeContext , uri : string | undefined | null ) : shaka.extern.Cue [] ;
|
|
4925
4948
|
/**
|
|
4926
4949
|
* Notifies the stream if the manifest is in sequence mode or not.
|
|
4927
4950
|
*/
|
|
@@ -5011,6 +5034,14 @@ declare namespace shaka.extern.IUIElement {
|
|
|
5011
5034
|
}
|
|
5012
5035
|
}
|
|
5013
5036
|
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js
|
|
5037
|
+
declare namespace shaka.extern {
|
|
5038
|
+
interface IUIPlayButton {
|
|
5039
|
+
button : HTMLButtonElement ;
|
|
5040
|
+
isEnded ( ) : boolean ;
|
|
5041
|
+
isPaused ( ) : boolean ;
|
|
5042
|
+
}
|
|
5043
|
+
}
|
|
5044
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js
|
|
5014
5045
|
declare namespace shaka.extern {
|
|
5015
5046
|
/**
|
|
5016
5047
|
* Interface for UI range elements. UI range elements should inherit from the
|
|
@@ -796,6 +796,7 @@ declare namespace shaka.dash {
|
|
|
796
796
|
private noStructuralTyping_shaka_dash_DashParser : any;
|
|
797
797
|
configure (config : any ) : any ;
|
|
798
798
|
onExpirationUpdated (sessionId : any , expiration : any ) : any ;
|
|
799
|
+
onInitialVariantChosen (variant : any ) : any ;
|
|
799
800
|
start (uri : any , playerInterface : any ) : any ;
|
|
800
801
|
stop ( ) : any ;
|
|
801
802
|
update ( ) : any ;
|
|
@@ -833,6 +834,7 @@ declare namespace shaka.hls {
|
|
|
833
834
|
private noStructuralTyping_shaka_hls_HlsParser : any;
|
|
834
835
|
configure (config : any ) : any ;
|
|
835
836
|
onExpirationUpdated (sessionId : any , expiration : any ) : any ;
|
|
837
|
+
onInitialVariantChosen (variant : any ) : any ;
|
|
836
838
|
start (uri : any , playerInterface : any ) : any ;
|
|
837
839
|
stop ( ) : any ;
|
|
838
840
|
update ( ) : any ;
|
|
@@ -857,7 +859,7 @@ declare namespace shaka.media {
|
|
|
857
859
|
*/
|
|
858
860
|
class InitSegmentReference {
|
|
859
861
|
private noStructuralTyping_shaka_media_InitSegmentReference : any;
|
|
860
|
-
constructor (uris : ( ) => string [] , startByte : number , endByte : number | null , mediaQuality ? : null | shaka.extern.MediaQualityInfo , timescale ? : number ) ;
|
|
862
|
+
constructor (uris : ( ) => string [] , startByte : number , endByte : number | null , mediaQuality ? : null | shaka.extern.MediaQualityInfo , timescale ? : null | number , aes128Key ? : shaka.extern.HlsAes128Key | null ) ;
|
|
861
863
|
/**
|
|
862
864
|
* Returns the offset from the start of the resource to the end of the
|
|
863
865
|
* segment, inclusive. A value of null indicates that the segment extends
|
|
@@ -962,6 +964,10 @@ declare namespace shaka.media {
|
|
|
962
964
|
getSegmentAvailabilityStart ( ) : number ;
|
|
963
965
|
isInProgress ( ) : boolean ;
|
|
964
966
|
isLive ( ) : boolean ;
|
|
967
|
+
/**
|
|
968
|
+
* Returns if the presentation timeline's start time is locked.
|
|
969
|
+
*/
|
|
970
|
+
isStartTimeLocked ( ) : boolean ;
|
|
965
971
|
/**
|
|
966
972
|
* Lock the presentation timeline's start time. After this is called, no
|
|
967
973
|
* further adjustments to presentationStartTime_ will be permitted.
|
|
@@ -1960,7 +1966,7 @@ declare namespace shaka.text {
|
|
|
1960
1966
|
class Mp4TtmlParser implements shaka.extern.TextParser {
|
|
1961
1967
|
private noStructuralTyping_shaka_text_Mp4TtmlParser : any;
|
|
1962
1968
|
parseInit (data : any ) : any ;
|
|
1963
|
-
parseMedia (data : any , time : any ) : any ;
|
|
1969
|
+
parseMedia (data : any , time : any , uri : any ) : any ;
|
|
1964
1970
|
setSequenceMode (sequenceMode : any ) : any ;
|
|
1965
1971
|
}
|
|
1966
1972
|
}
|
|
@@ -1992,7 +1998,7 @@ declare namespace shaka.text {
|
|
|
1992
1998
|
/**
|
|
1993
1999
|
* A text displayer plugin using the browser's native VTTCue interface.
|
|
1994
2000
|
*/
|
|
1995
|
-
constructor (video : HTMLMediaElement | null ) ;
|
|
2001
|
+
constructor (video : HTMLMediaElement | null , label : string ) ;
|
|
1996
2002
|
append (cues : any ) : any ;
|
|
1997
2003
|
destroy ( ) : any ;
|
|
1998
2004
|
isTextVisible ( ) : any ;
|
|
@@ -2005,7 +2011,7 @@ declare namespace shaka.text {
|
|
|
2005
2011
|
class SrtTextParser implements shaka.extern.TextParser {
|
|
2006
2012
|
private noStructuralTyping_shaka_text_SrtTextParser : any;
|
|
2007
2013
|
parseInit (data : any ) : any ;
|
|
2008
|
-
parseMedia (data : any , time : any ) : any ;
|
|
2014
|
+
parseMedia (data : any , time : any , uri : any ) : any ;
|
|
2009
2015
|
setSequenceMode (sequenceMode : any ) : any ;
|
|
2010
2016
|
/**
|
|
2011
2017
|
* Convert a SRT format to WebVTT
|
|
@@ -2042,7 +2048,7 @@ declare namespace shaka.text {
|
|
|
2042
2048
|
class TtmlTextParser implements shaka.extern.TextParser {
|
|
2043
2049
|
private noStructuralTyping_shaka_text_TtmlTextParser : any;
|
|
2044
2050
|
parseInit (data : any ) : any ;
|
|
2045
|
-
parseMedia (data : any , time : any ) : any ;
|
|
2051
|
+
parseMedia (data : any , time : any , uri : any ) : any ;
|
|
2046
2052
|
setSequenceMode (sequenceMode : any ) : any ;
|
|
2047
2053
|
}
|
|
2048
2054
|
}
|
|
@@ -2394,9 +2400,12 @@ declare namespace shaka.ui {
|
|
|
2394
2400
|
}
|
|
2395
2401
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
|
|
2396
2402
|
declare namespace shaka.ui {
|
|
2397
|
-
class PlayButton extends shaka.ui.Element {
|
|
2403
|
+
class PlayButton extends shaka.ui.Element implements shaka.extern.IUIPlayButton {
|
|
2398
2404
|
private noStructuralTyping_shaka_ui_PlayButton : any;
|
|
2399
2405
|
constructor (parent : HTMLElement , controls : shaka.ui.Controls ) ;
|
|
2406
|
+
button : HTMLButtonElement ;
|
|
2407
|
+
isEnded ( ) : boolean ;
|
|
2408
|
+
isPaused ( ) : boolean ;
|
|
2400
2409
|
}
|
|
2401
2410
|
}
|
|
2402
2411
|
// Generated from /home/runner/work/shaka-player/shaka-player/dist/shaka-player.ui.debug.externs.js
|
|
@@ -2593,6 +2602,15 @@ declare namespace shaka.util {
|
|
|
2593
2602
|
* Creates a DataView over the given buffer.
|
|
2594
2603
|
*/
|
|
2595
2604
|
static toDataView (buffer : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : DataView ;
|
|
2605
|
+
/**
|
|
2606
|
+
* Creates a new Uint16Array view on the same buffer. This clamps the values
|
|
2607
|
+
* to be within the same view (i.e. you can't use this to move past the end
|
|
2608
|
+
* of the view, even if the underlying buffer is larger). However, you can
|
|
2609
|
+
* pass a negative offset to access the data before the view.
|
|
2610
|
+
* @param offset The offset from the beginning of this data's view to start the new view at.
|
|
2611
|
+
* @param length The byte length of the new view.
|
|
2612
|
+
*/
|
|
2613
|
+
static toUint16 (data : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : Uint16Array ;
|
|
2596
2614
|
/**
|
|
2597
2615
|
* Creates a new Uint8Array view on the same buffer. This clamps the values
|
|
2598
2616
|
* to be within the same view (i.e. you can't use this to move past the end
|
|
@@ -4206,6 +4224,10 @@ declare namespace shaka.extern {
|
|
|
4206
4224
|
* Implementing this is optional.
|
|
4207
4225
|
*/
|
|
4208
4226
|
onExpirationUpdated (sessionId : string , expiration : number ) : any ;
|
|
4227
|
+
/**
|
|
4228
|
+
* Tell the parser that the initial variant has been chosen.
|
|
4229
|
+
*/
|
|
4230
|
+
onInitialVariantChosen (variant : shaka.extern.Variant ) : any ;
|
|
4209
4231
|
/**
|
|
4210
4232
|
* Initialize and start the parser. When |start| resolves, it should return
|
|
4211
4233
|
* the initial version of the manifest. |start| will only be called once. If
|
|
@@ -4920,8 +4942,9 @@ declare namespace shaka.extern {
|
|
|
4920
4942
|
* Parse a media segment and return the cues that make up the segment.
|
|
4921
4943
|
* @param data The next section of buffer.
|
|
4922
4944
|
* @param timeContext The time information that should be used to adjust the times values for each cue.
|
|
4945
|
+
* @param uri The media uri.
|
|
4923
4946
|
*/
|
|
4924
|
-
parseMedia (data : Uint8Array , timeContext : shaka.extern.TextParser.TimeContext ) : shaka.extern.Cue [] ;
|
|
4947
|
+
parseMedia (data : Uint8Array , timeContext : shaka.extern.TextParser.TimeContext , uri : string | undefined | null ) : shaka.extern.Cue [] ;
|
|
4925
4948
|
/**
|
|
4926
4949
|
* Notifies the stream if the manifest is in sequence mode or not.
|
|
4927
4950
|
*/
|
|
@@ -5011,6 +5034,14 @@ declare namespace shaka.extern.IUIElement {
|
|
|
5011
5034
|
}
|
|
5012
5035
|
}
|
|
5013
5036
|
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js
|
|
5037
|
+
declare namespace shaka.extern {
|
|
5038
|
+
interface IUIPlayButton {
|
|
5039
|
+
button : HTMLButtonElement ;
|
|
5040
|
+
isEnded ( ) : boolean ;
|
|
5041
|
+
isPaused ( ) : boolean ;
|
|
5042
|
+
}
|
|
5043
|
+
}
|
|
5044
|
+
// Generated from /home/runner/work/shaka-player/shaka-player/ui/externs/ui.js
|
|
5014
5045
|
declare namespace shaka.extern {
|
|
5015
5046
|
/**
|
|
5016
5047
|
* Interface for UI range elements. UI range elements should inherit from the
|
|
@@ -944,6 +944,18 @@ shaka.util.BufferUtils = class {
|
|
|
944
944
|
* @return {!Uint8Array}
|
|
945
945
|
*/
|
|
946
946
|
static toUint8(data, offset, length) {}
|
|
947
|
+
/**
|
|
948
|
+
* Creates a new Uint16Array view on the same buffer. This clamps the values
|
|
949
|
+
* to be within the same view (i.e. you can't use this to move past the end
|
|
950
|
+
* of the view, even if the underlying buffer is larger). However, you can
|
|
951
|
+
* pass a negative offset to access the data before the view.
|
|
952
|
+
* @param {BufferSource} data
|
|
953
|
+
* @param {number=} offset The offset from the beginning of this data's view
|
|
954
|
+
* to start the new view at.
|
|
955
|
+
* @param {number=} length The byte length of the new view.
|
|
956
|
+
* @return {!Uint16Array}
|
|
957
|
+
*/
|
|
958
|
+
static toUint16(data, offset, length) {}
|
|
947
959
|
/**
|
|
948
960
|
* Creates a DataView over the given buffer.
|
|
949
961
|
* @see toUint8
|
|
@@ -1771,11 +1783,13 @@ shaka.media.InitSegmentReference = class {
|
|
|
1771
1783
|
* @param {?number} endByte The offset from the start of the resource
|
|
1772
1784
|
* to the end of the segment, inclusive. A value of null indicates that the
|
|
1773
1785
|
* segment extends to the end of the resource.
|
|
1774
|
-
* @param {null|shaka.extern.MediaQualityInfo=} mediaQuality Information
|
|
1775
|
-
* the quality of the media associated with this init segment.
|
|
1776
|
-
* @param {number=} timescale
|
|
1786
|
+
* @param {(null|shaka.extern.MediaQualityInfo)=} mediaQuality Information
|
|
1787
|
+
* about the quality of the media associated with this init segment.
|
|
1788
|
+
* @param {(null|number)=} timescale
|
|
1789
|
+
* @param {?shaka.extern.HlsAes128Key=} aes128Key
|
|
1790
|
+
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1777
1791
|
*/
|
|
1778
|
-
constructor(uris, startByte, endByte, mediaQuality, timescale) {}
|
|
1792
|
+
constructor(uris, startByte, endByte, mediaQuality, timescale, aes128Key) {}
|
|
1779
1793
|
/**
|
|
1780
1794
|
* Returns the offset from the start of the resource to the
|
|
1781
1795
|
* start of the segment.
|
|
@@ -2089,6 +2103,11 @@ shaka.media.PresentationTimeline = class {
|
|
|
2089
2103
|
* windows to jump around on updates.
|
|
2090
2104
|
*/
|
|
2091
2105
|
lockStartTime() {}
|
|
2106
|
+
/**
|
|
2107
|
+
* Returns if the presentation timeline's start time is locked.
|
|
2108
|
+
* @return {boolean}
|
|
2109
|
+
*/
|
|
2110
|
+
isStartTimeLocked() {}
|
|
2092
2111
|
/**
|
|
2093
2112
|
* Gives PresentationTimeline a Stream's minimum segment start time.
|
|
2094
2113
|
* @param {number} startTime
|
|
@@ -2353,13 +2372,56 @@ shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
|
|
|
2353
2372
|
*/
|
|
2354
2373
|
updateEvery(interval, updateCallback) {}
|
|
2355
2374
|
};
|
|
2375
|
+
/**
|
|
2376
|
+
* @typedef {{
|
|
2377
|
+
* type: string,
|
|
2378
|
+
* init: boolean,
|
|
2379
|
+
* duration: number,
|
|
2380
|
+
* mimeType: string,
|
|
2381
|
+
* codecs: string,
|
|
2382
|
+
* bandwidth: (number|undefined)
|
|
2383
|
+
* }}
|
|
2384
|
+
* @property {string} type
|
|
2385
|
+
* The media type
|
|
2386
|
+
* @property {boolean} init
|
|
2387
|
+
* Flag indicating whether the segment is an init segment
|
|
2388
|
+
* @property {number} duration
|
|
2389
|
+
* The duration of the segment in seconds
|
|
2390
|
+
* @property {string} mimeType
|
|
2391
|
+
* The segment's mime type
|
|
2392
|
+
* @property {string} codecs
|
|
2393
|
+
* The segment's codecs
|
|
2394
|
+
* @property {(number|undefined)} bandwidth
|
|
2395
|
+
* The segment's variation bandwidth
|
|
2396
|
+
*/
|
|
2397
|
+
shaka.util.CmcdManager.SegmentInfo;
|
|
2398
|
+
/**
|
|
2399
|
+
* @typedef {{
|
|
2400
|
+
* format: shaka.util.CmcdManager.StreamingFormat
|
|
2401
|
+
* }}
|
|
2402
|
+
* @property {shaka.util.CmcdManager.StreamingFormat} format
|
|
2403
|
+
* The manifest's stream format
|
|
2404
|
+
*/
|
|
2405
|
+
shaka.util.CmcdManager.ManifestInfo;
|
|
2406
|
+
/**
|
|
2407
|
+
* @enum {string}
|
|
2408
|
+
*/
|
|
2409
|
+
shaka.util.CmcdManager.StreamingFormat = {
|
|
2410
|
+
DASH: 'd',
|
|
2411
|
+
HLS: 'h',
|
|
2412
|
+
SMOOTH: 's',
|
|
2413
|
+
OTHER: 'o'
|
|
2414
|
+
};
|
|
2356
2415
|
/**
|
|
2357
2416
|
* A text displayer plugin using the browser's native VTTCue interface.
|
|
2358
2417
|
* @implements {shaka.extern.TextDisplayer}
|
|
2359
2418
|
*/
|
|
2360
2419
|
shaka.text.SimpleTextDisplayer = class {
|
|
2361
|
-
/**
|
|
2362
|
-
|
|
2420
|
+
/**
|
|
2421
|
+
* @param {HTMLMediaElement} video
|
|
2422
|
+
* @param {string} label
|
|
2423
|
+
*/
|
|
2424
|
+
constructor(video, label) {}
|
|
2363
2425
|
/**
|
|
2364
2426
|
* @override
|
|
2365
2427
|
*/
|
|
@@ -2428,46 +2490,6 @@ shaka.text.UITextDisplayer = class {
|
|
|
2428
2490
|
*/
|
|
2429
2491
|
shaka.text.WebVttGenerator = class {
|
|
2430
2492
|
};
|
|
2431
|
-
/**
|
|
2432
|
-
* @typedef {{
|
|
2433
|
-
* type: string,
|
|
2434
|
-
* init: boolean,
|
|
2435
|
-
* duration: number,
|
|
2436
|
-
* mimeType: string,
|
|
2437
|
-
* codecs: string,
|
|
2438
|
-
* bandwidth: (number|undefined)
|
|
2439
|
-
* }}
|
|
2440
|
-
* @property {string} type
|
|
2441
|
-
* The media type
|
|
2442
|
-
* @property {boolean} init
|
|
2443
|
-
* Flag indicating whether the segment is an init segment
|
|
2444
|
-
* @property {number} duration
|
|
2445
|
-
* The duration of the segment in seconds
|
|
2446
|
-
* @property {string} mimeType
|
|
2447
|
-
* The segment's mime type
|
|
2448
|
-
* @property {string} codecs
|
|
2449
|
-
* The segment's codecs
|
|
2450
|
-
* @property {(number|undefined)} bandwidth
|
|
2451
|
-
* The segment's variation bandwidth
|
|
2452
|
-
*/
|
|
2453
|
-
shaka.util.CmcdManager.SegmentInfo;
|
|
2454
|
-
/**
|
|
2455
|
-
* @typedef {{
|
|
2456
|
-
* format: shaka.util.CmcdManager.StreamingFormat
|
|
2457
|
-
* }}
|
|
2458
|
-
* @property {shaka.util.CmcdManager.StreamingFormat} format
|
|
2459
|
-
* The manifest's stream format
|
|
2460
|
-
*/
|
|
2461
|
-
shaka.util.CmcdManager.ManifestInfo;
|
|
2462
|
-
/**
|
|
2463
|
-
* @enum {string}
|
|
2464
|
-
*/
|
|
2465
|
-
shaka.util.CmcdManager.StreamingFormat = {
|
|
2466
|
-
DASH: 'd',
|
|
2467
|
-
HLS: 'h',
|
|
2468
|
-
SMOOTH: 's',
|
|
2469
|
-
OTHER: 'o'
|
|
2470
|
-
};
|
|
2471
2493
|
/** */
|
|
2472
2494
|
shaka.util.ConfigUtils = class {
|
|
2473
2495
|
/**
|
|
@@ -3735,6 +3757,10 @@ shaka.dash.DashParser = class {
|
|
|
3735
3757
|
* @override
|
|
3736
3758
|
*/
|
|
3737
3759
|
onExpirationUpdated(sessionId, expiration) {}
|
|
3760
|
+
/**
|
|
3761
|
+
* @override
|
|
3762
|
+
*/
|
|
3763
|
+
onInitialVariantChosen(variant) {}
|
|
3738
3764
|
};
|
|
3739
3765
|
/**
|
|
3740
3766
|
* @summary A networking plugin to handle data URIs.
|
|
@@ -3780,6 +3806,10 @@ shaka.hls.HlsParser = class {
|
|
|
3780
3806
|
* @override
|
|
3781
3807
|
*/
|
|
3782
3808
|
onExpirationUpdated(sessionId, expiration) {}
|
|
3809
|
+
/**
|
|
3810
|
+
* @override
|
|
3811
|
+
*/
|
|
3812
|
+
onInitialVariantChosen(variant) {}
|
|
3783
3813
|
};
|
|
3784
3814
|
/**
|
|
3785
3815
|
* @summary A networking plugin to handle http and https URIs via the Fetch API.
|
|
@@ -4235,7 +4265,7 @@ shaka.text.TtmlTextParser = class {
|
|
|
4235
4265
|
/**
|
|
4236
4266
|
* @override
|
|
4237
4267
|
*/
|
|
4238
|
-
parseMedia(data, time) {}
|
|
4268
|
+
parseMedia(data, time, uri) {}
|
|
4239
4269
|
};
|
|
4240
4270
|
/**
|
|
4241
4271
|
* @implements {shaka.extern.TextParser}
|
|
@@ -4254,7 +4284,7 @@ shaka.text.Mp4TtmlParser = class {
|
|
|
4254
4284
|
/**
|
|
4255
4285
|
* @override
|
|
4256
4286
|
*/
|
|
4257
|
-
parseMedia(data, time) {}
|
|
4287
|
+
parseMedia(data, time, uri) {}
|
|
4258
4288
|
};
|
|
4259
4289
|
/**
|
|
4260
4290
|
* @implements {shaka.extern.TextParser}
|
|
@@ -4328,7 +4358,7 @@ shaka.text.SrtTextParser = class {
|
|
|
4328
4358
|
/**
|
|
4329
4359
|
* @override
|
|
4330
4360
|
*/
|
|
4331
|
-
parseMedia(data, time) {}
|
|
4361
|
+
parseMedia(data, time, uri) {}
|
|
4332
4362
|
/**
|
|
4333
4363
|
* Convert a SRT format to WebVTT
|
|
4334
4364
|
* @param {string} data
|
|
@@ -4426,6 +4456,7 @@ shaka.ui.AdPosition = class extends shaka.ui.Element {
|
|
|
4426
4456
|
};
|
|
4427
4457
|
/**
|
|
4428
4458
|
* @extends {shaka.ui.Element}
|
|
4459
|
+
* @implements {shaka.extern.IUIPlayButton}
|
|
4429
4460
|
*/
|
|
4430
4461
|
shaka.ui.PlayButton = class extends shaka.ui.Element {
|
|
4431
4462
|
/**
|