aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/videojs-components
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/videojs-components')
-rw-r--r--client/src/assets/player/videojs-components/resolution-menu-button.ts2
-rw-r--r--client/src/assets/player/videojs-components/settings-menu-button.ts18
-rw-r--r--client/src/assets/player/videojs-components/settings-menu-item.ts10
3 files changed, 15 insertions, 15 deletions
diff --git a/client/src/assets/player/videojs-components/resolution-menu-button.ts b/client/src/assets/player/videojs-components/resolution-menu-button.ts
index abcc16411..cff44de72 100644
--- a/client/src/assets/player/videojs-components/resolution-menu-button.ts
+++ b/client/src/assets/player/videojs-components/resolution-menu-button.ts
@@ -49,7 +49,7 @@ class ResolutionMenuButton extends MenuButton {
49 49
50 private addClickListener (component: any) { 50 private addClickListener (component: any) {
51 component.on('click', () => { 51 component.on('click', () => {
52 let children = this.menu.children() 52 const children = this.menu.children()
53 53
54 for (const child of children) { 54 for (const child of children) {
55 if (component !== child) { 55 if (component !== child) {
diff --git a/client/src/assets/player/videojs-components/settings-menu-button.ts b/client/src/assets/player/videojs-components/settings-menu-button.ts
index 14cb8ba43..5e09032b4 100644
--- a/client/src/assets/player/videojs-components/settings-menu-button.ts
+++ b/client/src/assets/player/videojs-components/settings-menu-button.ts
@@ -53,7 +53,7 @@ class SettingsButton extends Button {
53 53
54 onDisposeSettingsItem (event: any, name: string) { 54 onDisposeSettingsItem (event: any, name: string) {
55 if (name === undefined) { 55 if (name === undefined) {
56 let children = this.menu.children() 56 const children = this.menu.children()
57 57
58 while (children.length > 0) { 58 while (children.length > 0) {
59 children[0].dispose() 59 children[0].dispose()
@@ -62,7 +62,7 @@ class SettingsButton extends Button {
62 62
63 this.addClass('vjs-hidden') 63 this.addClass('vjs-hidden')
64 } else { 64 } else {
65 let item = this.menu.getChild(name) 65 const item = this.menu.getChild(name)
66 66
67 if (item) { 67 if (item) {
68 item.dispose() 68 item.dispose()
@@ -148,8 +148,8 @@ class SettingsButton extends Button {
148 return 148 return
149 } 149 }
150 150
151 let offset = this.options_.setup.maxHeightOffset 151 const offset = this.options_.setup.maxHeightOffset
152 let maxHeight = this.playerComponent.el_.offsetHeight - offset 152 const maxHeight = this.playerComponent.el_.offsetHeight - offset
153 153
154 if (height > maxHeight) { 154 if (height > maxHeight) {
155 height = maxHeight 155 height = maxHeight
@@ -166,7 +166,7 @@ class SettingsButton extends Button {
166 buildMenu () { 166 buildMenu () {
167 this.menu = new Menu(this.player()) 167 this.menu = new Menu(this.player())
168 this.menu.addClass('vjs-main-menu') 168 this.menu.addClass('vjs-main-menu')
169 let entries = this.options_.entries 169 const entries = this.options_.entries
170 170
171 if (entries.length === 0) { 171 if (entries.length === 0) {
172 this.addClass('vjs-hidden') 172 this.addClass('vjs-hidden')
@@ -174,7 +174,7 @@ class SettingsButton extends Button {
174 return 174 return
175 } 175 }
176 176
177 for (let entry of entries) { 177 for (const entry of entries) {
178 this.addMenuItem(entry, this.options_) 178 this.addMenuItem(entry, this.options_)
179 } 179 }
180 180
@@ -191,7 +191,7 @@ class SettingsButton extends Button {
191 } 191 }
192 192
193 options.name = toTitleCase(entry) 193 options.name = toTitleCase(entry)
194 let settingsMenuItem = new SettingsMenuItem(this.player(), options, entry, this as any) 194 const settingsMenuItem = new SettingsMenuItem(this.player(), options, entry, this as any)
195 195
196 this.menu.addChild(settingsMenuItem) 196 this.menu.addChild(settingsMenuItem)
197 197
@@ -204,7 +204,7 @@ class SettingsButton extends Button {
204 } 204 }
205 205
206 resetChildren () { 206 resetChildren () {
207 for (let menuChild of this.menu.children()) { 207 for (const menuChild of this.menu.children()) {
208 menuChild.reset() 208 menuChild.reset()
209 } 209 }
210 } 210 }
@@ -213,7 +213,7 @@ class SettingsButton extends Button {
213 * Hide all the sub menus 213 * Hide all the sub menus
214 */ 214 */
215 hideChildren () { 215 hideChildren () {
216 for (let menuChild of this.menu.children()) { 216 for (const menuChild of this.menu.children()) {
217 menuChild.hideSubMenu() 217 menuChild.hideSubMenu()
218 } 218 }
219 } 219 }
diff --git a/client/src/assets/player/videojs-components/settings-menu-item.ts b/client/src/assets/player/videojs-components/settings-menu-item.ts
index f14959f9c..78879a2ec 100644
--- a/client/src/assets/player/videojs-components/settings-menu-item.ts
+++ b/client/src/assets/player/videojs-components/settings-menu-item.ts
@@ -167,7 +167,7 @@ class SettingsMenuItem extends MenuItem {
167 * @method PrefixedEvent 167 * @method PrefixedEvent
168 */ 168 */
169 PrefixedEvent (element: any, type: any, callback: any, action = 'addEvent') { 169 PrefixedEvent (element: any, type: any, callback: any, action = 'addEvent') {
170 let prefix = ['webkit', 'moz', 'MS', 'o', ''] 170 const prefix = ['webkit', 'moz', 'MS', 'o', '']
171 171
172 for (let p = 0; p < prefix.length; p++) { 172 for (let p = 0; p < prefix.length; p++) {
173 if (!prefix[p]) { 173 if (!prefix[p]) {
@@ -249,7 +249,7 @@ class SettingsMenuItem extends MenuItem {
249 249
250 update (event?: any) { 250 update (event?: any) {
251 let target: HTMLElement = null 251 let target: HTMLElement = null
252 let subMenu = this.subMenu.name() 252 const subMenu = this.subMenu.name()
253 253
254 if (event && event.type === 'tap') { 254 if (event && event.type === 'tap') {
255 target = event.target 255 target = event.target
@@ -264,7 +264,7 @@ class SettingsMenuItem extends MenuItem {
264 setTimeout(() => this.settingsSubMenuValueEl_.innerHTML = this.subMenu.labelEl_.innerHTML, 250) 264 setTimeout(() => this.settingsSubMenuValueEl_.innerHTML = this.subMenu.labelEl_.innerHTML, 250)
265 } else { 265 } else {
266 // Loop trough the submenu items to find the selected child 266 // Loop trough the submenu items to find the selected child
267 for (let subMenuItem of this.subMenu.menu.children_) { 267 for (const subMenuItem of this.subMenu.menu.children_) {
268 if (!(subMenuItem instanceof component)) { 268 if (!(subMenuItem instanceof component)) {
269 continue 269 continue
270 } 270 }
@@ -287,7 +287,7 @@ class SettingsMenuItem extends MenuItem {
287 } 287 }
288 288
289 bindClickEvents () { 289 bindClickEvents () {
290 for (let item of this.subMenu.menu.children()) { 290 for (const item of this.subMenu.menu.children()) {
291 if (!(item instanceof component)) { 291 if (!(item instanceof component)) {
292 continue 292 continue
293 } 293 }
@@ -307,7 +307,7 @@ class SettingsMenuItem extends MenuItem {
307 } 307 }
308 308
309 setMargin () { 309 setMargin () {
310 let [width] = this.size 310 const [ width ] = this.size
311 311
312 this.settingsSubMenuEl_.style.marginRight = `-${width}px` 312 this.settingsSubMenuEl_.style.marginRight = `-${width}px`
313 } 313 }