summaryrefslogtreecommitdiffstats
path: root/assets/js/player.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/player.js')
-rw-r--r--assets/js/player.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/assets/js/player.js b/assets/js/player.js
index 16bb2752..71c5e7da 100644
--- a/assets/js/player.js
+++ b/assets/js/player.js
@@ -747,6 +747,17 @@ if (navigator.vendor === 'Apple Computer, Inc.' && video_data.params.listen) {
});
}
+// Safari screen timeout on looped video playback fix
+if (navigator.vendor === 'Apple Computer, Inc.' && !video_data.params.listen && video_data.params.video_loop) {
+ player.loop(false);
+ player.ready(function () {
+ player.on('ended', function () {
+ player.currentTime(0);
+ player.play();
+ });
+ });
+}
+
// Watch on Invidious link
if (location.pathname.startsWith('/embed/')) {
const Button = videojs.getComponent('Button');