mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06: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:
parent
27aff12a1e
commit
55a011b9c1
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue