+2
-2
frontend/src/lib/queue.svelte.ts
+2
-2
frontend/src/lib/queue.svelte.ts
···
416
416
this.schedulePush();
417
417
}
418
418
419
-
playNow(track: Track) {
420
-
this.lastUpdateWasLocal = true;
419
+
playNow(track: Track, autoPlay = true) {
420
+
this.lastUpdateWasLocal = autoPlay;
421
421
const upNext = this.tracks.slice(this.currentIndex + 1);
422
422
this.tracks = [track, ...upNext];
423
423
this.originalOrder = [...this.tracks];
+2
-2
frontend/src/routes/track/[id]/+page.svelte
+2
-2
frontend/src/routes/track/[id]/+page.svelte
···
376
376
const seconds = parseInt(t, 10);
377
377
if (!isNaN(seconds) && seconds >= 0) {
378
378
pendingSeekMs = seconds * 1000;
379
-
// start playing the track
379
+
// load the track without auto-playing (browser blocks autoplay without interaction)
380
380
if (track.gated) {
381
381
void playTrack(track);
382
382
} else {
383
-
queue.playNow(track);
383
+
queue.playNow(track, false);
384
384
}
385
385
}
386
386
}