From 90846bb498c435f7678915134abb728182e9db94 Mon Sep 17 00:00:00 2001 From: Jannik Stehle Date: Mon, 6 Dec 2021 17:41:22 +0100 Subject: [PATCH] Fix video playback in Safari --- src/scripts/ViewerControlsVideo.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/scripts/ViewerControlsVideo.vue b/src/scripts/ViewerControlsVideo.vue index 8969a785..f08c9602 100644 --- a/src/scripts/ViewerControlsVideo.vue +++ b/src/scripts/ViewerControlsVideo.vue @@ -48,7 +48,8 @@ export default { mousePos : { type : Number, default : 0 - } + }, + initialized: false }; }, methods : { @@ -118,6 +119,8 @@ export default { this.mousePos = Math.round(pct / 100 * this.duration); }); + + this.initialized = true; }, handleError () { @@ -163,7 +166,9 @@ export default { }, mounted () { this.$bus.$on('swiper:slideChangeTransitionEnd', () => { - this.init(); + if (this.initialized) { + this.init(); + } }); this.$bus.$on('swiper:init', () => { this.init();