shaka-player 3.3.0 → 3.3.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/build/conformance.textproto +183 -169
  3. package/dist/controls.css +1 -1
  4. package/dist/deps.js +1 -1
  5. package/dist/locales.js +30 -30
  6. package/dist/shaka-player.compiled.d.ts +25 -2
  7. package/dist/shaka-player.compiled.debug.d.ts +25 -2
  8. package/dist/shaka-player.compiled.debug.externs.js +22 -1
  9. package/dist/shaka-player.compiled.debug.js +226 -222
  10. package/dist/shaka-player.compiled.debug.map +3 -3
  11. package/dist/shaka-player.compiled.externs.js +22 -1
  12. package/dist/shaka-player.compiled.js +814 -812
  13. package/dist/shaka-player.compiled.map +4 -4
  14. package/dist/shaka-player.ui.d.ts +25 -2
  15. package/dist/shaka-player.ui.debug.d.ts +25 -2
  16. package/dist/shaka-player.ui.debug.externs.js +22 -1
  17. package/dist/shaka-player.ui.debug.js +244 -240
  18. package/dist/shaka-player.ui.debug.map +3 -3
  19. package/dist/shaka-player.ui.externs.js +22 -1
  20. package/dist/shaka-player.ui.js +995 -992
  21. package/dist/shaka-player.ui.map +4 -4
  22. package/externs/cmcd.js +186 -0
  23. package/externs/shaka/player.js +8 -0
  24. package/externs/shaka/text.js +10 -0
  25. package/lib/hls/hls_parser.js +30 -0
  26. package/lib/media/segment_index.js +2 -1
  27. package/lib/media/segment_reference.js +19 -1
  28. package/lib/media/streaming_engine.js +5 -2
  29. package/lib/player.js +23 -17
  30. package/lib/polyfill/media_capabilities.js +30 -15
  31. package/lib/text/cue.js +6 -0
  32. package/lib/text/ttml_text_parser.js +84 -58
  33. package/lib/text/ui_text_displayer.js +17 -11
  34. package/lib/util/cmcd_manager.js +47 -201
  35. package/lib/util/stream_utils.js +86 -10
  36. package/lib/util/xml_utils.js +19 -0
  37. package/package.json +2 -2
  38. package/test/media/drm_engine_unit.js +3 -3
  39. package/test/media/streaming_engine_integration.js +2 -1
  40. package/test/media/streaming_engine_unit.js +145 -0
  41. package/test/player_integration.js +41 -8
  42. package/test/player_src_equals_integration.js +41 -8
  43. package/test/player_unit.js +19 -9
  44. package/test/test/assets/chapters.vtt +2 -2
  45. package/test/test/assets/chapters2.vtt +10 -0
  46. package/test/test/util/ttml_utils.js +81 -0
  47. package/test/text/mp4_ttml_parser_unit.js +11 -18
  48. package/test/text/ttml_text_parser_unit.js +499 -230
  49. package/test/util/cmcd_manager_unit.js +29 -15
  50. package/test/util/stream_utils_unit.js +36 -30
  51. package/third_party/closure-uri/uri.js +21 -0
  52. package/ui/text_selection.js +1 -0
  53. package/externs/media_capabilities.js +0 -16
