shaka-player 3.3.1 → 3.3.2
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 +4 -4
- 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 +17 -12
- package/dist/shaka-player.compiled.debug.js +93 -90
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +17 -12
- package/dist/shaka-player.compiled.js +687 -686
- 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 +107 -105
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +19 -23
- package/dist/shaka-player.ui.js +952 -952
- 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/quality_observer.js +17 -34
- 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 +32 -10
- 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/quality_observer_unit.js +4 -1
- 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
|
@@ -2136,17 +2136,9 @@ declare namespace shaka.ui {
|
|
|
2136
2136
|
* If a string is not available, it will return the localized
|
|
2137
2137
|
* form in the closest related locale.
|
|
2138
2138
|
*/
|
|
2139
|
-
class Localization
|
|
2139
|
+
class Localization extends shaka.util.FakeEventTarget {
|
|
2140
2140
|
private noStructuralTyping_shaka_ui_Localization : any;
|
|
2141
|
-
/**
|
|
2142
|
-
* Localization system provided by the shaka ui library.
|
|
2143
|
-
* It can be used to store the various localized forms of
|
|
2144
|
-
* strings that are expected to be displayed to the user.
|
|
2145
|
-
* If a string is not available, it will return the localized
|
|
2146
|
-
* form in the closest related locale.
|
|
2147
|
-
*/
|
|
2148
2141
|
constructor (fallbackLocale : string ) ;
|
|
2149
|
-
addEventListener (type : any , listener : any , options : any ) : any ;
|
|
2150
2142
|
/**
|
|
2151
2143
|
* Request the localization system to change which locale it serves. If any of
|
|
2152
2144
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -2155,7 +2147,6 @@ declare namespace shaka.ui {
|
|
|
2155
2147
|
* @param locales The locale codes for the requested locales in order of preference.
|
|
2156
2148
|
*/
|
|
2157
2149
|
changeLocale (locales : Iterable < string > ) : any ;
|
|
2158
|
-
dispatchEvent (event : any ) : any ;
|
|
2159
2150
|
/**
|
|
2160
2151
|
* Insert a set of localizations for a single locale. This will amend the
|
|
2161
2152
|
* existing localizations for the given locale.
|
|
@@ -2164,7 +2155,7 @@ declare namespace shaka.ui {
|
|
|
2164
2155
|
* @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.
|
|
2165
2156
|
*/
|
|
2166
2157
|
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ;
|
|
2167
|
-
|
|
2158
|
+
release ( ) : any ;
|
|
2168
2159
|
/**
|
|
2169
2160
|
* Request the localized string under the given id. If there is no localized
|
|
2170
2161
|
* version of the string, then the fallback localization will be given
|
|
@@ -2869,7 +2860,7 @@ declare namespace shaka.util {
|
|
|
2869
2860
|
}
|
|
2870
2861
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.externs.js
|
|
2871
2862
|
declare namespace shaka.util {
|
|
2872
|
-
class FakeEventTarget implements EventTarget {
|
|
2863
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2873
2864
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2874
2865
|
/**
|
|
2875
2866
|
* Add an event listener to this object.
|
|
@@ -2889,6 +2880,7 @@ declare namespace shaka.util {
|
|
|
2889
2880
|
* @param listener The callback or listener object to invoke.
|
|
2890
2881
|
*/
|
|
2891
2882
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2883
|
+
release ( ) : any ;
|
|
2892
2884
|
/**
|
|
2893
2885
|
* Remove an event listener from this object.
|
|
2894
2886
|
* @param type The event type for which you wish to remove a listener.
|
|
@@ -2136,17 +2136,9 @@ declare namespace shaka.ui {
|
|
|
2136
2136
|
* If a string is not available, it will return the localized
|
|
2137
2137
|
* form in the closest related locale.
|
|
2138
2138
|
*/
|
|
2139
|
-
class Localization
|
|
2139
|
+
class Localization extends shaka.util.FakeEventTarget {
|
|
2140
2140
|
private noStructuralTyping_shaka_ui_Localization : any;
|
|
2141
|
-
/**
|
|
2142
|
-
* Localization system provided by the shaka ui library.
|
|
2143
|
-
* It can be used to store the various localized forms of
|
|
2144
|
-
* strings that are expected to be displayed to the user.
|
|
2145
|
-
* If a string is not available, it will return the localized
|
|
2146
|
-
* form in the closest related locale.
|
|
2147
|
-
*/
|
|
2148
2141
|
constructor (fallbackLocale : string ) ;
|
|
2149
|
-
addEventListener (type : any , listener : any , options : any ) : any ;
|
|
2150
2142
|
/**
|
|
2151
2143
|
* Request the localization system to change which locale it serves. If any of
|
|
2152
2144
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -2155,7 +2147,6 @@ declare namespace shaka.ui {
|
|
|
2155
2147
|
* @param locales The locale codes for the requested locales in order of preference.
|
|
2156
2148
|
*/
|
|
2157
2149
|
changeLocale (locales : Iterable < string > ) : any ;
|
|
2158
|
-
dispatchEvent (event : any ) : any ;
|
|
2159
2150
|
/**
|
|
2160
2151
|
* Insert a set of localizations for a single locale. This will amend the
|
|
2161
2152
|
* existing localizations for the given locale.
|
|
@@ -2164,7 +2155,7 @@ declare namespace shaka.ui {
|
|
|
2164
2155
|
* @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.
|
|
2165
2156
|
*/
|
|
2166
2157
|
insert (locale : string , localizations : Map < string , string > , conflictResolution ? : shaka.ui.Localization.ConflictResolution ) : shaka.ui.Localization ;
|
|
2167
|
-
|
|
2158
|
+
release ( ) : any ;
|
|
2168
2159
|
/**
|
|
2169
2160
|
* Request the localized string under the given id. If there is no localized
|
|
2170
2161
|
* version of the string, then the fallback localization will be given
|
|
@@ -2869,7 +2860,7 @@ declare namespace shaka.util {
|
|
|
2869
2860
|
}
|
|
2870
2861
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.debug.externs.js
|
|
2871
2862
|
declare namespace shaka.util {
|
|
2872
|
-
class FakeEventTarget implements EventTarget {
|
|
2863
|
+
class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
|
|
2873
2864
|
private noStructuralTyping_shaka_util_FakeEventTarget : any;
|
|
2874
2865
|
/**
|
|
2875
2866
|
* Add an event listener to this object.
|
|
@@ -2889,6 +2880,7 @@ declare namespace shaka.util {
|
|
|
2889
2880
|
* @param listener The callback or listener object to invoke.
|
|
2890
2881
|
*/
|
|
2891
2882
|
listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
|
|
2883
|
+
release ( ) : any ;
|
|
2892
2884
|
/**
|
|
2893
2885
|
* Remove an event listener from this object.
|
|
2894
2886
|
* @param type The event type for which you wish to remove a listener.
|
|
@@ -50,11 +50,24 @@ shaka.util.FakeEvent = class {
|
|
|
50
50
|
*/
|
|
51
51
|
constructor(type, dict) {}
|
|
52
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* An interface to standardize how objects release internal references
|
|
55
|
+
* synchronously. If an object needs to asynchronously release references, then
|
|
56
|
+
* it should use 'shaka.util.IDestroyable'.
|
|
57
|
+
* @interface
|
|
58
|
+
*/
|
|
59
|
+
shaka.util.IReleasable = class {
|
|
60
|
+
/**
|
|
61
|
+
* Request that this object release all internal references.
|
|
62
|
+
*/
|
|
63
|
+
release() {}
|
|
64
|
+
};
|
|
53
65
|
/**
|
|
54
66
|
* @summary A work-alike for EventTarget. Only DOM elements may be true
|
|
55
67
|
* EventTargets, but this can be used as a base class to provide event dispatch
|
|
56
68
|
* to non-DOM classes. Only FakeEvents should be dispatched.
|
|
57
69
|
* @implements {EventTarget}
|
|
70
|
+
* @implements {shaka.util.IReleasable}
|
|
58
71
|
*/
|
|
59
72
|
shaka.util.FakeEventTarget = class {
|
|
60
73
|
/** */
|
|
@@ -92,6 +105,10 @@ shaka.util.FakeEventTarget = class {
|
|
|
92
105
|
* @override
|
|
93
106
|
*/
|
|
94
107
|
dispatchEvent(event) {}
|
|
108
|
+
/**
|
|
109
|
+
* @override
|
|
110
|
+
*/
|
|
111
|
+
release() {}
|
|
95
112
|
};
|
|
96
113
|
/**
|
|
97
114
|
* These are the listener types defined in the closure extern for EventTarget.
|
|
@@ -445,10 +462,9 @@ shaka.util.LanguageUtils = class {
|
|
|
445
462
|
* strings that are expected to be displayed to the user.
|
|
446
463
|
* If a string is not available, it will return the localized
|
|
447
464
|
* form in the closest related locale.
|
|
448
|
-
* @implements {EventTarget}
|
|
449
465
|
* @final
|
|
450
466
|
*/
|
|
451
|
-
shaka.ui.Localization = class {
|
|
467
|
+
shaka.ui.Localization = class extends shaka.util.FakeEventTarget {
|
|
452
468
|
/**
|
|
453
469
|
* @param {string} fallbackLocale
|
|
454
470
|
* The fallback locale that should be used. It will be assumed that this
|
|
@@ -458,15 +474,7 @@ shaka.ui.Localization = class {
|
|
|
458
474
|
/**
|
|
459
475
|
* @override
|
|
460
476
|
*/
|
|
461
|
-
|
|
462
|
-
/**
|
|
463
|
-
* @override
|
|
464
|
-
*/
|
|
465
|
-
removeEventListener(type, listener, options) {}
|
|
466
|
-
/**
|
|
467
|
-
* @override
|
|
468
|
-
*/
|
|
469
|
-
dispatchEvent(event) {}
|
|
477
|
+
release() {}
|
|
470
478
|
/**
|
|
471
479
|
* Request the localization system to change which locale it serves. If any of
|
|
472
480
|
* of the preferred locales cannot be found, the localization system will fire
|
|
@@ -1460,18 +1468,6 @@ shaka.net.NetworkingEngine.OnHeadersReceived;
|
|
|
1460
1468
|
* reason (e.g. even if the download was aborted).
|
|
1461
1469
|
*/
|
|
1462
1470
|
shaka.net.NetworkingEngine.OnDownloadFailed;
|
|
1463
|
-
/**
|
|
1464
|
-
* An interface to standardize how objects release internal references
|
|
1465
|
-
* synchronously. If an object needs to asynchronously release references, then
|
|
1466
|
-
* it should use 'shaka.util.IDestroyable'.
|
|
1467
|
-
* @interface
|
|
1468
|
-
*/
|
|
1469
|
-
shaka.util.IReleasable = class {
|
|
1470
|
-
/**
|
|
1471
|
-
* Request that this object release all internal references.
|
|
1472
|
-
*/
|
|
1473
|
-
release() {}
|
|
1474
|
-
};
|
|
1475
1471
|
/**
|
|
1476
1472
|
* @summary
|
|
1477
1473
|
* An EventManager maintains a collection of "event
|