mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-03 21:43:12 +00:00 
			
		
		
		
	fix jank when trying to play a corrupt audio file
if a song fails to play for some reason (network loss, corrupt file), a timer plays the next track after 5s the timer was not cancelled if the user started another track in the meantime
This commit is contained in:
		@@ -3061,6 +3061,7 @@ var afilt = (function () {
 | 
			
		||||
 | 
			
		||||
// plays the tid'th audio file on the page
 | 
			
		||||
function play(tid, is_ev, seek) {
 | 
			
		||||
	clearTimeout(mpl.t_eplay);
 | 
			
		||||
	if (mp.order.length == 0)
 | 
			
		||||
		return console.log('no audio found wait what');
 | 
			
		||||
 | 
			
		||||
@@ -3193,7 +3194,7 @@ function play(tid, is_ev, seek) {
 | 
			
		||||
		toast.err(0, esc(L.mm_playerr + basenames(ex)));
 | 
			
		||||
	}
 | 
			
		||||
	clmod(ebi(oid), 'act');
 | 
			
		||||
	setTimeout(next_song, 5000);
 | 
			
		||||
	mpl.t_eplay = setTimeout(next_song, 5000);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -3271,7 +3272,7 @@ function evau_error(e) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setTimeout(next_song, 15000);
 | 
			
		||||
	mpl.t_eplay = setTimeout(next_song, 15000);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user