package/CHANGELOG.md CHANGED
@@ -1,3 +1,57 @@
1
+ ## 3.3.1 (2022-01-28)
2
+
3
+ Bugfixes:
4
+ - Fix duplicate CMCD parameters in HLS live content
5
+ - https://github.com/google/shaka-player/issues/3862
6
+ - https://github.com/google/shaka-player/pull/3875
7
+ - Inherit alignment from regions
8
+ - Fix support for TTAF1 namespace (old version of TTML)
9
+ - https://github.com/google/shaka-player/issues/3009
10
+ - https://github.com/google/shaka-player/pull/3864
11
+ - https://github.com/google/shaka-player/pull/3906
12
+ - Fix misdetection of HEVC support on MS Edge
13
+ - https://github.com/google/shaka-player/pull/3897
14
+ - Fix caption overlap
15
+ - https://github.com/google/shaka-player/issues/3850
16
+ - https://github.com/google/shaka-player/issues/3741
17
+ - Fix missing throughput in CMCD for HLS live
18
+ - https://github.com/google/shaka-player/issues/3873
19
+ - https://github.com/google/shaka-player/pull/3874
20
+ - Support multiple chapter tracks with same language
21
+ - https://github.com/google/shaka-player/issues/3597
22
+ - https://github.com/google/shaka-player/pull/3868
23
+ - Fix text UI not updating when text is disabled
24
+ - https://github.com/google/shaka-player/issues/3728
25
+ - https://github.com/google/shaka-player/pull/3867
26
+ - Clear buffer on seek if mediaState is updating
27
+ - https://github.com/google/shaka-player/issues/3299
28
+ - https://github.com/google/shaka-player/pull/3795
29
+ - Fix thumbnails issues
30
+ - https://github.com/google/shaka-player/pull/3858
31
+ - Made nested cues inherit region
32
+ - https://github.com/google/shaka-player/issues/3743
33
+ - https://github.com/google/shaka-player/pull/3837
34
+ - Fix CMCD top bitrate reporting
35
+ - https://github.com/google/shaka-player/issues/3851
36
+ - https://github.com/google/shaka-player/pull/3852
37
+ - Fix MediaCapabilities polyfill on Safari
38
+ - https://github.com/google/shaka-player/issues/3696
39
+ - https://github.com/google/shaka-player/issues/3530
40
+ - Fix usage of Shaka without polyfills
41
+ - https://github.com/google/shaka-player/issues/3843
42
+ - Fix playback failure due to rounding errors
43
+ - https://github.com/google/shaka-player/issues/3717
44
+ - Fix HLS image track issues
45
+ - https://github.com/google/shaka-player/issues/3840
46
+ - Fix CMCD property mangling
47
+ - https://github.com/google/shaka-player/issues/3839
48
+ - https://github.com/google/shaka-player/pull/3842
49
+ - Remove caption wrapper bgColor
50
+ - https://github.com/google/shaka-player/issues/3745
51
+ - https://github.com/google/shaka-player/pull/3838
52
+ - Avoid WebCrypto randomUUID when CMCD disabled
53
+
54
+
1
55
  ## 3.3.0 (2022-01-07)
2
56
 
3
57
  New Features:
