shaka-player 3.2.3 → 3.2.4
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 +30 -30
- 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 +17 -12
- package/dist/shaka-player.compiled.debug.js +95 -93
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +17 -12
- package/dist/shaka-player.compiled.js +610 -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 +109 -108
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +19 -23
- package/dist/shaka-player.ui.js +774 -773
- package/dist/shaka-player.ui.map +3 -3
- 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 +8 -9
- 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
|
@@ -2099,17 +2099,9 @@ declare namespace shaka.ui {
|
|
|
2099
2099
|
* If a string is not available, it will return the localized
|
|
2100
2100
|
* form in the closest related locale.
|
|
2101
2101
|
*/
|
|
2102
|
-
class Localization
|
|
2102
|
+
class Localization extends shaka.util.FakeEventTarget {
|
|
2103
2103
|
private noStructuralTyping_shaka_ui_Localization : any;
|
|
2104
|
-
/**
|
|
2105
|
-
* Localization system provided by the shaka ui library.
|
|
2106
|
-
* It can be used to store the various localized forms of
|
|
2107
|
-
* strings that are expected to be displayed to the user.
|
|
2108
|
-
* If a string is not available, it will return the localized
|
|
2109
|
-
* form in the closest related locale.
|
|
2110
|
-
*/
|
|
2111
2104
|
constructor (fallbackLocale : string ) ;
|
|
2112
|
-
addEventListener (type : any , listener : any , options : any ) : any ;
|
|
2113
2105
|
/**
|
|
2114
2106
|
* Request the localization system to change which locale it serves. If any of
|
|
2115
2107
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -2118,7 +2110,6 @@ declare namespace shaka.ui {
|
|
|
2118
2110
|
* @param locales The locale codes for the requested locales in order of preference.
|
|
2119
2111
|
*/
|
|
2120
2112
|
changeLocale (locales : Iterable < string > ) : any ;
|
|
2121
|
-
dispatchEvent (event : any ) : any ;
|
|
2122
2113
|
/**
|
|
2123
2114
|
* Insert a set of localizations for a single locale. This will amend the
|
|
2124
2115
|
* existing localizations for the given locale.
|
|
@@ -2127,7 +2118,7 @@ declare namespace shaka.ui {
|
|
|
2127
2118
|
* @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.
|
|
2128
2119
|
*/
|
|
2129
2120
|
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ;
|
|
2130
|
-
|
|
2121
|
+
release ( ) : any ;
|
|
2131
2122
|
/**
|
|
2132
2123
|
* Request the localized string under the given id. If there is no localized
|
|
2133
2124
|
* version of the string, then the fallback localization will be given
|
|
@@ -2807,7 +2798,7 @@ declare namespace shaka.util {
|
|
|
2807
2798
|
}
|
|
2808
2799
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.externs.js
|
|
2809
2800
|
declare namespace shaka.util {
|
|
2810
|
-
class FakeEventTarget implements EventTarget {
|
|
2801
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2811
2802
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2812
2803
|
/**
|
|
2813
2804
|
* Add an event listener to this object.
|
|
@@ -2827,6 +2818,7 @@ declare namespace shaka.util {
|
|
|
2827
2818
|
* @param listener The callback or listener object to invoke.
|
|
2828
2819
|
*/
|
|
2829
2820
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2821
|
+
release ( ) : any ;
|
|
2830
2822
|
/**
|
|
2831
2823
|
* Remove an event listener from this object.
|
|
2832
2824
|
* @param type The event type for which you wish to remove a listener.
|
|
@@ -2099,17 +2099,9 @@ declare namespace shaka.ui {
|
|
|
2099
2099
|
* If a string is not available, it will return the localized
|
|
2100
2100
|
* form in the closest related locale.
|
|
2101
2101
|
*/
|
|
2102
|
-
class Localization
|
|
2102
|
+
class Localization extends shaka.util.FakeEventTarget {
|
|
2103
2103
|
private noStructuralTyping_shaka_ui_Localization : any;
|
|
2104
|
-
/**
|
|
2105
|
-
* Localization system provided by the shaka ui library.
|
|
2106
|
-
* It can be used to store the various localized forms of
|
|
2107
|
-
* strings that are expected to be displayed to the user.
|
|
2108
|
-
* If a string is not available, it will return the localized
|
|
2109
|
-
* form in the closest related locale.
|
|
2110
|
-
*/
|
|
2111
2104
|
constructor (fallbackLocale : string ) ;
|
|
2112
|
-
addEventListener (type : any , listener : any , options : any ) : any ;
|
|
2113
2105
|
/**
|
|
2114
2106
|
* Request the localization system to change which locale it serves. If any of
|
|
2115
2107
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -2118,7 +2110,6 @@ declare namespace shaka.ui {
|
|
|
2118
2110
|
* @param locales The locale codes for the requested locales in order of preference.
|
|
2119
2111
|
*/
|
|
2120
2112
|
changeLocale (locales : Iterable < string > ) : any ;
|
|
2121
|
-
dispatchEvent (event : any ) : any ;
|
|
2122
2113
|
/**
|
|
2123
2114
|
* Insert a set of localizations for a single locale. This will amend the
|
|
2124
2115
|
* existing localizations for the given locale.
|
|
@@ -2127,7 +2118,7 @@ declare namespace shaka.ui {
|
|
|
2127
2118
|
* @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.
|
|
2128
2119
|
*/
|
|
2129
2120
|
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ;
|
|
2130
|
-
|
|
2121
|
+
release ( ) : any ;
|
|
2131
2122
|
/**
|
|
2132
2123
|
* Request the localized string under the given id. If there is no localized
|
|
2133
2124
|
* version of the string, then the fallback localization will be given
|
|
@@ -2807,7 +2798,7 @@ declare namespace shaka.util {
|
|
|
2807
2798
|
}
|
|
2808
2799
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.debug.externs.js
|
|
2809
2800
|
declare namespace shaka.util {
|
|
2810
|
-
class FakeEventTarget implements EventTarget {
|
|
2801
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2811
2802
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2812
2803
|
/**
|
|
2813
2804
|
* Add an event listener to this object.
|
|
@@ -2827,6 +2818,7 @@ declare namespace shaka.util {
|
|
|
2827
2818
|
* @param listener The callback or listener object to invoke.
|
|
2828
2819
|
*/
|
|
2829
2820
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2821
|
+
release ( ) : any ;
|
|
2830
2822
|
/**
|
|
2831
2823
|
* Remove an event listener from this object.
|
|
2832
2824
|
* @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.
|
|
@@ -299,10 +316,9 @@ shaka.util.Error.Code = {
|
|
|
299
316
|
* strings that are expected to be displayed to the user.
|
|
300
317
|
* If a string is not available, it will return the localized
|
|
301
318
|
* form in the closest related locale.
|
|
302
|
-
* @implements {EventTarget}
|
|
303
319
|
* @final
|
|
304
320
|
*/
|
|
305
|
-
shaka.ui.Localization = class {
|
|
321
|
+
shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
|
|
306
322
|
/**
|
|
307
323
|
* @param {string} fallbackLocale
|
|
308
324
|
* The fallback locale that should be used. It will be assumed that this
|
|
@@ -312,15 +328,7 @@ shaka.ui.Localization = class {
|
|
|
312
328
|
/**
|
|
313
329
|
* @override
|
|
314
330
|
*/
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* @override
|
|
318
|
-
*/
|
|
319
|
-
removeEventListener(type, listener, options) {}
|
|
320
|
-
/**
|
|
321
|
-
* @override
|
|
322
|
-
*/
|
|
323
|
-
dispatchEvent(event) {}
|
|
331
|
+
release() {}
|
|
324
332
|
/**
|
|
325
333
|
* Request the localization system to change which locale it serves. If any of
|
|
326
334
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -1281,18 +1289,6 @@ shaka.net.NetworkingEngine.PluginPriority = {
|
|
|
1281
1289
|
'PREFERRED': 2,
|
|
1282
1290
|
'APPLICATION': 3
|
|
1283
1291
|
};
|
|
1284
|
-
/**
|
|
1285
|
-
* An interface to standardize how objects release internal references
|
|
1286
|
-
* synchronously. If an object needs to asynchronously release references, then
|
|
1287
|
-
* it should use 'shaka.util.IDestroyable'.
|
|
1288
|
-
* @interface
|
|
1289
|
-
*/
|
|
1290
|
-
shaka.util.IReleasable = class {
|
|
1291
|
-
/**
|
|
1292
|
-
* Request that this object release all internal references.
|
|
1293
|
-
*/
|
|
1294
|
-
release() {}
|
|
1295
|
-
};
|
|
1296
1292
|
/**
|
|
1297
1293
|
* @summary
|
|
1298
1294
|
* An EventManager maintains a collection of "event
|