player.ready(() => {
// Voodoo magic for IOS
setTimeout(() => {
+ // Player was destroyed
+ if (!this.player_) return
+
this.build()
// Update on rate change
* @method PrefixedEvent
*/
PrefixedEvent (element: any, type: any, callback: any, action = 'addEvent') {
- let prefix = ['webkit', 'moz', 'MS', 'o', '']
+ const prefix = ['webkit', 'moz', 'MS', 'o', '']
for (let p = 0; p < prefix.length; p++) {
if (!prefix[p]) {
update (event?: any) {
let target: HTMLElement = null
- let subMenu = this.subMenu.name()
+ const subMenu = this.subMenu.name()
if (event && event.type === 'tap') {
target = event.target
setTimeout(() => this.settingsSubMenuValueEl_.innerHTML = this.subMenu.labelEl_.innerHTML, 250)
} else {
// Loop trough the submenu items to find the selected child
- for (let subMenuItem of this.subMenu.menu.children_) {
+ for (const subMenuItem of this.subMenu.menu.children_) {
if (!(subMenuItem instanceof component)) {
continue
}
}
bindClickEvents () {
- for (let item of this.subMenu.menu.children()) {
+ for (const item of this.subMenu.menu.children()) {
if (!(item instanceof component)) {
continue
}
}
setMargin () {
- let [width] = this.size
+ const [ width ] = this.size
this.settingsSubMenuEl_.style.marginRight = `-${width}px`
}