diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js
index 99868864..b42bf2e5 100644
--- a/copyparty/web/browser.js
+++ b/copyparty/web/browser.js
@@ -244,6 +244,7 @@ var Ls = {
"mt_preload": "start loading the next song near the end for gapless playback\">preload",
"mt_prescan": "go to the next folder before the last song$Nends, keeping the webbrowser happy$Nso it doesn't stop the playback\">nav",
"mt_fullpre": "try to preload the entire song;$N✅ enable on unreliable connections,$N❌ disable on slow connections probably\">full",
+ "mt_fau": "on phones, prevent music from stopping if the next song doesn't preload fast enough (can make tags display glitchy)\">☕️",
"mt_waves": "waveform seekbar:$Nshow audio amplitude in the scrubber\">~s",
"mt_npclip": "show buttons for clipboarding the currently playing song\">/np",
"mt_octl": "os integration (media hotkeys / osd)\">os-ctl",
@@ -745,6 +746,7 @@ var Ls = {
"mt_preload": "hent ned litt av neste sang i forkant,$Nslik at pausen i overgangen blir mindre\">forles",
"mt_prescan": "ved behov, bla til neste mappe$Nslik at nettleseren lar oss$Nfortsette å spille musikk\">bla",
"mt_fullpre": "hent ned hele neste sang, ikke bare litt:$N✅ skru på hvis nettet ditt er ustabilt,$N❌ skru av hvis nettet ditt er tregt\">full",
+ "mt_fau": "for telefoner: forhindre at avspilling stopper hvis nettet er for tregt til å laste neste sang i tide. Hvis påskrudd, kan forårsake at sang-info ikke vises korrekt i OS'et\">☕️",
"mt_waves": "waveform seekbar:$Nvis volumkurve i avspillingsfeltet\">~s",
"mt_npclip": "vis knapper for å kopiere info om sangen du hører på\">/np",
"mt_octl": "integrering med operativsystemet (fjernkontroll, info-skjerm)\">os-ctl",
@@ -1415,6 +1417,7 @@ var mpl = (function () {
' 1 ? len - pos : 999,
full = null;
- if (rem < (mpl.fullpre ? 7 : 20)) {
+ if (rem < (mpl.fullpre ? 7 : 40)) {
preloaded = fpreloaded = mp.au.rsrc;
full = false;
}
- else if (rem < 40 && mpl.fullpre && fpreloaded != mp.au.rsrc) {
+ else if (rem < 60 && mpl.fullpre && fpreloaded != mp.au.rsrc) {
fpreloaded = mp.au.rsrc;
full = true;
}
@@ -2991,6 +3015,7 @@ function play(tid, is_ev, seek) {
return;
mpl.preload_url = null;
+ mp.nopause();
mp.stopfade(true);
var tn = tid;
@@ -3037,6 +3062,7 @@ function play(tid, is_ev, seek) {
mp.au.onended = next_song;
widget.open();
}
+ mp.init_fau();
var url = addq(mpl.acode(mp.tracks[tid]), 'cache=987&_=' + ACB);
@@ -3189,7 +3215,10 @@ function evau_error(e) {
toast.warn(15, esc(basenames(err + mfile)));
};
xhr.send();
+ return;
}
+
+ setTimeout(next_song, 15000);
}
@@ -8214,6 +8243,7 @@ function reload_mp() {
mpo.au = mp.au;
mpo.au2 = mp.au2;
mpo.acs = mp.acs;
+ mpo.fau = mp.fau;
mpl.unbuffer();
}
var plays = QSA('tr>td:first-child>a.play');
diff --git a/docs/TODO.md b/docs/TODO.md
index 324271f2..59a7eb5d 100644
--- a/docs/TODO.md
+++ b/docs/TODO.md
@@ -1,8 +1,5 @@
a living list of upcoming features / fixes / changes, very roughly in order of priority
-* ensure continuous music playback on android w/ unreliable network
- * playback stops if preload doesn't finish before end of current track, but suspiciously resumes when phone is unsuspended and browser gets focus... preloading earlier is a band-aid; some filler / comfortnoise probably better, but the browser probably requires the play-action to be chained from an end-of-track event... maybe make two audio objects (wn1/wn2) with ≈2sec audio and eot-hop between them until au2 is ready, maybe assembled at runtime by repeating an mp3 frame (b64 is a bit sus)
-
* download accelerator
* definitely download chunks in parallel
* maybe resumable downloads (chrome-only, jank api)