Try fixing video in Safari

This commit is contained in:
Andras Schmelczer 2022-09-26 10:48:01 +02:00
parent 6da07f5bce
commit c9f14cd078
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E

View file

@ -9,9 +9,10 @@ export class Video extends PageElement {
this.query('.start-button').addEventListener('click', this.startVideo.bind(this));
}
private startVideo() {
private async startVideo() {
this.query('.start-button').style.visibility = 'hidden';
this.htmlRoot.classList.add('loaded');
(this.query('video') as HTMLVideoElement).play();
await (this.query('video') as HTMLVideoElement).play();
}
}