shaka-player 3.2.2 → 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/ISSUE_TEMPLATE/bug_report.md +1 -1
- package/.github/ISSUE_TEMPLATE/feature_request.md +1 -1
- package/.github/ISSUE_TEMPLATE/question.md +1 -1
- package/.github/workflows/build_and_test.yaml +73 -0
- package/.github/workflows/release.yaml +53 -0
- package/AUTHORS +6 -5
- package/CHANGELOG.md +314 -1
- package/CONTRIBUTORS +4 -2
- package/build/checkversion.py +1 -1
- package/build/conformance.textproto +183 -169
- package/build/test.py +6 -0
- package/build/types/core +3 -0
- package/build/types/offline +1 -0
- package/build/types/polyfill +1 -0
- package/build/types/ui +2 -0
- package/demo/common/assets.js +18 -0
- package/demo/common/message_ids.js +13 -1
- package/demo/config.js +31 -1
- package/demo/index.html +1 -1
- package/demo/locales/en.json +12 -0
- package/demo/locales/source.json +48 -0
- package/dist/controls.css +26 -2
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +19 -16
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +19 -16
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +21 -14
- package/dist/locales.js +31 -29
- package/dist/receiver.compiled.debug.js +11 -9
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +11 -9
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +232 -18
- package/dist/shaka-player.compiled.debug.d.ts +232 -18
- package/dist/shaka-player.compiled.debug.externs.js +293 -17
- package/dist/shaka-player.compiled.debug.js +481 -422
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +293 -17
- package/dist/shaka-player.compiled.js +846 -817
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +250 -30
- package/dist/shaka-player.ui.debug.d.ts +250 -30
- package/dist/shaka-player.ui.debug.externs.js +322 -28
- package/dist/shaka-player.ui.debug.js +630 -553
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +322 -28
- package/dist/shaka-player.ui.js +1048 -1006
- package/dist/shaka-player.ui.map +4 -4
- package/docs/design/bg-fetch-after.gv +29 -0
- package/docs/design/bg-fetch-after.gv.png +0 -0
- package/docs/design/bg-fetch-before.gv +18 -0
- package/docs/design/bg-fetch-before.gv.png +0 -0
- package/docs/design/bg-fetch.md +134 -0
- package/docs/tutorials/blob-url.md +15 -0
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/ui-customization.md +66 -0
- package/docs/tutorials/ui.md +5 -5
- package/externs/cmcd.js +186 -0
- package/externs/ima.js +3 -0
- package/externs/shaka/ads.js +5 -0
- package/externs/shaka/manifest.js +12 -1
- package/externs/shaka/manifest_parser.js +10 -1
- package/externs/shaka/net.js +20 -4
- package/externs/shaka/offline.js +31 -2
- package/externs/shaka/player.js +138 -5
- package/externs/shaka/text.js +24 -0
- package/externs/webcrypto.js +18 -0
- package/karma.conf.js +19 -15
- package/lib/abr/ewma.js +14 -0
- package/lib/abr/ewma_bandwidth_estimator.js +16 -2
- package/lib/abr/simple_abr_manager.js +6 -0
- package/lib/ads/ad_manager.js +1 -0
- package/lib/ads/client_side_ad.js +8 -0
- package/lib/ads/client_side_ad_manager.js +8 -4
- package/lib/ads/server_side_ad.js +7 -0
- package/lib/cast/cast_proxy.js +3 -0
- package/lib/cast/cast_receiver.js +3 -0
- package/lib/cast/cast_utils.js +1 -0
- package/lib/dash/dash_parser.js +79 -33
- package/lib/dash/segment_base.js +25 -1
- package/lib/dash/segment_list.js +18 -9
- package/lib/dash/segment_template.js +23 -10
- package/lib/hls/hls_parser.js +116 -23
- package/lib/hls/manifest_text_parser.js +1 -0
- package/lib/media/quality_observer.js +274 -0
- package/lib/media/region_observer.js +39 -33
- package/lib/media/region_timeline.js +17 -19
- package/lib/media/segment_index.js +8 -1
- package/lib/media/segment_reference.js +37 -4
- package/lib/media/streaming_engine.js +47 -6
- package/lib/net/http_fetch_plugin.js +31 -11
- package/lib/net/http_plugin_utils.js +1 -0
- package/lib/net/http_xhr_plugin.js +40 -14
- package/lib/net/networking_engine.js +85 -18
- package/lib/offline/download_info.js +68 -0
- package/lib/offline/download_manager.js +13 -5
- package/lib/offline/indexeddb/base_storage_cell.js +35 -0
- package/lib/offline/indexeddb/storage_mechanism.js +1 -1
- package/lib/offline/indexeddb/v5_storage_cell.js +5 -0
- package/lib/offline/storage.js +401 -293
- package/lib/offline/stored_content_utils.js +2 -0
- package/lib/player.js +254 -27
- package/lib/polyfill/media_capabilities.js +30 -15
- package/lib/polyfill/random_uuid.js +52 -0
- package/lib/text/cue.js +18 -0
- package/lib/text/ttml_text_parser.js +109 -60
- package/lib/text/ui_text_displayer.js +19 -13
- package/lib/util/cmcd_manager.js +672 -0
- package/lib/util/error.js +6 -0
- package/lib/util/fake_event_target.js +21 -1
- package/lib/util/language_utils.js +12 -0
- package/lib/util/mutex.js +52 -0
- package/lib/util/periods.js +98 -64
- package/lib/util/player_configuration.js +18 -0
- package/lib/util/stream_utils.js +86 -10
- package/lib/util/xml_utils.js +19 -0
- package/package.json +3 -6
- package/shaka-player.uncompiled.js +3 -0
- package/test/dash/dash_parser_content_protection_unit.js +2 -0
- package/test/dash/dash_parser_live_unit.js +144 -1
- package/test/dash/dash_parser_manifest_unit.js +37 -2
- package/test/dash/dash_parser_segment_base_unit.js +2 -0
- package/test/dash/dash_parser_segment_list_unit.js +2 -1
- package/test/dash/dash_parser_segment_template_unit.js +2 -1
- package/test/hls/hls_live_unit.js +2 -0
- package/test/hls/hls_parser_unit.js +76 -0
- package/test/media/drm_engine_unit.js +3 -3
- package/test/media/quality_observer_unit.js +142 -0
- package/test/media/region_observer_unit.js +40 -5
- package/test/media/region_timeline_unit.js +40 -22
- package/test/media/segment_reference_unit.js +16 -1
- package/test/media/streaming_engine_integration.js +4 -2
- package/test/media/streaming_engine_unit.js +147 -0
- package/test/net/http_plugin_unit.js +20 -15
- package/test/offline/storage_integration.js +108 -4
- package/test/player_integration.js +140 -8
- package/test/player_src_equals_integration.js +41 -8
- package/test/player_unit.js +19 -9
- package/test/test/assets/chapters.vtt +2 -2
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/util/dash_parser_util.js +4 -0
- package/test/test/util/fake_ad.js +7 -0
- package/test/test/util/fake_drm_engine.js +9 -2
- package/test/test/util/manifest_generator.js +3 -2
- package/test/test/util/test_scheme.js +14 -1
- package/test/test/util/ttml_utils.js +81 -0
- package/test/test/util/util.js +10 -7
- package/test/text/mp4_ttml_parser_unit.js +11 -18
- package/test/text/ttml_text_parser_unit.js +544 -228
- package/test/ui/text_displayer_layout_unit.js +8 -7
- package/test/ui/ui_unit.js +250 -0
- package/test/util/cmcd_manager_unit.js +291 -0
- package/test/util/stream_utils_unit.js +36 -30
- package/third_party/closure-uri/uri.js +21 -0
- package/ui/airplay_button.js +1 -0
- package/ui/audio_language_selection.js +7 -0
- package/ui/cast_button.js +1 -0
- package/ui/context_menu.js +109 -0
- package/ui/controls.js +44 -7
- package/ui/controls.less +1 -0
- package/ui/enums.js +4 -0
- package/ui/externs/ui.js +28 -1
- package/ui/fast_forward_button.js +14 -5
- package/ui/fullscreen_button.js +1 -0
- package/ui/less/buttons.less +0 -4
- package/ui/less/containers.less +74 -0
- package/ui/less/overflow_menu.less +0 -10
- package/ui/less/tooltip.less +97 -0
- package/ui/locales/en.json +1 -0
- package/ui/locales/source.json +4 -0
- package/ui/localization.js +12 -36
- package/ui/loop_button.js +5 -0
- package/ui/mute_button.js +2 -1
- package/ui/overflow_menu.js +5 -25
- package/ui/pip_button.js +5 -0
- package/ui/play_button.js +2 -2
- package/ui/playback_rate_selection.js +8 -9
- package/ui/resolution_selection.js +7 -0
- package/ui/rewind_button.js +15 -6
- package/ui/seek_bar.js +4 -2
- package/ui/settings_menu.js +36 -4
- package/ui/small_play_button.js +1 -0
- package/ui/statistics_button.js +253 -0
- package/ui/text_selection.js +12 -4
- package/ui/ui.js +30 -0
- package/ui/volume_bar.js +1 -1
- package/externs/media_capabilities.js +0 -16
|
@@ -12,297 +12,311 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
# Conformance requirements:
|
|
17
16
|
# See: https://github.com/google/closure-compiler/wiki/JS-Conformance-Framework
|
|
18
17
|
|
|
19
|
-
|
|
20
18
|
# Disallow throwing non-Error types.
|
|
21
19
|
requirement: {
|
|
22
20
|
type: CUSTOM
|
|
23
|
-
java_class:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
whitelist_regexp:
|
|
28
|
-
whitelist_regexp:
|
|
21
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanThrowOfNonErrorTypes"
|
|
22
|
+
error_message:
|
|
23
|
+
"Throwing non-Error types or Error itself is not allowed; "
|
|
24
|
+
"throw shaka.util.Error instead."
|
|
25
|
+
whitelist_regexp: "test/"
|
|
26
|
+
whitelist_regexp: "node_modules/"
|
|
29
27
|
}
|
|
30
28
|
requirement: {
|
|
31
29
|
type: BANNED_CODE_PATTERN
|
|
32
|
-
value:
|
|
33
|
-
error_message:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
whitelist_regexp:
|
|
30
|
+
value: "function template() { throw new Error(); }"
|
|
31
|
+
error_message:
|
|
32
|
+
"Throwing non-Error types or Error itself is not allowed; "
|
|
33
|
+
"throw shaka.util.Error instead."
|
|
34
|
+
whitelist_regexp: "test/"
|
|
35
|
+
whitelist_regexp: "node_modules/"
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
|
|
40
38
|
# Ban accessing members of unknown types.
|
|
41
39
|
requirement: {
|
|
42
40
|
type: CUSTOM
|
|
43
|
-
java_class:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
java_class:
|
|
42
|
+
"com.google.javascript.jscomp.ConformanceRules$"
|
|
43
|
+
"BanUnknownTypedClassPropsReferences"
|
|
44
|
+
error_message:
|
|
45
|
+
"Using properties of unknown types is not allowed; add an "
|
|
46
|
+
"explicit type to the variable."
|
|
47
|
+
whitelist_regexp: "demo/"
|
|
48
48
|
}
|
|
49
49
|
requirement {
|
|
50
50
|
type: CUSTOM
|
|
51
|
-
java_class:
|
|
52
|
-
error_message:
|
|
53
|
-
|
|
51
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanUnknownThis"
|
|
52
|
+
error_message:
|
|
53
|
+
"Failed to infer type of \"this\"; "
|
|
54
|
+
"please be explicit or use bind!"
|
|
54
55
|
# Until we can get this rule updated for ES6 static methods
|
|
55
56
|
# (https://github.com/google/closure-compiler/issues/2880):
|
|
56
|
-
whitelist_regexp:
|
|
57
|
-
whitelist_regexp:
|
|
57
|
+
whitelist_regexp: "test/test/util/canned_idb.js"
|
|
58
|
+
whitelist_regexp: "test/assets/assets_integration.js"
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
|
|
61
61
|
# Reject unresolved types.
|
|
62
62
|
requirement {
|
|
63
63
|
type: CUSTOM
|
|
64
|
-
java_class:
|
|
65
|
-
error_message:
|
|
64
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanUnresolvedType"
|
|
65
|
+
error_message: "Failed to resolve type!"
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
68
|
# Reject global variables.
|
|
70
69
|
requirement {
|
|
71
70
|
type: CUSTOM
|
|
72
|
-
java_class:
|
|
73
|
-
error_message:
|
|
74
|
-
whitelist_regexp:
|
|
75
|
-
whitelist_regexp:
|
|
76
|
-
whitelist_regexp:
|
|
71
|
+
java_class: "com.google.javascript.jscomp.ConformanceRules$BanGlobalVars"
|
|
72
|
+
error_message: "Global variables are not allowed!"
|
|
73
|
+
whitelist_regexp: "demo/"
|
|
74
|
+
whitelist_regexp: "test/"
|
|
75
|
+
whitelist_regexp: "node_modules/"
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
|
|
80
78
|
# Disallow using "!" on nullable numbers in boolean assignment.
|
|
81
79
|
# Note: we can't use the pattern "var b = !n" because it causes too many
|
|
82
80
|
# false positives.
|
|
83
81
|
requirement: {
|
|
84
82
|
type: BANNED_CODE_PATTERN
|
|
85
|
-
value:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
value:
|
|
84
|
+
"/** @param {boolean} b @param {?number} n */ "
|
|
85
|
+
"function template(b, n) { b = !n; }"
|
|
86
|
+
error_message:
|
|
87
|
+
"Using \"!\" on nullable numbers in boolean assignment "
|
|
88
|
+
"is not allowed; use an explicit comparison instead."
|
|
89
|
+
whitelist_regexp: "node_modules/"
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
requirement: {
|
|
93
93
|
type: BANNED_CODE_PATTERN
|
|
94
|
-
value:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
value:
|
|
95
|
+
"/** @param {*} a"
|
|
96
|
+
" @param {(number|string|boolean|null|undefined)} x */"
|
|
97
|
+
"function template(a, x) { expect(a).toEqual(x); }"
|
|
98
|
+
value:
|
|
99
|
+
"/** @param {*} a"
|
|
100
|
+
" @param {(number|string|boolean|null|undefined)} x */"
|
|
101
|
+
"function template(a, x) { expect(a).not.toEqual(x); }"
|
|
102
|
+
error_message: "Use expect.toBe for primitives"
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
requirement: {
|
|
104
106
|
type: BANNED_CODE_PATTERN
|
|
105
|
-
value:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
value:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
value:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
107
|
+
value:
|
|
108
|
+
"/** @param {BufferSource} a */"
|
|
109
|
+
"function template(a) { new Uint8Array(a) }"
|
|
110
|
+
value:
|
|
111
|
+
"/** @param {BufferSource} a */"
|
|
112
|
+
"function template(a) { new Int8Array(a) }"
|
|
113
|
+
value:
|
|
114
|
+
"/** @param {BufferSource} a */"
|
|
115
|
+
"function template(a) { new Uint8ClampedArray(a) }"
|
|
116
|
+
value:
|
|
117
|
+
"/** @param {BufferSource} a */"
|
|
118
|
+
"function template(a) { new Unt16Array(a) }"
|
|
119
|
+
value:
|
|
120
|
+
"/** @param {BufferSource} a */"
|
|
121
|
+
"function template(a) { new Int16Array(a) }"
|
|
122
|
+
value:
|
|
123
|
+
"/** @param {BufferSource} a */"
|
|
124
|
+
"function template(a) { new Uint32Array(a) }"
|
|
125
|
+
value:
|
|
126
|
+
"/** @param {BufferSource} a */"
|
|
127
|
+
"function template(a) { new Int32Array(a) }"
|
|
128
|
+
value:
|
|
129
|
+
"/** @param {BufferSource} a */"
|
|
130
|
+
"function template(a) { new Float32Array(a) }"
|
|
131
|
+
value:
|
|
132
|
+
"/** @param {BufferSource} a */"
|
|
133
|
+
"function template(a) { new Float64Array(a) }"
|
|
134
|
+
error_message: "Use shaka.util.BufferUtils.view* instead."
|
|
135
|
+
whitelist_regexp: "lib/util/buffer_utils.js"
|
|
125
136
|
}
|
|
126
137
|
|
|
127
138
|
requirement: {
|
|
128
139
|
type: BANNED_CODE_PATTERN
|
|
129
|
-
value:
|
|
130
|
-
error_message:
|
|
140
|
+
value: "function template () { new Date().getTime() }"
|
|
141
|
+
error_message: "Use Date.now() instead."
|
|
131
142
|
}
|
|
132
143
|
|
|
133
144
|
# Disallow console logging.
|
|
134
145
|
requirement: {
|
|
135
146
|
type: BANNED_PROPERTY_CALL
|
|
136
|
-
value:
|
|
137
|
-
value:
|
|
138
|
-
value:
|
|
139
|
-
value:
|
|
140
|
-
value:
|
|
141
|
-
error_message:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
whitelist_regexp:
|
|
145
|
-
whitelist_regexp:
|
|
146
|
-
whitelist_regexp:
|
|
147
|
-
whitelist_regexp:
|
|
147
|
+
value: "Console.prototype.debug"
|
|
148
|
+
value: "Console.prototype.log"
|
|
149
|
+
value: "Console.prototype.info"
|
|
150
|
+
value: "Console.prototype.warn"
|
|
151
|
+
value: "Console.prototype.error"
|
|
152
|
+
error_message:
|
|
153
|
+
"Using \"console\" is not allowed; "
|
|
154
|
+
"use shaka.log instead"
|
|
155
|
+
whitelist_regexp: "demo/"
|
|
156
|
+
whitelist_regexp: "lib/debug/log.js"
|
|
157
|
+
whitelist_regexp: "test/test/boot.js"
|
|
158
|
+
whitelist_regexp: "node_modules/"
|
|
159
|
+
whitelist_regexp: "[synthetic:es6/promise/promise]"
|
|
148
160
|
}
|
|
149
161
|
|
|
150
162
|
# Disallow querySelector and querySelectorAll since they aren't supported on
|
|
151
163
|
# Shaka Player Embedded.
|
|
152
164
|
requirement: {
|
|
153
165
|
type: BANNED_PROPERTY_CALL
|
|
154
|
-
value:
|
|
155
|
-
value:
|
|
156
|
-
value:
|
|
157
|
-
value:
|
|
158
|
-
error_message:
|
|
159
|
-
whitelist_regexp:
|
|
160
|
-
whitelist_regexp:
|
|
161
|
-
whitelist_regexp:
|
|
162
|
-
whitelist_regexp:
|
|
166
|
+
value: "Element.prototype.querySelector"
|
|
167
|
+
value: "Document.prototype.querySelector"
|
|
168
|
+
value: "Element.prototype.querySelectorAll"
|
|
169
|
+
value: "Document.prototype.querySelectorAll"
|
|
170
|
+
error_message: "Use getElementsByTagName"
|
|
171
|
+
whitelist_regexp: "demo/"
|
|
172
|
+
whitelist_regexp: "ui/"
|
|
173
|
+
whitelist_regexp: "test/"
|
|
174
|
+
whitelist_regexp: "node_modules/"
|
|
163
175
|
}
|
|
164
176
|
|
|
165
|
-
|
|
166
177
|
# Disallow Element.children.
|
|
167
178
|
requirement: {
|
|
168
179
|
type: BANNED_PROPERTY
|
|
169
|
-
value:
|
|
170
|
-
error_message:
|
|
171
|
-
|
|
180
|
+
value: "Element.prototype.children"
|
|
181
|
+
error_message:
|
|
182
|
+
"Using \"Element.children\" is not allowed; "
|
|
183
|
+
"use Node.childNodes instead"
|
|
172
184
|
}
|
|
173
185
|
|
|
174
186
|
requirement: {
|
|
175
187
|
type: BANNED_PROPERTY
|
|
176
|
-
value:
|
|
177
|
-
value:
|
|
178
|
-
error_message:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
whitelist_regexp:
|
|
182
|
-
whitelist_regexp:
|
|
188
|
+
value: "DataView.prototype.buffer"
|
|
189
|
+
value: "TypedArray.prototype.buffer"
|
|
190
|
+
error_message:
|
|
191
|
+
"Using \"TypedArray.buffer\" is not safe since it doesn\'t "
|
|
192
|
+
"handle sub-arrays"
|
|
193
|
+
whitelist_regexp: "lib/util/buffer_utils.js"
|
|
194
|
+
whitelist_regexp: "lib/util/object_utils.js"
|
|
195
|
+
whitelist_regexp: "test/util/buffer_utils_unit.js"
|
|
183
196
|
}
|
|
184
197
|
|
|
185
|
-
|
|
186
198
|
# Disallow Element.innerHTML and outerHTML.
|
|
187
199
|
requirement: {
|
|
188
200
|
type: BANNED_PROPERTY
|
|
189
|
-
value:
|
|
190
|
-
value:
|
|
191
|
-
error_message:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
201
|
+
value: "Element.prototype.innerHTML"
|
|
202
|
+
value: "Element.prototype.outerHTML"
|
|
203
|
+
error_message:
|
|
204
|
+
"Using \"Element.innerHTML\" or \"Element.outerHTML\" is not "
|
|
205
|
+
"allowed due to security concerns; use textContent, "
|
|
206
|
+
"appendChild, or removeChild instead"
|
|
207
|
+
whitelist_regexp: "test/test/util/util.js"
|
|
195
208
|
}
|
|
196
209
|
|
|
197
|
-
|
|
198
210
|
# Disallow DOMRect.x and y.
|
|
199
211
|
requirement: {
|
|
200
212
|
type: BANNED_PROPERTY
|
|
201
|
-
value:
|
|
202
|
-
value:
|
|
203
|
-
error_message:
|
|
204
|
-
|
|
213
|
+
value: "DOMRect.prototype.x"
|
|
214
|
+
value: "DOMRect.prototype.y"
|
|
215
|
+
error_message:
|
|
216
|
+
"DOMRect \"x\" and \"y\" are not supported on legacy Edge; "
|
|
217
|
+
"use \"left\" and \"top\" instead."
|
|
205
218
|
# The built-in set and map polyfills trigger this ban somehow.
|
|
206
|
-
whitelist_regexp:
|
|
219
|
+
whitelist_regexp: "synthetic:es6/"
|
|
207
220
|
}
|
|
208
221
|
|
|
209
|
-
|
|
210
222
|
# Disallow fdescribe.
|
|
211
223
|
requirement: {
|
|
212
224
|
type: BANNED_NAME
|
|
213
|
-
value:
|
|
214
|
-
error_message:
|
|
225
|
+
value: "fdescribe"
|
|
226
|
+
error_message: "Using \"fdescribe\" is not allowed"
|
|
215
227
|
}
|
|
216
228
|
|
|
217
|
-
|
|
218
229
|
# Disallow fit.
|
|
219
230
|
requirement: {
|
|
220
231
|
type: BANNED_NAME
|
|
221
|
-
value:
|
|
222
|
-
error_message:
|
|
223
|
-
whitelist_regexp:
|
|
232
|
+
value: "fit"
|
|
233
|
+
error_message: "Using \"fit\" is not allowed"
|
|
234
|
+
whitelist_regexp: "test/player_external.js"
|
|
224
235
|
}
|
|
225
236
|
|
|
226
|
-
|
|
227
237
|
# Disallow setInterval.
|
|
228
238
|
requirement: {
|
|
229
239
|
type: BANNED_NAME
|
|
230
|
-
value:
|
|
231
|
-
error_message:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
whitelist_regexp:
|
|
240
|
+
value: "window.setInterval"
|
|
241
|
+
error_message:
|
|
242
|
+
"setInterval has several drawbacks, most of "
|
|
243
|
+
"all difficulty canceling and surprising behavior "
|
|
244
|
+
"when the device goes to sleep. Please use "
|
|
245
|
+
"shaka.util.Timer instead."
|
|
246
|
+
whitelist_regexp: "demo/"
|
|
247
|
+
whitelist_regexp: "test/"
|
|
237
248
|
}
|
|
238
249
|
requirement: {
|
|
239
250
|
type: BANNED_NAME
|
|
240
|
-
value:
|
|
241
|
-
error_message:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
whitelist_regexp:
|
|
251
|
+
value: "setInterval"
|
|
252
|
+
error_message:
|
|
253
|
+
"setInterval has several drawbacks, most of "
|
|
254
|
+
"all difficulty canceling and surprising behavior "
|
|
255
|
+
"when the device goes to sleep. Please use "
|
|
256
|
+
"shaka.util.Timer instead."
|
|
257
|
+
whitelist_regexp: "demo/"
|
|
258
|
+
whitelist_regexp: "test/"
|
|
247
259
|
}
|
|
248
260
|
|
|
249
261
|
# Disallow setTimeout.
|
|
250
262
|
requirement: {
|
|
251
263
|
type: BANNED_NAME
|
|
252
|
-
value:
|
|
253
|
-
error_message:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
whitelist_regexp:
|
|
258
|
-
whitelist_regexp:
|
|
264
|
+
value: "window.setTimeout"
|
|
265
|
+
error_message:
|
|
266
|
+
"setTimeout has several drawbacks, most of "
|
|
267
|
+
"all difficulty canceling it. Please use "
|
|
268
|
+
"shaka.util.Timer instead."
|
|
269
|
+
whitelist_regexp: "demo/"
|
|
270
|
+
whitelist_regexp: "test/"
|
|
271
|
+
whitelist_regexp: "lib/util/delayed_tick.js"
|
|
259
272
|
}
|
|
260
273
|
requirement: {
|
|
261
274
|
type: BANNED_NAME
|
|
262
|
-
value:
|
|
263
|
-
error_message:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
whitelist_regexp:
|
|
275
|
+
value: "setTimeout"
|
|
276
|
+
error_message:
|
|
277
|
+
"setTimeout has several drawbacks, most of "
|
|
278
|
+
"all difficulty canceling it. Please use "
|
|
279
|
+
"shaka.util.Timer instead."
|
|
280
|
+
whitelist_regexp: "demo/"
|
|
281
|
+
whitelist_regexp: "test/"
|
|
268
282
|
}
|
|
269
283
|
|
|
270
|
-
|
|
271
284
|
# Disallow eval, except when testing for modern JS syntax in demo
|
|
272
285
|
requirement: {
|
|
273
286
|
type: BANNED_NAME
|
|
274
|
-
value:
|
|
275
|
-
error_message:
|
|
276
|
-
whitelist_regexp:
|
|
277
|
-
whitelist_regexp:
|
|
278
|
-
whitelist_regexp:
|
|
287
|
+
value: "window.eval"
|
|
288
|
+
error_message: "Using \"eval\" is not allowed"
|
|
289
|
+
whitelist_regexp: "demo/demo_utils.js"
|
|
290
|
+
whitelist_regexp: "node_modules/google-closure-library/closure/goog/base.js"
|
|
291
|
+
whitelist_regexp: "test/util/functional_unit.js"
|
|
279
292
|
}
|
|
280
293
|
requirement: {
|
|
281
294
|
type: BANNED_NAME
|
|
282
|
-
value:
|
|
283
|
-
error_message:
|
|
284
|
-
whitelist_regexp:
|
|
285
|
-
whitelist_regexp:
|
|
286
|
-
whitelist_regexp:
|
|
295
|
+
value: "eval"
|
|
296
|
+
error_message: "Using \"eval\" is not allowed"
|
|
297
|
+
whitelist_regexp: "demo/demo_utils.js"
|
|
298
|
+
whitelist_regexp: "node_modules/google-closure-library/closure/goog/base.js"
|
|
299
|
+
whitelist_regexp: "test/util/functional_unit.js"
|
|
287
300
|
}
|
|
288
301
|
|
|
289
|
-
|
|
290
302
|
# Disallow ES6 methods.
|
|
291
303
|
requirement: {
|
|
292
304
|
type: BANNED_PROPERTY
|
|
293
|
-
value:
|
|
294
|
-
error_message:
|
|
295
|
-
|
|
305
|
+
value: "ArrayBuffer.prototype.slice"
|
|
306
|
+
error_message:
|
|
307
|
+
"ArrayBuffer.slice is not allowed because it "
|
|
308
|
+
"is not supported on Tizen 2016"
|
|
296
309
|
}
|
|
297
310
|
|
|
298
311
|
# Disallow the general use of fetch, which is not available on all supported
|
|
299
312
|
# platforms.
|
|
300
313
|
requirement: {
|
|
301
314
|
type: BANNED_NAME_CALL
|
|
302
|
-
value:
|
|
303
|
-
value:
|
|
304
|
-
error_message:
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
315
|
+
value: "fetch"
|
|
316
|
+
value: "window.fetch"
|
|
317
|
+
error_message:
|
|
318
|
+
"Using \"fetch\" directly is not allowed; "
|
|
319
|
+
"use shaka.test.Util.fetch or NetworkingEngine.request "
|
|
320
|
+
"instead."
|
|
321
|
+
whitelist_regexp: "lib/net/http_fetch_plugin.js"
|
|
308
322
|
}
|
package/build/test.py
CHANGED
|
@@ -229,6 +229,11 @@ class Launcher:
|
|
|
229
229
|
default=None,
|
|
230
230
|
const=2,
|
|
231
231
|
nargs='?')
|
|
232
|
+
running_commands.add_argument(
|
|
233
|
+
'--spec-hide-passed',
|
|
234
|
+
help='If provided, configure the spec reporter to hide passing tests.',
|
|
235
|
+
action='store_true',
|
|
236
|
+
default=False)
|
|
232
237
|
running_commands.add_argument(
|
|
233
238
|
'--test-custom-asset',
|
|
234
239
|
help='Run asset playback tests on a custom manifest URI.',
|
|
@@ -358,6 +363,7 @@ class Launcher:
|
|
|
358
363
|
'single_run',
|
|
359
364
|
'uncompiled',
|
|
360
365
|
'delay_tests',
|
|
366
|
+
'spec_hide_passed',
|
|
361
367
|
'test_custom_asset',
|
|
362
368
|
'test_custom_license_server',
|
|
363
369
|
'test_timeout',
|
package/build/types/core
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
+../../lib/media/playhead.js
|
|
29
29
|
+../../lib/media/playhead_observer.js
|
|
30
30
|
+../../lib/media/presentation_timeline.js
|
|
31
|
+
+../../lib/media/quality_observer.js
|
|
31
32
|
+../../lib/media/region_observer.js
|
|
32
33
|
+../../lib/media/region_timeline.js
|
|
33
34
|
+../../lib/media/segment_index.js
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
+../../lib/util/abortable_operation.js
|
|
59
60
|
+../../lib/util/array_utils.js
|
|
60
61
|
+../../lib/util/buffer_utils.js
|
|
62
|
+
+../../lib/util/cmcd_manager.js
|
|
61
63
|
+../../lib/util/config_utils.js
|
|
62
64
|
+../../lib/util/data_view_reader.js
|
|
63
65
|
+../../lib/util/delayed_tick.js
|
|
@@ -82,6 +84,7 @@
|
|
|
82
84
|
+../../lib/util/mp4_box_parsers.js
|
|
83
85
|
+../../lib/util/mp4_parser.js
|
|
84
86
|
+../../lib/util/multi_map.js
|
|
87
|
+
+../../lib/util/mutex.js
|
|
85
88
|
+../../lib/util/networking.js
|
|
86
89
|
+../../lib/util/object_utils.js
|
|
87
90
|
+../../lib/util/operation_manager.js
|
package/build/types/offline
CHANGED
package/build/types/polyfill
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
+../../lib/polyfill/patchedmediakeys_nop.js
|
|
14
14
|
+../../lib/polyfill/patchedmediakeys_webkit.js
|
|
15
15
|
+../../lib/polyfill/pip_webkit.js
|
|
16
|
+
+../../lib/polyfill/random_uuid.js
|
|
16
17
|
+../../lib/polyfill/storage_estimate.js
|
|
17
18
|
+../../lib/polyfill/video_play_promise.js
|
|
18
19
|
+../../lib/polyfill/videoplaybackquality.js
|
package/build/types/ui
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
+../../ui/big_play_button.js
|
|
10
10
|
+../../ui/airplay_button.js
|
|
11
11
|
+../../ui/cast_button.js
|
|
12
|
+
+../../ui/context_menu.js
|
|
12
13
|
+../../ui/controls.js
|
|
13
14
|
+../../ui/constants.js
|
|
14
15
|
+../../ui/enums.js
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
+../../ui/small_play_button.js
|
|
32
33
|
+../../ui/skip_ad_button.js
|
|
33
34
|
+../../ui/spacer.js
|
|
35
|
+
+../../ui/statistics_button.js
|
|
34
36
|
+../../ui/text_selection.js
|
|
35
37
|
+../../ui/ui.js
|
|
36
38
|
+../../ui/ui_utils.js
|
package/demo/common/assets.js
CHANGED
|
@@ -58,6 +58,10 @@ shakaAssets.AdTag = {
|
|
|
58
58
|
'single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&' +
|
|
59
59
|
'unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%' +
|
|
60
60
|
'3Dlinear&correlator=',
|
|
61
|
+
SINGLE_NON_LINEAR_AD: 'https://pubads.g.doubleclick.net/gampad/ads?' +
|
|
62
|
+
'sz=480x70&iu=/124319096/external/single_ad_samples&ciu_szs=300x250 ' +
|
|
63
|
+
'&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1' +
|
|
64
|
+
'&cust_params=deployment%3Ddevsite%26sample_ct%3Dnonlinear&correlator=',
|
|
61
65
|
SINGLE_SKIPPABLE_AD: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/' +
|
|
62
66
|
'124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&' +
|
|
63
67
|
'gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=' +
|
|
@@ -315,6 +319,20 @@ shakaAssets.testAssets = [
|
|
|
315
319
|
.addFeature(shakaAssets.Feature.SURROUND)
|
|
316
320
|
.addFeature(shakaAssets.Feature.OFFLINE)
|
|
317
321
|
.addLicenseServer('com.widevine.alpha', 'https://cwip-shaka-proxy.appspot.com/no_auth'),
|
|
322
|
+
new ShakaDemoAssetInfo(
|
|
323
|
+
/* name= */ 'Angel One (HLS, MP4, multilingual, Widevine, single non-linear ad)',
|
|
324
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/angel_one.png',
|
|
325
|
+
/* manifestUri= */ 'https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8',
|
|
326
|
+
/* source= */ shakaAssets.Source.SHAKA)
|
|
327
|
+
.addKeySystem(shakaAssets.KeySystem.WIDEVINE)
|
|
328
|
+
.setAdTagUri(shakaAssets.AdTag.SINGLE_NON_LINEAR_AD)
|
|
329
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
330
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
331
|
+
.addFeature(shakaAssets.Feature.MULTIPLE_LANGUAGES)
|
|
332
|
+
.addFeature(shakaAssets.Feature.SUBTITLES)
|
|
333
|
+
.addFeature(shakaAssets.Feature.SURROUND)
|
|
334
|
+
.addFeature(shakaAssets.Feature.OFFLINE)
|
|
335
|
+
.addLicenseServer('com.widevine.alpha', 'https://cwip-shaka-proxy.appspot.com/no_auth'),
|
|
318
336
|
new ShakaDemoAssetInfo(
|
|
319
337
|
/* name= */ 'Sintel 4k (multicodec)',
|
|
320
338
|
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/sintel.png',
|