shaka-player 3.1.5 → 3.1.6
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/workflows/build_and_test.yaml +73 -0
- package/.github/workflows/release.yaml +53 -0
- package/CHANGELOG.md +13 -1
- package/build/checkversion.py +1 -1
- package/build/test.py +6 -0
- package/dist/controls.css +1 -1
- package/dist/deps.js +3 -3
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.d.ts +2 -1
- package/dist/shaka-player.compiled.debug.d.ts +2 -1
- package/dist/shaka-player.compiled.debug.externs.js +5 -0
- package/dist/shaka-player.compiled.debug.js +200 -198
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +5 -0
- package/dist/shaka-player.compiled.js +609 -608
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +4 -12
- package/dist/shaka-player.ui.debug.d.ts +4 -12
- package/dist/shaka-player.ui.debug.externs.js +19 -23
- package/dist/shaka-player.ui.debug.js +77 -76
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +19 -23
- package/dist/shaka-player.ui.js +901 -901
- package/dist/shaka-player.ui.map +2 -2
- package/karma.conf.js +19 -15
- package/lib/ads/ad_manager.js +1 -0
- package/lib/cast/cast_proxy.js +3 -0
- package/lib/cast/cast_receiver.js +3 -0
- package/lib/dash/dash_parser.js +31 -19
- package/lib/hls/manifest_text_parser.js +1 -0
- package/lib/media/region_observer.js +39 -33
- package/lib/media/region_timeline.js +17 -19
- package/lib/media/streaming_engine.js +1 -1
- package/lib/net/networking_engine.js +4 -0
- package/lib/offline/storage.js +10 -11
- package/lib/player.js +25 -9
- package/lib/util/fake_event_target.js +21 -1
- package/package.json +3 -6
- package/test/dash/dash_parser_live_unit.js +43 -0
- package/test/dash/dash_parser_manifest_unit.js +2 -1
- package/test/hls/hls_parser_unit.js +74 -0
- package/test/media/region_observer_unit.js +40 -5
- package/test/media/region_timeline_unit.js +40 -22
- package/test/test/util/util.js +10 -7
- package/test/ui/text_displayer_layout_unit.js +8 -7
- package/ui/controls.js +3 -0
- package/ui/localization.js +12 -36
|
@@ -2056,17 +2056,9 @@ declare namespace shaka.ui {
|
|
|
2056
2056
|
* If a string is not available, it will return the localized
|
|
2057
2057
|
* form in the closest related locale.
|
|
2058
2058
|
*/
|
|
2059
|
-
class Localization
|
|
2059
|
+
class Localization extends shaka.util.FakeEventTarget {
|
|
2060
2060
|
private noStructuralTyping_shaka_ui_Localization : any;
|
|
2061
|
-
/**
|
|
2062
|
-
* Localization system provided by the shaka ui library.
|
|
2063
|
-
* It can be used to store the various localized forms of
|
|
2064
|
-
* strings that are expected to be displayed to the user.
|
|
2065
|
-
* If a string is not available, it will return the localized
|
|
2066
|
-
* form in the closest related locale.
|
|
2067
|
-
*/
|
|
2068
2061
|
constructor (fallbackLocale : string ) ;
|
|
2069
|
-
addEventListener (type : any , listener : any , options : any ) : any ;
|
|
2070
2062
|
/**
|
|
2071
2063
|
* Request the localization system to change which locale it serves. If any of
|
|
2072
2064
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -2075,7 +2067,6 @@ declare namespace shaka.ui {
|
|
|
2075
2067
|
* @param locales The locale codes for the requested locales in order of preference.
|
|
2076
2068
|
*/
|
|
2077
2069
|
changeLocale (locales : Iterable < string > ) : any ;
|
|
2078
|
-
dispatchEvent (event : any ) : any ;
|
|
2079
2070
|
/**
|
|
2080
2071
|
* Insert a set of localizations for a single locale. This will amend the
|
|
2081
2072
|
* existing localizations for the given locale.
|
|
@@ -2084,7 +2075,7 @@ declare namespace shaka.ui {
|
|
|
2084
2075
|
* @param conflictResolution The strategy used to resolve conflicts when the id of an existing entry matches the id of a new entry. Default to |USE_NEW|, where the new entry will replace the old entry.
|
|
2085
2076
|
*/
|
|
2086
2077
|
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ;
|
|
2087
|
-
|
|
2078
|
+
release ( ) : any ;
|
|
2088
2079
|
/**
|
|
2089
2080
|
* Request the localized string under the given id. If there is no localized
|
|
2090
2081
|
* version of the string, then the fallback localization will be given
|
|
@@ -2763,7 +2754,7 @@ declare namespace shaka.util {
|
|
|
2763
2754
|
}
|
|
2764
2755
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.externs.js
|
|
2765
2756
|
declare namespace shaka.util {
|
|
2766
|
-
class FakeEventTarget implements EventTarget {
|
|
2757
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2767
2758
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2768
2759
|
/**
|
|
2769
2760
|
* Add an event listener to this object.
|
|
@@ -2783,6 +2774,7 @@ declare namespace shaka.util {
|
|
|
2783
2774
|
* @param listener The callback or listener object to invoke.
|
|
2784
2775
|
*/
|
|
2785
2776
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2777
|
+
release ( ) : any ;
|
|
2786
2778
|
/**
|
|
2787
2779
|
* Remove an event listener from this object.
|
|
2788
2780
|
* @param type The event type for which you wish to remove a listener.
|
|
@@ -2056,17 +2056,9 @@ declare namespace shaka.ui {
|
|
|
2056
2056
|
* If a string is not available, it will return the localized
|
|
2057
2057
|
* form in the closest related locale.
|
|
2058
2058
|
*/
|
|
2059
|
-
class Localization
|
|
2059
|
+
class Localization extends shaka.util.FakeEventTarget {
|
|
2060
2060
|
private noStructuralTyping_shaka_ui_Localization : any;
|
|
2061
|
-
/**
|
|
2062
|
-
* Localization system provided by the shaka ui library.
|
|
2063
|
-
* It can be used to store the various localized forms of
|
|
2064
|
-
* strings that are expected to be displayed to the user.
|
|
2065
|
-
* If a string is not available, it will return the localized
|
|
2066
|
-
* form in the closest related locale.
|
|
2067
|
-
*/
|
|
2068
2061
|
constructor (fallbackLocale : string ) ;
|
|
2069
|
-
addEventListener (type : any , listener : any , options : any ) : any ;
|
|
2070
2062
|
/**
|
|
2071
2063
|
* Request the localization system to change which locale it serves. If any of
|
|
2072
2064
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -2075,7 +2067,6 @@ declare namespace shaka.ui {
|
|
|
2075
2067
|
* @param locales The locale codes for the requested locales in order of preference.
|
|
2076
2068
|
*/
|
|
2077
2069
|
changeLocale (locales : Iterable < string > ) : any ;
|
|
2078
|
-
dispatchEvent (event : any ) : any ;
|
|
2079
2070
|
/**
|
|
2080
2071
|
* Insert a set of localizations for a single locale. This will amend the
|
|
2081
2072
|
* existing localizations for the given locale.
|
|
@@ -2084,7 +2075,7 @@ declare namespace shaka.ui {
|
|
|
2084
2075
|
* @param conflictResolution The strategy used to resolve conflicts when the id of an existing entry matches the id of a new entry. Default to |USE_NEW|, where the new entry will replace the old entry.
|
|
2085
2076
|
*/
|
|
2086
2077
|
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ;
|
|
2087
|
-
|
|
2078
|
+
release ( ) : any ;
|
|
2088
2079
|
/**
|
|
2089
2080
|
* Request the localized string under the given id. If there is no localized
|
|
2090
2081
|
* version of the string, then the fallback localization will be given
|
|
@@ -2763,7 +2754,7 @@ declare namespace shaka.util {
|
|
|
2763
2754
|
}
|
|
2764
2755
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.debug.externs.js
|
|
2765
2756
|
declare namespace shaka.util {
|
|
2766
|
-
class FakeEventTarget implements EventTarget {
|
|
2757
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2767
2758
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2768
2759
|
/**
|
|
2769
2760
|
* Add an event listener to this object.
|
|
@@ -2783,6 +2774,7 @@ declare namespace shaka.util {
|
|
|
2783
2774
|
* @param listener The callback or listener object to invoke.
|
|
2784
2775
|
*/
|
|
2785
2776
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2777
|
+
release ( ) : any ;
|
|
2786
2778
|
/**
|
|
2787
2779
|
* Remove an event listener from this object.
|
|
2788
2780
|
* @param type The event type for which you wish to remove a listener.
|
|
@@ -48,11 +48,24 @@ shaka.util.FakeEvent = class {
|
|
|
48
48
|
*/
|
|
49
49
|
constructor(type, dict) {}
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* An interface to standardize how objects release internal references
|
|
53
|
+
* synchronously. If an object needs to asynchronously release references, then
|
|
54
|
+
* it should use 'shaka.util.IDestroyable'.
|
|
55
|
+
* @interface
|
|
56
|
+
*/
|
|
57
|
+
shaka.util.IReleasable = class {
|
|
58
|
+
/**
|
|
59
|
+
* Request that this object release all internal references.
|
|
60
|
+
*/
|
|
61
|
+
release() {}
|
|
62
|
+
};
|
|
51
63
|
/**
|
|
52
64
|
* @summary A work-alike for EventTarget. Only DOM elements may be true
|
|
53
65
|
* EventTargets, but this can be used as a base class to provide event dispatch
|
|
54
66
|
* to non-DOM classes. Only FakeEvents should be dispatched.
|
|
55
67
|
* @implements {EventTarget}
|
|
68
|
+
* @implements {shaka.util.IReleasable}
|
|
56
69
|
*/
|
|
57
70
|
shaka.util.FakeEventTarget = class {
|
|
58
71
|
/** */
|
|
@@ -90,6 +103,10 @@ shaka.util.FakeEventTarget = class {
|
|
|
90
103
|
* @override
|
|
91
104
|
*/
|
|
92
105
|
dispatchEvent(event) {}
|
|
106
|
+
/**
|
|
107
|
+
* @override
|
|
108
|
+
*/
|
|
109
|
+
release() {}
|
|
93
110
|
};
|
|
94
111
|
/**
|
|
95
112
|
* These are the listener types defined in the closure extern for EventTarget.
|
|
@@ -298,10 +315,9 @@ shaka.util.Error.Code = {
|
|
|
298
315
|
* strings that are expected to be displayed to the user.
|
|
299
316
|
* If a string is not available, it will return the localized
|
|
300
317
|
* form in the closest related locale.
|
|
301
|
-
* @implements {EventTarget}
|
|
302
318
|
* @final
|
|
303
319
|
*/
|
|
304
|
-
shaka.ui.Localization = class {
|
|
320
|
+
shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
|
|
305
321
|
/**
|
|
306
322
|
* @param {string} fallbackLocale
|
|
307
323
|
* The fallback locale that should be used. It will be assumed that this
|
|
@@ -311,15 +327,7 @@ shaka.ui.Localization = class {
|
|
|
311
327
|
/**
|
|
312
328
|
* @override
|
|
313
329
|
*/
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* @override
|
|
317
|
-
*/
|
|
318
|
-
removeEventListener(type, listener, options) {}
|
|
319
|
-
/**
|
|
320
|
-
* @override
|
|
321
|
-
*/
|
|
322
|
-
dispatchEvent(event) {}
|
|
330
|
+
release() {}
|
|
323
331
|
/**
|
|
324
332
|
* Request the localization system to change which locale it serves. If any of
|
|
325
333
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -1150,18 +1158,6 @@ shaka.text.TextEngine = class {
|
|
|
1150
1158
|
*/
|
|
1151
1159
|
destroy() {}
|
|
1152
1160
|
};
|
|
1153
|
-
/**
|
|
1154
|
-
* An interface to standardize how objects release internal references
|
|
1155
|
-
* synchronously. If an object needs to asynchronously release references, then
|
|
1156
|
-
* it should use 'shaka.util.IDestroyable'.
|
|
1157
|
-
* @interface
|
|
1158
|
-
*/
|
|
1159
|
-
shaka.util.IReleasable = class {
|
|
1160
|
-
/**
|
|
1161
|
-
* Request that this object release all internal references.
|
|
1162
|
-
*/
|
|
1163
|
-
release() {}
|
|
1164
|
-
};
|
|
1165
1161
|
/**
|
|
1166
1162
|
* @summary
|
|
1167
1163
|
* An EventManager maintains a collection of "event
|