mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-04 06:31:57 +00:00 
			
		
		
		
	Player: Fix iOS screen timeout in loop mode (#4076)
This commit is contained in:
		@@ -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');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user