nixamp 0.20.0 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +15 -4
- package/package.json +1 -1
- package/src/server.ts +14 -4
- package/web/dist/sw.js +1 -1
package/dist/server.js
CHANGED
|
@@ -3971,10 +3971,21 @@ async function liveAudio(request, response, engine, ffmpeg, ffprobe) {
|
|
|
3971
3971
|
child = null;
|
|
3972
3972
|
if (closed)
|
|
3973
3973
|
return;
|
|
3974
|
-
|
|
3975
|
-
//
|
|
3976
|
-
|
|
3977
|
-
|
|
3974
|
+
const now = engine.snapshot();
|
|
3975
|
+
// Follow the player if it has already moved on.
|
|
3976
|
+
if (now.index !== playing) {
|
|
3977
|
+
later(0, next);
|
|
3978
|
+
return;
|
|
3979
|
+
}
|
|
3980
|
+
// It has not. Served like this the engine decodes nothing itself, so
|
|
3981
|
+
// nothing ever ends a track on its side and the index never moves on
|
|
3982
|
+
// its own: a podcast playlist streamed to a room played its first
|
|
3983
|
+
// episode to the end and then played it again, for ever. This stream
|
|
3984
|
+
// is the playback, so it is the one that moves the player on. One
|
|
3985
|
+
// track alone still repeats rather than falls silent, as before.
|
|
3986
|
+
if (now.trackCount > 1)
|
|
3987
|
+
engine.command({ type: "next" });
|
|
3988
|
+
later(LIVE_GAP_MS, next);
|
|
3978
3989
|
});
|
|
3979
3990
|
};
|
|
3980
3991
|
// A track change that lands while we are between songs is the signal to go
|
package/package.json
CHANGED
package/src/server.ts
CHANGED
|
@@ -4548,10 +4548,20 @@ async function liveAudio(
|
|
|
4548
4548
|
if (child !== spawned) return;
|
|
4549
4549
|
child = null;
|
|
4550
4550
|
if (closed) return;
|
|
4551
|
-
|
|
4552
|
-
//
|
|
4553
|
-
|
|
4554
|
-
|
|
4551
|
+
const now = engine.snapshot();
|
|
4552
|
+
// Follow the player if it has already moved on.
|
|
4553
|
+
if (now.index !== playing) {
|
|
4554
|
+
later(0, next);
|
|
4555
|
+
return;
|
|
4556
|
+
}
|
|
4557
|
+
// It has not. Served like this the engine decodes nothing itself, so
|
|
4558
|
+
// nothing ever ends a track on its side and the index never moves on
|
|
4559
|
+
// its own: a podcast playlist streamed to a room played its first
|
|
4560
|
+
// episode to the end and then played it again, for ever. This stream
|
|
4561
|
+
// is the playback, so it is the one that moves the player on. One
|
|
4562
|
+
// track alone still repeats rather than falls silent, as before.
|
|
4563
|
+
if (now.trackCount > 1) engine.command({ type: "next" });
|
|
4564
|
+
later(LIVE_GAP_MS, next);
|
|
4555
4565
|
});
|
|
4556
4566
|
};
|
|
4557
4567
|
|
package/web/dist/sw.js
CHANGED