@@ -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
- 'com.google.javascript.jscomp.ConformanceRules$BanThrowOfNonErrorTypes'
25
- error_message: 'Throwing non-Error types or Error itself is not allowed; '
26
- 'throw shaka.util.Error instead.'
27
- whitelist_regexp: 'test/'
28
- whitelist_regexp: 'node_modules/'
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: 'function template() { throw new Error(); }'
33
- error_message: 'Throwing non-Error types or Error itself is not allowed; '
34
- 'throw shaka.util.Error instead.'
35
- whitelist_regexp: 'test/'
36
- whitelist_regexp: 'node_modules/'
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: 'com.google.javascript.jscomp.ConformanceRules$'
44
- 'BanUnknownTypedClassPropsReferences'
45
- error_message: 'Using properties of unknown types is not allowed; add an '
46
- 'explicit type to the variable.'
47
- whitelist_regexp: 'demo/'
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: 'com.google.javascript.jscomp.ConformanceRules$BanUnknownThis'
52
- error_message: 'Failed to infer type of "this"; '
53
- 'please be explicit or use bind!'
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: 'test/test/util/canned_idb.js'
57
- whitelist_regexp: 'test/assets/assets_integration.js'
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: 'com.google.javascript.jscomp.ConformanceRules$BanUnresolvedType'
65
- error_message: 'Failed to resolve type!'
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: 'com.google.javascript.jscomp.ConformanceRules$BanGlobalVars'
73
- error_message: 'Global variables are not allowed!'
74
- whitelist_regexp: 'demo/'
75
- whitelist_regexp: 'test/'
76
- whitelist_regexp: 'node_modules/'
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: '/** @param {boolean} b @param {?number} n */ '
86
- 'function template(b, n) { b = !n; }'
87
- error_message: 'Using "!" on nullable numbers in boolean assignment '
88
- 'is not allowed; use an explicit comparison instead.'
89
- whitelist_regexp: 'node_modules/'
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: '/** @param {*} a'
95
- ' @param {(number|string|boolean|null|undefined)} x */'
96
- 'function template(a, x) { expect(a).toEqual(x); }'
97
- value: '/** @param {*} a'
98
- ' @param {(number|string|boolean|null|undefined)} x */'
99
- 'function template(a, x) { expect(a).not.toEqual(x); }'
100
- error_message: 'Use expect.toBe for primitives'
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: '/** @param {BufferSource} a */'
106
- 'function template(a) { new Uint8Array(a) }'
107
- value: '/** @param {BufferSource} a */'
108
- 'function template(a) { new Int8Array(a) }'
109
- value: '/** @param {BufferSource} a */'
110
- 'function template(a) { new Uint8ClampedArray(a) }'
111
- value: '/** @param {BufferSource} a */'
112
- 'function template(a) { new Unt16Array(a) }'
113
- value: '/** @param {BufferSource} a */'
114
- 'function template(a) { new Int16Array(a) }'
115
- value: '/** @param {BufferSource} a */'
116
- 'function template(a) { new Uint32Array(a) }'
117
- value: '/** @param {BufferSource} a */'
118
- 'function template(a) { new Int32Array(a) }'
119
- value: '/** @param {BufferSource} a */'
120
- 'function template(a) { new Float32Array(a) }'
121
- value: '/** @param {BufferSource} a */'
122
- 'function template(a) { new Float64Array(a) }'
123
- error_message: 'Use shaka.util.BufferUtils.view* instead.'
124
- whitelist_regexp: 'lib/util/buffer_utils.js'
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: 'function template () { new Date().getTime() }'
130
- error_message: 'Use Date.now() instead.'
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: 'Console.prototype.debug'
137
- value: 'Console.prototype.log'
138
- value: 'Console.prototype.info'
139
- value: 'Console.prototype.warn'
140
- value: 'Console.prototype.error'
141
- error_message: 'Using "console" is not allowed; '
142
- 'use shaka.log instead'
143
- whitelist_regexp: 'demo/'
144
- whitelist_regexp: 'lib/debug/log.js'
145
- whitelist_regexp: 'test/test/boot.js'
146
- whitelist_regexp: 'node_modules/'
147
- whitelist_regexp: '[synthetic:es6/promise/promise]'
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: 'Element.prototype.querySelector'
155
- value: 'Document.prototype.querySelector'
156
- value: 'Element.prototype.querySelectorAll'
157
- value: 'Document.prototype.querySelectorAll'
158
- error_message: 'Use getElementsByTagName'
159
- whitelist_regexp: 'demo/'
160
- whitelist_regexp: 'ui/'
161
- whitelist_regexp: 'test/'
162
- whitelist_regexp: 'node_modules/'
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: 'Element.prototype.children'
170
- error_message: 'Using "Element.children" is not allowed; '
171
- 'use Node.childNodes instead'
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: 'DataView.prototype.buffer'
177
- value: 'TypedArray.prototype.buffer'
178
- error_message: 'Using "TypedArray.buffer" is not safe since it doesn\'t '
179
- 'handle sub-arrays'
180
- whitelist_regexp: 'lib/util/buffer_utils.js'
181
- whitelist_regexp: 'lib/util/object_utils.js'
182
- whitelist_regexp: 'test/util/buffer_utils_unit.js'
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: 'Element.prototype.innerHTML'
190
- value: 'Element.prototype.outerHTML'
191
- error_message: 'Using "Element.innerHTML" or "Element.outerHTML" is not '
192
- 'allowed due to security concerns; use textContent, '
193
- 'appendChild, or removeChild instead'
194
- whitelist_regexp: 'test/test/util/util.js'
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: 'DOMRect.prototype.x'
202
- value: 'DOMRect.prototype.y'
203
- error_message: 'DOMRect "x" and "y" are not supported on legacy Edge; '
204
- 'use "left" and "top" instead.'
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: 'synthetic:es6/'
219
+ whitelist_regexp: "synthetic:es6/"
207
220
  }
