shaka-player 2.5.4 → 2.5.5
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/.csslintrc +13 -0
- package/CHANGELOG.md +56 -0
- package/build/build.py +4 -1
- package/build/check.py +17 -0
- package/build/compiler.py +40 -0
- package/build/types/core +1 -0
- package/build/types/ui +4 -1
- package/demo/asset_card.js +41 -11
- package/demo/cast_receiver/receiver_app.css +19 -13
- package/demo/close_button.js +0 -6
- package/demo/common/asset.js +6 -1
- package/demo/common/assets.js +72 -14
- package/demo/demo.less +105 -16
- package/demo/index.html +8 -5
- package/demo/load.js +5 -7
- package/demo/main.js +81 -16
- package/dist/.csslintstamp +0 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +46 -39
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +46 -39
- package/dist/demo.compiled.map +3 -3
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +11 -7
- package/dist/receiver.compiled.debug.js +10 -6
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +10 -6
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.debug.externs.js +123 -92
- package/dist/shaka-player.compiled.debug.js +113 -105
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +123 -92
- package/dist/shaka-player.compiled.js +551 -548
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.debug.externs.js +170 -101
- package/dist/shaka-player.ui.debug.js +187 -188
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +170 -101
- package/dist/shaka-player.ui.js +651 -651
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/drm-config.md +1 -0
- package/docs/tutorials/fairplay.md +77 -0
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/ui-customization.md +3 -0
- package/docs/tutorials/ui.md +3 -1
- package/externs/mediasession.js +16 -1
- package/externs/shaka/net.js +5 -1
- package/externs/shaka/player.js +136 -90
- package/externs/webkitmediakeys.js +4 -0
- package/lib/dash/content_protection.js +33 -1
- package/lib/dash/dash_parser.js +12 -4
- package/lib/hls/hls_parser.js +20 -4
- package/lib/media/drm_engine.js +29 -2
- package/lib/media/media_source_engine.js +7 -3
- package/lib/media/playhead.js +8 -3
- package/lib/media/streaming_engine.js +24 -8
- package/lib/media/video_wrapper.js +8 -3
- package/lib/net/networking_engine.js +1 -0
- package/lib/player.js +3 -2
- package/lib/polyfill/patchedmediakeys_apple.js +2 -72
- package/lib/util/error.js +12 -0
- package/lib/util/fairplay_utils.js +122 -0
- package/lib/util/player_configuration.js +5 -0
- package/lib/util/pssh.js +41 -0
- package/package.json +4 -3
- package/shaka-player.uncompiled.js +5 -1
- package/test/dash/dash_parser_content_protection_unit.js +35 -1
- package/test/dash/dash_parser_manifest_unit.js +31 -0
- package/test/hls/hls_live_unit.js +7 -1
- package/test/hls/hls_parser_unit.js +50 -0
- package/test/media/media_source_engine_integration.js +12 -0
- package/test/media/playhead_unit.js +2 -0
- package/test/player_external.js +3 -2
- package/test/player_integration.js +75 -0
- package/test/test/externs/jasmine.js +6 -0
- package/test/test/util/test_scheme.js +32 -1
- package/test/test/util/ui_utils.js +41 -0
- package/test/ui/ui_unit.js +129 -3
- package/ui/audio_language_selection.js +17 -96
- package/ui/big_play_button.js +61 -0
- package/ui/controls.js +111 -86
- package/ui/controls.less +3 -5
- package/ui/externs/ui.js +14 -2
- package/ui/fullscreen_button.js +2 -52
- package/ui/less/buttons.less +8 -8
- package/ui/less/containers.less +21 -21
- package/ui/less/general.less +11 -0
- package/ui/less/other_elements.less +2 -1
- package/ui/less/overflow_menu.less +11 -10
- package/ui/less/range_elements.less +6 -0
- package/ui/less/spinner.less +2 -0
- package/ui/pip_button.js +1 -1
- package/ui/{play_pause_button.js → play_button.js} +17 -47
- package/ui/resolution_selection.js +41 -104
- package/ui/seek_bar.js +15 -17
- package/ui/settings_menu.js +113 -0
- package/ui/small_play_button.js +73 -0
- package/ui/text_displayer.js +2 -2
- package/ui/text_selection.js +39 -105
- package/ui/ui.js +12 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2016 Google Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
goog.provide('shaka.ui.SmallPlayButton');
|
|
20
|
+
|
|
21
|
+
goog.require('shaka.ui.PlayButton');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @extends {shaka.ui.PlayButton}
|
|
26
|
+
* @final
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
shaka.ui.SmallPlayButton = class extends shaka.ui.PlayButton {
|
|
30
|
+
/**
|
|
31
|
+
* @param {!HTMLElement} parent
|
|
32
|
+
* @param {!shaka.ui.Controls} controls
|
|
33
|
+
*/
|
|
34
|
+
constructor(parent, controls) {
|
|
35
|
+
super(parent, controls);
|
|
36
|
+
|
|
37
|
+
this.button.classList.add('shaka-small-play-button');
|
|
38
|
+
this.button.classList.add('material-icons');
|
|
39
|
+
|
|
40
|
+
this.updateIcon_();
|
|
41
|
+
this.updateAriaLabel();
|
|
42
|
+
|
|
43
|
+
this.eventManager.listen(this.video, 'play', () => {
|
|
44
|
+
this.updateIcon_();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
this.eventManager.listen(this.video, 'pause', () => {
|
|
48
|
+
this.updateIcon_();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/** @private */
|
|
54
|
+
updateIcon_() {
|
|
55
|
+
const Icons = shaka.ui.Enums.MaterialDesignIcons;
|
|
56
|
+
this.button.textContent = this.isPaused() ? Icons.PLAY : Icons.PAUSE;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @implements {shaka.extern.IUIElement.Factory}
|
|
63
|
+
* @final
|
|
64
|
+
*/
|
|
65
|
+
shaka.ui.SmallPlayButton.Factory = class {
|
|
66
|
+
/** @override */
|
|
67
|
+
create(rootElement, controls) {
|
|
68
|
+
return new shaka.ui.SmallPlayButton(rootElement, controls);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
shaka.ui.Controls.registerElement(
|
|
73
|
+
'play_pause', new shaka.ui.SmallPlayButton.Factory());
|
package/ui/text_displayer.js
CHANGED
|
@@ -198,8 +198,8 @@ shaka.ui.TextDisplayer = class {
|
|
|
198
198
|
const captionsStyle = captions.style;
|
|
199
199
|
const panelStyle = this.textContainer_.style;
|
|
200
200
|
|
|
201
|
-
// Set white-space to 'pre' to enable showing line breaks in the text.
|
|
202
|
-
captionsStyle.whiteSpace = 'pre';
|
|
201
|
+
// Set white-space to 'pre-line' to enable showing line breaks in the text.
|
|
202
|
+
captionsStyle.whiteSpace = 'pre-line';
|
|
203
203
|
captions.textContent = cue.payload;
|
|
204
204
|
captionsStyle.backgroundColor = cue.backgroundColor;
|
|
205
205
|
captionsStyle.color = cue.color;
|
package/ui/text_selection.js
CHANGED
|
@@ -18,31 +18,39 @@
|
|
|
18
18
|
|
|
19
19
|
goog.provide('shaka.ui.TextSelection');
|
|
20
20
|
|
|
21
|
-
goog.require('shaka.ui.Element');
|
|
22
21
|
goog.require('shaka.ui.Enums');
|
|
23
22
|
goog.require('shaka.ui.LanguageUtils');
|
|
24
23
|
goog.require('shaka.ui.Locales');
|
|
25
24
|
goog.require('shaka.ui.Localization');
|
|
26
25
|
goog.require('shaka.ui.OverflowMenu');
|
|
26
|
+
goog.require('shaka.ui.SettingsMenu');
|
|
27
27
|
goog.require('shaka.util.Dom');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* @extends {shaka.ui.
|
|
31
|
+
* @extends {shaka.ui.SettingsMenu}
|
|
32
32
|
* @final
|
|
33
33
|
* @export
|
|
34
34
|
*/
|
|
35
|
-
shaka.ui.TextSelection = class extends shaka.ui.
|
|
35
|
+
shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
|
|
36
36
|
/**
|
|
37
37
|
* @param {!HTMLElement} parent
|
|
38
38
|
* @param {!shaka.ui.Controls} controls
|
|
39
39
|
*/
|
|
40
40
|
constructor(parent, controls) {
|
|
41
|
-
super(parent,
|
|
41
|
+
super(parent,
|
|
42
|
+
controls, shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS);
|
|
42
43
|
|
|
43
|
-
this.
|
|
44
|
+
this.button.classList.add('shaka-caption-button');
|
|
45
|
+
this.menu.classList.add('shaka-text-languages');
|
|
44
46
|
|
|
45
|
-
this.
|
|
47
|
+
if (this.player && this.player.isTextTrackVisible()) {
|
|
48
|
+
this.button.setAttribute('aria-pressed', 'true');
|
|
49
|
+
} else {
|
|
50
|
+
this.button.setAttribute('aria-pressed', 'false');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
this.addOffOption_();
|
|
46
54
|
|
|
47
55
|
this.eventManager.listen(
|
|
48
56
|
this.localization, shaka.ui.Localization.LOCALE_UPDATED, () => {
|
|
@@ -66,10 +74,6 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
66
74
|
this.onCaptionStateChange_();
|
|
67
75
|
});
|
|
68
76
|
|
|
69
|
-
this.eventManager.listen(this.captionButton_, 'click', () => {
|
|
70
|
-
this.onCaptionClick_();
|
|
71
|
-
});
|
|
72
|
-
|
|
73
77
|
this.eventManager.listen(this.player, 'textchanged', () => {
|
|
74
78
|
this.updateTextLanguages_();
|
|
75
79
|
});
|
|
@@ -91,70 +95,10 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
91
95
|
/**
|
|
92
96
|
* @private
|
|
93
97
|
*/
|
|
94
|
-
|
|
95
|
-
/** @private {!HTMLElement} */
|
|
96
|
-
this.captionButton_ = shaka.util.Dom.createHTMLElement('button');
|
|
97
|
-
this.captionButton_.classList.add('shaka-caption-button');
|
|
98
|
-
|
|
99
|
-
/** @private {!HTMLElement} */
|
|
100
|
-
this.captionIcon_ = shaka.util.Dom.createHTMLElement('i');
|
|
101
|
-
this.captionIcon_.classList.add('material-icons');
|
|
102
|
-
this.captionIcon_.textContent =
|
|
103
|
-
shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS;
|
|
104
|
-
|
|
105
|
-
if (this.player && this.player.isTextTrackVisible()) {
|
|
106
|
-
this.captionButton_.setAttribute('aria-pressed', 'true');
|
|
107
|
-
} else {
|
|
108
|
-
this.captionButton_.setAttribute('aria-pressed', 'false');
|
|
109
|
-
}
|
|
110
|
-
this.captionButton_.appendChild(this.captionIcon_);
|
|
111
|
-
|
|
112
|
-
const label = shaka.util.Dom.createHTMLElement('label');
|
|
113
|
-
label.classList.add('shaka-overflow-button-label');
|
|
114
|
-
|
|
115
|
-
/** @private {!HTMLElement} */
|
|
116
|
-
this.captionsNameSpan_ = shaka.util.Dom.createHTMLElement('span');
|
|
117
|
-
|
|
118
|
-
label.appendChild(this.captionsNameSpan_);
|
|
119
|
-
|
|
120
|
-
/** @private {!HTMLElement} */
|
|
121
|
-
this.currentCaptions_ = shaka.util.Dom.createHTMLElement('span');
|
|
122
|
-
this.currentCaptions_.classList.add('shaka-current-selection-span');
|
|
123
|
-
label.appendChild(this.currentCaptions_);
|
|
124
|
-
this.captionButton_.appendChild(label);
|
|
125
|
-
this.parent.appendChild(this.captionButton_);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @private
|
|
131
|
-
*/
|
|
132
|
-
addTextLangMenu_() {
|
|
133
|
-
/** @private {!HTMLElement} */
|
|
134
|
-
this.textLangMenu_ = shaka.util.Dom.createHTMLElement('div');
|
|
135
|
-
this.textLangMenu_.classList.add('shaka-text-languages');
|
|
136
|
-
this.textLangMenu_.classList.add('shaka-no-propagation');
|
|
137
|
-
this.textLangMenu_.classList.add('shaka-show-controls-on-mouse-over');
|
|
138
|
-
this.textLangMenu_.classList.add('shaka-settings-menu');
|
|
139
|
-
|
|
140
|
-
/** @private {!HTMLElement} */
|
|
141
|
-
this.backFromCaptionsButton_ = shaka.util.Dom.createHTMLElement('button');
|
|
142
|
-
this.backFromCaptionsButton_.classList.add('shaka-back-to-overflow-button');
|
|
143
|
-
this.textLangMenu_.appendChild(this.backFromCaptionsButton_);
|
|
144
|
-
|
|
145
|
-
const backIcon = shaka.util.Dom.createHTMLElement('i');
|
|
146
|
-
backIcon.classList.add('material-icons');
|
|
147
|
-
backIcon.textContent = shaka.ui.Enums.MaterialDesignIcons.BACK;
|
|
148
|
-
this.backFromCaptionsButton_.appendChild(backIcon);
|
|
149
|
-
|
|
150
|
-
/** @private {!HTMLElement} */
|
|
151
|
-
this.backFromCaptionsSpan_ = shaka.util.Dom.createHTMLElement('span');
|
|
152
|
-
this.backFromCaptionsButton_.appendChild(this.backFromCaptionsSpan_);
|
|
153
|
-
|
|
154
|
-
// Add the off option
|
|
98
|
+
addOffOption_() {
|
|
155
99
|
const off = shaka.util.Dom.createHTMLElement('button');
|
|
156
100
|
off.setAttribute('aria-selected', 'true');
|
|
157
|
-
this.
|
|
101
|
+
this.menu.appendChild(off);
|
|
158
102
|
|
|
159
103
|
off.appendChild(shaka.ui.Utils.checkmarkIcon());
|
|
160
104
|
|
|
@@ -163,31 +107,19 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
163
107
|
|
|
164
108
|
this.captionsOffSpan_.classList.add('shaka-auto-span');
|
|
165
109
|
off.appendChild(this.captionsOffSpan_);
|
|
166
|
-
|
|
167
|
-
const controlsContainer = this.controls.getControlsContainer();
|
|
168
|
-
controlsContainer.appendChild(this.textLangMenu_);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
/** @private */
|
|
173
|
-
onCaptionClick_() {
|
|
174
|
-
this.controls.dispatchEvent(new shaka.util.FakeEvent('submenuopen'));
|
|
175
|
-
shaka.ui.Utils.setDisplay(this.textLangMenu_, true);
|
|
176
|
-
// Focus on the currently selected language button.
|
|
177
|
-
shaka.ui.Utils.focusOnTheChosenItem(this.textLangMenu_);
|
|
178
110
|
}
|
|
179
111
|
|
|
180
112
|
|
|
181
113
|
/** @private */
|
|
182
114
|
onCaptionStateChange_() {
|
|
183
115
|
if (this.player.isTextTrackVisible()) {
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
116
|
+
this.icon.classList.add('shaka-captions-on');
|
|
117
|
+
this.icon.classList.remove('shaka-captions-off');
|
|
118
|
+
this.button.setAttribute('aria-pressed', 'true');
|
|
187
119
|
} else {
|
|
188
|
-
this.
|
|
189
|
-
this.
|
|
190
|
-
this.
|
|
120
|
+
this.icon.classList.add('shaka-captions-off');
|
|
121
|
+
this.icon.classList.remove('shaka-captions-on');
|
|
122
|
+
this.button.setAttribute('aria-pressed', 'false');
|
|
191
123
|
}
|
|
192
124
|
|
|
193
125
|
// TODO: document this event
|
|
@@ -204,13 +136,15 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
204
136
|
return langAndRole.language;
|
|
205
137
|
});
|
|
206
138
|
|
|
207
|
-
shaka.ui.LanguageUtils.updateLanguages(tracks, this.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
139
|
+
shaka.ui.LanguageUtils.updateLanguages(tracks, this.menu,
|
|
140
|
+
languages,
|
|
141
|
+
(lang) => this.onTextLanguageSelected_(lang),
|
|
142
|
+
|
|
143
|
+
// Don't mark current text language as chosen unless captions are
|
|
144
|
+
// enabled
|
|
145
|
+
this.player.isTextTrackVisible(),
|
|
146
|
+
this.currentSelection,
|
|
147
|
+
this.localization);
|
|
214
148
|
|
|
215
149
|
// Add the Off button
|
|
216
150
|
const offButton = shaka.util.Dom.createHTMLElement('button');
|
|
@@ -223,17 +157,17 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
223
157
|
|
|
224
158
|
offButton.appendChild(this.captionsOffSpan_);
|
|
225
159
|
|
|
226
|
-
this.
|
|
160
|
+
this.menu.appendChild(offButton);
|
|
227
161
|
|
|
228
162
|
if (!this.player.isTextTrackVisible()) {
|
|
229
163
|
offButton.setAttribute('aria-selected', 'true');
|
|
230
164
|
offButton.appendChild(shaka.ui.Utils.checkmarkIcon());
|
|
231
165
|
this.captionsOffSpan_.classList.add('shaka-chosen-item');
|
|
232
|
-
this.
|
|
166
|
+
this.currentSelection.textContent =
|
|
233
167
|
this.localization.resolve(shaka.ui.Locales.Ids.OFF);
|
|
234
168
|
}
|
|
235
169
|
|
|
236
|
-
shaka.ui.Utils.focusOnTheChosenItem(this.
|
|
170
|
+
shaka.ui.Utils.focusOnTheChosenItem(this.menu);
|
|
237
171
|
|
|
238
172
|
// TODO: document this event
|
|
239
173
|
this.controls.dispatchEvent(
|
|
@@ -260,13 +194,13 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
260
194
|
updateLocalizedStrings_() {
|
|
261
195
|
const LocIds = shaka.ui.Locales.Ids;
|
|
262
196
|
|
|
263
|
-
this.
|
|
197
|
+
this.button.setAttribute(shaka.ui.Constants.ARIA_LABEL,
|
|
264
198
|
this.localization.resolve(LocIds.CAPTIONS));
|
|
265
|
-
this.
|
|
199
|
+
this.backButton.setAttribute(shaka.ui.Constants.ARIA_LABEL,
|
|
266
200
|
this.localization.resolve(LocIds.BACK));
|
|
267
|
-
this.
|
|
201
|
+
this.nameSpan.textContent =
|
|
268
202
|
this.localization.resolve(LocIds.CAPTIONS);
|
|
269
|
-
this.
|
|
203
|
+
this.backSpan.textContent =
|
|
270
204
|
this.localization.resolve(LocIds.CAPTIONS);
|
|
271
205
|
this.captionsOffSpan_.textContent =
|
|
272
206
|
this.localization.resolve(LocIds.OFF);
|
|
@@ -276,7 +210,7 @@ shaka.ui.TextSelection = class extends shaka.ui.Element {
|
|
|
276
210
|
/** @private */
|
|
277
211
|
onTracksChanged_() {
|
|
278
212
|
const hasText = this.player.getTextTracks().length > 0;
|
|
279
|
-
shaka.ui.Utils.setDisplay(this.
|
|
213
|
+
shaka.ui.Utils.setDisplay(this.button, hasText);
|
|
280
214
|
this.updateTextLanguages_();
|
|
281
215
|
}
|
|
282
216
|
};
|
package/ui/ui.js
CHANGED
|
@@ -193,7 +193,9 @@ shaka.ui.Overlay.prototype.defaultConfig_ = function() {
|
|
|
193
193
|
'cast',
|
|
194
194
|
],
|
|
195
195
|
addSeekBar: true,
|
|
196
|
+
addBigPlayButton: true,
|
|
196
197
|
castReceiverAppId: '',
|
|
198
|
+
clearBufferOnQualityChange: true,
|
|
197
199
|
};
|
|
198
200
|
};
|
|
199
201
|
|
|
@@ -234,6 +236,11 @@ shaka.ui.Overlay.scanPageForShakaElements_ = function() {
|
|
|
234
236
|
// Just the video elements were provided.
|
|
235
237
|
for (let i = 0; i < videos.length; i++) {
|
|
236
238
|
const video = videos[i];
|
|
239
|
+
// If the app has already manually created a UI for this element,
|
|
240
|
+
// don't create another one.
|
|
241
|
+
if (video['ui']) {
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
237
244
|
goog.asserts.assert(video.tagName.toLowerCase() == 'video',
|
|
238
245
|
'Should be a video element!');
|
|
239
246
|
|
|
@@ -263,6 +270,11 @@ shaka.ui.Overlay.scanPageForShakaElements_ = function() {
|
|
|
263
270
|
} else {
|
|
264
271
|
for (let i = 0; i < containers.length; i++) {
|
|
265
272
|
const container = containers[i];
|
|
273
|
+
// If the app has already manually created a UI for this element,
|
|
274
|
+
// don't create another one.
|
|
275
|
+
if (container['ui']) {
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
266
278
|
goog.asserts.assert(container.tagName.toLowerCase() == 'div',
|
|
267
279
|
'Container should be a div!');
|
|
268
280
|
|