diff options
| author | Samantaz Fox <coding@samantaz.fr> | 2023-12-06 18:19:31 +0100 |
|---|---|---|
| committer | Samantaz Fox <coding@samantaz.fr> | 2023-12-06 18:19:31 +0100 |
| commit | 813dc6de1ca708f9babe7db9c4451c585e0dd20f (patch) | |
| tree | 377508e16e2ff50e61a50905ca32ae72e3a9b3eb /assets | |
| parent | 72478ba7048f036f07b9623690d560708334c46f (diff) | |
| parent | 27d8fa112dad0b531d4e3f24045975a1869ab2ff (diff) | |
| download | invidious-813dc6de1ca708f9babe7db9c4451c585e0dd20f.tar.gz invidious-813dc6de1ca708f9babe7db9c4451c585e0dd20f.tar.bz2 invidious-813dc6de1ca708f9babe7db9c4451c585e0dd20f.zip | |
Player: Fix iOS screen timeout in loop mode (#4076)
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/player.js | 11 |
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'); |
