Commit fc659c9f authored by Mark Harding's avatar Mark Harding

(fix): attempt to resolve promises to stop exceptions - closes #2034

parent 0ae1203f
No related merge requests found
Pipeline #85961094 waiting for manual action with stages
in 62 minutes and 38 seconds
......@@ -115,33 +115,33 @@ export class MindsVideoDirectHttpPlayer
return this.player.nativeElement;
}
play() {
async play() {
const player = this.getPlayer();
try {
player.play();
await player.play();
} catch (e) {
console.log(e);
}
}
pause() {
async pause() {
const player = this.getPlayer();
try {
player.pause();
await player.pause();
} catch (e) {
console.log(e);
}
}
toggle() {
async toggle() {
const player = this.getPlayer();
if (player.paused) {
this.play();
await this.play();
} else {
this.pause();
await this.pause();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment