shaka-player 4.7.11 → 4.7.13
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/README.md +2 -4
- package/dist/deps.js +6 -7
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.d.ts +14 -12
- package/dist/shaka-player.compiled.debug.d.ts +14 -12
- package/dist/shaka-player.compiled.debug.externs.js +78 -64
- package/dist/shaka-player.compiled.debug.js +321 -312
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +78 -64
- package/dist/shaka-player.compiled.js +1167 -1153
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +14 -12
- package/dist/shaka-player.ui.debug.d.ts +14 -12
- package/dist/shaka-player.ui.debug.externs.js +78 -64
- package/dist/shaka-player.ui.debug.js +443 -434
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +78 -64
- package/dist/shaka-player.ui.js +1319 -1305
- package/dist/shaka-player.ui.map +4 -4
- package/externs/shaka/manifest.js +11 -1
- package/externs/shaka/offline.js +7 -1
- package/externs/shaka/player.js +32 -19
- package/lib/abr/simple_abr_manager.js +21 -26
- package/lib/cast/cast_proxy.js +1 -3
- package/lib/cast/cast_sender.js +8 -11
- package/lib/cea/cea608_memory.js +1 -1
- package/lib/cea/ts_cea_parser.js +10 -1
- package/lib/dash/dash_parser.js +13 -3
- package/lib/dash/segment_base.js +8 -1
- package/lib/dash/segment_list.js +24 -18
- package/lib/dash/segment_template.js +21 -2
- package/lib/hls/hls_parser.js +36 -17
- package/lib/media/drm_engine.js +6 -3
- package/lib/media/media_source_engine.js +96 -33
- package/lib/media/playhead.js +3 -3
- package/lib/media/presentation_timeline.js +23 -0
- package/lib/media/segment_index.js +21 -20
- package/lib/media/segment_utils.js +10 -1
- package/lib/media/streaming_engine.js +2 -14
- package/lib/mss/mss_parser.js +4 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +2 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +2 -0
- package/lib/offline/manifest_converter.js +10 -3
- package/lib/offline/storage.js +2 -0
- package/lib/player.js +30 -4
- package/lib/polyfill/media_capabilities.js +20 -1
- package/lib/polyfill/mediasource.js +37 -14
- package/lib/text/vtt_text_parser.js +51 -51
- package/lib/transmuxer/h264.js +3 -3
- package/lib/transmuxer/h265.js +3 -3
- package/lib/transmuxer/ts_transmuxer.js +42 -3
- package/lib/util/manifest_parser_utils.js +1 -0
- package/lib/util/mime_utils.js +10 -5
- package/lib/util/mp4_parser.js +57 -0
- package/lib/util/periods.js +5 -37
- package/lib/util/platform.js +4 -0
- package/lib/util/stream_utils.js +334 -271
- package/lib/util/ts_parser.js +99 -10
- package/package.json +1 -1
- package/lib/polyfill/storage_estimate.js +0 -57
|
@@ -595,6 +595,59 @@ shaka.ui.Localization.LOCALE_CHANGED;
|
|
|
595
595
|
* @const {string}
|
|
596
596
|
*/
|
|
597
597
|
shaka.ui.Localization.LOCALE_UPDATED;
|
|
598
|
+
/**
|
|
599
|
+
* @summary
|
|
600
|
+
* An EventManager maintains a collection of "event
|
|
601
|
+
* bindings" between event targets and event listeners.
|
|
602
|
+
* @implements {shaka.util.IReleasable}
|
|
603
|
+
*/
|
|
604
|
+
shaka.util.EventManager = class {
|
|
605
|
+
/** */
|
|
606
|
+
constructor() {}
|
|
607
|
+
/**
|
|
608
|
+
* Detaches all event listeners.
|
|
609
|
+
* @override
|
|
610
|
+
*/
|
|
611
|
+
release() {}
|
|
612
|
+
/**
|
|
613
|
+
* Attaches an event listener to an event target.
|
|
614
|
+
* @param {EventTarget} target The event target.
|
|
615
|
+
* @param {string} type The event type.
|
|
616
|
+
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
617
|
+
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
618
|
+
* specifies characteristics about the event listener.
|
|
619
|
+
* The passive option, if true, indicates that this function will never
|
|
620
|
+
* call preventDefault(), which improves scrolling performance.
|
|
621
|
+
*/
|
|
622
|
+
listen(target, type, listener, options) {}
|
|
623
|
+
/**
|
|
624
|
+
* Attaches an event listener to an event target. The listener will be
|
|
625
|
+
* removed when the first instance of the event is fired.
|
|
626
|
+
* @param {EventTarget} target The event target.
|
|
627
|
+
* @param {string} type The event type.
|
|
628
|
+
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
629
|
+
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
630
|
+
* specifies characteristics about the event listener.
|
|
631
|
+
* The passive option, if true, indicates that this function will never
|
|
632
|
+
* call preventDefault(), which improves scrolling performance.
|
|
633
|
+
*/
|
|
634
|
+
listenOnce(target, type, listener, options) {}
|
|
635
|
+
/**
|
|
636
|
+
* Detaches an event listener from an event target.
|
|
637
|
+
* @param {EventTarget} target The event target.
|
|
638
|
+
* @param {string} type The event type.
|
|
639
|
+
* @param {shaka.util.EventManager.ListenerType=} listener The event listener.
|
|
640
|
+
*/
|
|
641
|
+
unlisten(target, type, listener) {}
|
|
642
|
+
/**
|
|
643
|
+
* Detaches all event listeners from all targets.
|
|
644
|
+
*/
|
|
645
|
+
removeAll() {}
|
|
646
|
+
};
|
|
647
|
+
/**
|
|
648
|
+
* @typedef {function(!Event)}
|
|
649
|
+
*/
|
|
650
|
+
shaka.util.EventManager.ListenerType;
|
|
598
651
|
/**
|
|
599
652
|
* @summary A set of BufferSource utility functions.
|
|
600
653
|
*/
|
|
@@ -1691,59 +1744,6 @@ shaka.net.NetworkingEngine.OnRequest;
|
|
|
1691
1744
|
* new URI and the second string is the old URI.
|
|
1692
1745
|
*/
|
|
1693
1746
|
shaka.net.NetworkingEngine.OnRetry;
|
|
1694
|
-
/**
|
|
1695
|
-
* @summary
|
|
1696
|
-
* An EventManager maintains a collection of "event
|
|
1697
|
-
* bindings" between event targets and event listeners.
|
|
1698
|
-
* @implements {shaka.util.IReleasable}
|
|
1699
|
-
*/
|
|
1700
|
-
shaka.util.EventManager = class {
|
|
1701
|
-
/** */
|
|
1702
|
-
constructor() {}
|
|
1703
|
-
/**
|
|
1704
|
-
* Detaches all event listeners.
|
|
1705
|
-
* @override
|
|
1706
|
-
*/
|
|
1707
|
-
release() {}
|
|
1708
|
-
/**
|
|
1709
|
-
* Attaches an event listener to an event target.
|
|
1710
|
-
* @param {EventTarget} target The event target.
|
|
1711
|
-
* @param {string} type The event type.
|
|
1712
|
-
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
1713
|
-
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
1714
|
-
* specifies characteristics about the event listener.
|
|
1715
|
-
* The passive option, if true, indicates that this function will never
|
|
1716
|
-
* call preventDefault(), which improves scrolling performance.
|
|
1717
|
-
*/
|
|
1718
|
-
listen(target, type, listener, options) {}
|
|
1719
|
-
/**
|
|
1720
|
-
* Attaches an event listener to an event target. The listener will be
|
|
1721
|
-
* removed when the first instance of the event is fired.
|
|
1722
|
-
* @param {EventTarget} target The event target.
|
|
1723
|
-
* @param {string} type The event type.
|
|
1724
|
-
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
1725
|
-
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
1726
|
-
* specifies characteristics about the event listener.
|
|
1727
|
-
* The passive option, if true, indicates that this function will never
|
|
1728
|
-
* call preventDefault(), which improves scrolling performance.
|
|
1729
|
-
*/
|
|
1730
|
-
listenOnce(target, type, listener, options) {}
|
|
1731
|
-
/**
|
|
1732
|
-
* Detaches an event listener from an event target.
|
|
1733
|
-
* @param {EventTarget} target The event target.
|
|
1734
|
-
* @param {string} type The event type.
|
|
1735
|
-
* @param {shaka.util.EventManager.ListenerType=} listener The event listener.
|
|
1736
|
-
*/
|
|
1737
|
-
unlisten(target, type, listener) {}
|
|
1738
|
-
/**
|
|
1739
|
-
* Detaches all event listeners from all targets.
|
|
1740
|
-
*/
|
|
1741
|
-
removeAll() {}
|
|
1742
|
-
};
|
|
1743
|
-
/**
|
|
1744
|
-
* @typedef {function(!Event)}
|
|
1745
|
-
*/
|
|
1746
|
-
shaka.util.EventManager.ListenerType;
|
|
1747
1747
|
/**
|
|
1748
1748
|
* @namespace shaka.util.StringUtils
|
|
1749
1749
|
* @summary A set of string utility functions.
|
|
@@ -1944,6 +1944,14 @@ shaka.util.Mp4Parser = class {
|
|
|
1944
1944
|
* @param {!shaka.extern.ParsedBox} box
|
|
1945
1945
|
*/
|
|
1946
1946
|
static visualSampleEntry(box) {}
|
|
1947
|
+
/**
|
|
1948
|
+
* A callback that tells the Mp4 parser to treat the body of a box as a audio
|
|
1949
|
+
* sample entry. A audio sample entry has some fixed-sized fields
|
|
1950
|
+
* describing the audio codec parameters, followed by an arbitrary number of
|
|
1951
|
+
* appended children. Each child is a box.
|
|
1952
|
+
* @param {!shaka.extern.ParsedBox} box
|
|
1953
|
+
*/
|
|
1954
|
+
static audioSampleEntry(box) {}
|
|
1947
1955
|
/**
|
|
1948
1956
|
* Create a callback that tells the Mp4 parser to treat the body of a box as a
|
|
1949
1957
|
* binary blob and to parse the body's contents using the provided callback.
|
|
@@ -2542,6 +2550,15 @@ shaka.media.PresentationTimeline = class {
|
|
|
2542
2550
|
* @return {boolean}
|
|
2543
2551
|
*/
|
|
2544
2552
|
isStartTimeLocked() {}
|
|
2553
|
+
/**
|
|
2554
|
+
* Sets the initial program date time.
|
|
2555
|
+
* @param {number} initialProgramDateTime
|
|
2556
|
+
*/
|
|
2557
|
+
setInitialProgramDateTime(initialProgramDateTime) {}
|
|
2558
|
+
/**
|
|
2559
|
+
* @return {?number} The initial program date time in seconds.
|
|
2560
|
+
*/
|
|
2561
|
+
getInitialProgramDateTime() {}
|
|
2545
2562
|
/**
|
|
2546
2563
|
* Gives PresentationTimeline a Stream's minimum segment start time.
|
|
2547
2564
|
* @param {number} startTime
|
|
@@ -4993,6 +5010,14 @@ shaka.polyfill.MediaCapabilities.originalMcap;
|
|
|
4993
5010
|
*/
|
|
4994
5011
|
shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_ = {
|
|
4995
5012
|
|
|
5013
|
+
};
|
|
5014
|
+
/**
|
|
5015
|
+
* A cache that stores the canDisplayType result of calling
|
|
5016
|
+
* `cast.__platform__.canDisplayType`.
|
|
5017
|
+
* @type {(Object<(!string), (!boolean)>)}
|
|
5018
|
+
*/
|
|
5019
|
+
shaka.polyfill.MediaCapabilities.memoizedCanDisplayTypeRequests_ = {
|
|
5020
|
+
|
|
4996
5021
|
};
|
|
4997
5022
|
/**
|
|
4998
5023
|
* @summary A polyfill to patch MSE bugs.
|
|
@@ -5071,17 +5096,6 @@ shaka.polyfill.RandomUUID = class {
|
|
|
5071
5096
|
*/
|
|
5072
5097
|
static install() {}
|
|
5073
5098
|
};
|
|
5074
|
-
/**
|
|
5075
|
-
* @summary A polyfill to provide navigator.storage.estimate in old
|
|
5076
|
-
* webkit browsers.
|
|
5077
|
-
* See: https://developers.google.com/web/updates/2017/08/estimating-available-storage-space#the-present
|
|
5078
|
-
*/
|
|
5079
|
-
shaka.polyfill.StorageEstimate = class {
|
|
5080
|
-
/**
|
|
5081
|
-
* Install the polyfill if needed.
|
|
5082
|
-
*/
|
|
5083
|
-
static install() {}
|
|
5084
|
-
};
|
|
5085
5099
|
/**
|
|
5086
5100
|
* @summary A polyfill to provide Symbol.prototype.description in all browsers.
|
|
5087
5101
|
* See: https://caniuse.com/mdn-javascript_builtins_symbol_description
|