208
221
 
209
-
210
222
  # Disallow fdescribe.
211
223
  requirement: {
212
224
  type: BANNED_NAME
213
- value: 'fdescribe'
214
- error_message: 'Using "fdescribe" is not allowed'
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: 'fit'
222
- error_message: 'Using "fit" is not allowed'
223
- whitelist_regexp: 'test/player_external.js'
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: 'window.setInterval'
231
- error_message: 'setInterval has several drawbacks, most of '
232
- 'all difficulty canceling and surprising behavior '
233
- 'when the device goes to sleep. Please use '
234
- 'shaka.util.Timer instead.'
235
- whitelist_regexp: 'demo/'
236
- whitelist_regexp: 'test/'
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: 'setInterval'
241
- error_message: 'setInterval has several drawbacks, most of '
242
- 'all difficulty canceling and surprising behavior '
243
- 'when the device goes to sleep. Please use '
244
- 'shaka.util.Timer instead.'
245
- whitelist_regexp: 'demo/'
246
- whitelist_regexp: 'test/'
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: 'window.setTimeout'
253
- error_message: 'setTimeout has several drawbacks, most of '
254
- 'all difficulty canceling it. Please use '
255
- 'shaka.util.Timer instead.'
256
- whitelist_regexp: 'demo/'
257
- whitelist_regexp: 'test/'
258
- whitelist_regexp: 'lib/util/delayed_tick.js'
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: 'setTimeout'
263
- error_message: 'setTimeout has several drawbacks, most of '
264
- 'all difficulty canceling it. Please use '
265
- 'shaka.util.Timer instead.'
266
- whitelist_regexp: 'demo/'
267
- whitelist_regexp: 'test/'
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: 'window.eval'
275
- error_message: 'Using "eval" is not allowed'
276
- whitelist_regexp: 'demo/demo_utils.js'
277
- whitelist_regexp: 'node_modules/google-closure-library/closure/goog/base.js'
278
- whitelist_regexp: 'test/util/functional_unit.js'
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: 'eval'
283
- error_message: 'Using "eval" is not allowed'
284
- whitelist_regexp: 'demo/demo_utils.js'
285
- whitelist_regexp: 'node_modules/google-closure-library/closure/goog/base.js'
286
- whitelist_regexp: 'test/util/functional_unit.js'
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: 'ArrayBuffer.prototype.slice'
294
- error_message: 'ArrayBuffer.slice is not allowed because it '
295
- 'is not supported on Tizen 2016'
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: 'fetch'
303
- value: 'window.fetch'
304
- error_message: 'Using "fetch" directly is not allowed; '
305
- 'use shaka.test.Util.fetch or NetworkingEngine.request '
306
- 'instead.'
307
- whitelist_regexp: 'lib/net/http_fetch_plugin.js'
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/dist/controls.css CHANGED
@@ -51,4 +51,4 @@
51
51
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
52
52
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53
53
  * SOFTWARE.
54
- */.shaka-tooltips-on{overflow:visible}.shaka-tooltips-on>[class*=shaka-tooltip]{position:relative}.shaka-tooltips-on>[class*=shaka-tooltip]:active:after,.shaka-tooltips-on>[class*=shaka-tooltip]:focus-visible:after,.shaka-tooltips-on>[class*=shaka-tooltip]:hover:after{content:attr(aria-label);font-family:Roboto-Regular,Roboto,sans-serif;line-height:16px;white-space:nowrap;font-size:13px;background:rgba(35,35,35,.9);color:#fff;border-radius:3px;padding:5px 10px;position:absolute;bottom:37px;left:16px;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.shaka-tooltips-on>.shaka-tooltip-status:active:after,.shaka-tooltips-on>.shaka-tooltip-status:focus-visible:after,.shaka-tooltips-on>.shaka-tooltip-status:hover:after{content:attr(aria-label) " (" attr(shaka-status) ")"}.shaka-tooltips-on button:first-child:active:after,.shaka-tooltips-on button:first-child:focus-visible:after,.shaka-tooltips-on button:first-child:hover:after{left:0;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}.shaka-tooltips-on button:last-child:active:after,.shaka-tooltips-on button:last-child:focus-visible:after,.shaka-tooltips-on button:last-child:hover:after{left:32px;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxP.ttf) format('truetype')}@font-face{font-family:'Material Icons Round';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialiconsround/v93/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmM.otf) format('opentype')}.material-icons-round{font-family:'Material Icons Round';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}/*# sourceMappingURL=controls.css.map */
54
+ */.shaka-tooltips-on{overflow:visible}.shaka-tooltips-on>[class*=shaka-tooltip]{position:relative}.shaka-tooltips-on>[class*=shaka-tooltip]:active:after,.shaka-tooltips-on>[class*=shaka-tooltip]:focus-visible:after,.shaka-tooltips-on>[class*=shaka-tooltip]:hover:after{content:attr(aria-label);font-family:Roboto-Regular,Roboto,sans-serif;line-height:16px;white-space:nowrap;font-size:13px;background:rgba(35,35,35,.9);color:#fff;border-radius:3px;padding:5px 10px;position:absolute;bottom:37px;left:16px;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.shaka-tooltips-on>.shaka-tooltip-status:active:after,.shaka-tooltips-on>.shaka-tooltip-status:focus-visible:after,.shaka-tooltips-on>.shaka-tooltip-status:hover:after{content:attr(aria-label) " (" attr(shaka-status) ")"}.shaka-tooltips-on button:first-child:active:after,.shaka-tooltips-on button:first-child:focus-visible:after,.shaka-tooltips-on button:first-child:hover:after{left:0;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}.shaka-tooltips-on button:last-child:active:after,.shaka-tooltips-on button:last-child:focus-visible:after,.shaka-tooltips-on button:last-child:hover:after{left:32px;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/roboto/v29/KFOmCnqEu92Fr1Mu4mxP.ttf) format('truetype')}@font-face{font-family:'Material Icons Round';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialiconsround/v94/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmM.otf) format('opentype')}.material-icons-round{font-family:'Material Icons Round';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}/*# sourceMappingURL=controls.css.map */
package/dist/deps.js CHANGED
@@ -143,7 +143,7 @@ goog.addDependency('../../../../lib/text/web_vtt_generator.js', ['shaka.text.Web
143
143
  goog.addDependency('../../../../lib/util/abortable_operation.js', ['shaka.util.AbortableOperation'], ['shaka.util.Error', 'shaka.util.PublicPromise'], {});
144
144
  goog.addDependency('../../../../lib/util/array_utils.js', ['shaka.util.ArrayUtils'], [], {});
145
145
  goog.addDependency('../../../../lib/util/buffer_utils.js', ['shaka.util.BufferUtils'], ['shaka.util.Iterables'], {});
146
- goog.addDependency('../../../../lib/util/cmcd_manager.js', ['shaka.util.CmcdManager'], ['shaka.log'], {});
146
+ goog.addDependency('../../../../lib/util/cmcd_manager.js', ['shaka.util.CmcdManager'], ['goog.Uri', 'shaka.log'], {});
147
147
  goog.addDependency('../../../../lib/util/config_utils.js', ['shaka.util.ConfigUtils'], ['goog.asserts', 'shaka.log', 'shaka.util.ObjectUtils'], {});
148
148
  goog.addDependency('../../../../lib/util/data_view_reader.js', ['shaka.util.DataViewReader'], ['goog.asserts', 'shaka.util.BufferUtils', 'shaka.util.Error', 'shaka.util.StringUtils'], {});
149
149
  goog.addDependency('../../../../lib/util/delayed_tick.js', ['shaka.util.DelayedTick'], [], {});
package/dist/locales.js CHANGED
@@ -720,44 +720,44 @@ shaka.ui.Locales.addTo = function(localization) {
720
720
  * @const
721
721
  */
722
722
  shaka.ui.Locales.Ids = {
723
- EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
724
- FAST_FORWARD: 'FAST_FORWARD',
725
- SKIP_TO_LIVE: 'SKIP_TO_LIVE',
726
723
  MORE_SETTINGS: 'MORE_SETTINGS',
727
- LIVE: 'LIVE',
728
- REWIND: 'REWIND',
729
- NOT_APPLICABLE: 'NOT_APPLICABLE',
730
- STATISTICS: 'STATISTICS',
724
+ ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
725
+ AD_DURATION: 'AD_DURATION',
726
+ SEEK: 'SEEK',
727
+ AIRPLAY: 'AIRPLAY',
728
+ REPLAY: 'REPLAY',
729
+ LOOP: 'LOOP',
730
+ RESOLUTION: 'RESOLUTION',
731
+ SKIP_TO_LIVE: 'SKIP_TO_LIVE',
732
+ EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
733
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
734
+ MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
735
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
736
+ AD_TIME: 'AD_TIME',
737
+ SKIP_AD: 'SKIP_AD',
731
738
  LANGUAGE: 'LANGUAGE',
732
739
  FULL_SCREEN: 'FULL_SCREEN',
733
- UNMUTE: 'UNMUTE',
734
740
  SUBTITLE_FORCED: 'SUBTITLE_FORCED',
735
- AD_PROGRESS: 'AD_PROGRESS',
736
- RESOLUTION: 'RESOLUTION',
737
741
  EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
738
- AIRPLAY: 'AIRPLAY',
739
- CAST: 'CAST',
740
- CAPTIONS: 'CAPTIONS',
741
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
742
- MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
743
742
  VOLUME: 'VOLUME',
744
- BACK: 'BACK',
743
+ CAPTIONS: 'CAPTIONS',
744
+ STATISTICS: 'STATISTICS',
745
745
  MUTE: 'MUTE',
746
- OFF: 'OFF',
747
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
748
- ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
749
- REPLAY: 'REPLAY',
750
- PLAYBACK_RATE: 'PLAYBACK_RATE',
751
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
752
- AD_TIME: 'AD_TIME',
753
746
  ON: 'ON',
747
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
748
+ EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
749
+ PAUSE: 'PAUSE',
750
+ FAST_FORWARD: 'FAST_FORWARD',
751
+ BACK: 'BACK',
752
+ PLAY: 'PLAY',
753
+ CAST: 'CAST',
754
+ UNMUTE: 'UNMUTE',
754
755
  ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
756
+ REWIND: 'REWIND',
757
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
758
+ LIVE: 'LIVE',
755
759
  AUTO_QUALITY: 'AUTO_QUALITY',
756
- PLAY: 'PLAY',
757
- AD_DURATION: 'AD_DURATION',
758
- SKIP_AD: 'SKIP_AD',
759
- PAUSE: 'PAUSE',
760
- LOOP: 'LOOP',
761
- SEEK: 'SEEK',
762
- EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
760
+ OFF: 'OFF',
761
+ AD_PROGRESS: 'AD_PROGRESS',
762
+ NOT_APPLICABLE: 'NOT_APPLICABLE',
763
763
  };