From c9f14cd07833d152346240880f77fbc9afa22e23 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Mon, 26 Sep 2022 10:48:01 +0200 Subject: [PATCH] Try fixing video in Safari --- src/page/video/video.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/page/video/video.ts b/src/page/video/video.ts index aa6c5e3..6a45635 100644 --- a/src/page/video/video.ts +++ b/src/page/video/video.ts @@ -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(); } }