Add 'ready' promise
This commit is contained in:
parent
aab2817ddc
commit
2af60c5c0d
@ -111,3 +111,9 @@ export function unbindListeners() {
|
||||
this.eventListeners = [];
|
||||
}
|
||||
}
|
||||
|
||||
// Run method when / if player is ready
|
||||
export function ready () {
|
||||
return new Promise(resolve => this.ready ? setTimeout(resolve, 0) : on.call(this, this.elements.container, 'ready', resolve))
|
||||
.then(() => {});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user