This commit is contained in:
NoLogicAlan committed 2026-09-14 04:05:33 +03:00
1 parent 207c60ceec
commit b0f816e60b
1 file changed
+4 -1
+4 -1
View File
@@ -58,7 +58,10 @@ const StreamPipeline = {
const stream = this._stream; const stream = this._stream;
if (stream) { if (stream) {
const onEnd = () => resolve(); const onEnd = () => {
if (durationMs > 0 && this._playing && !this._stopped) return;
resolve();
};
stream.once("end", onEnd); stream.once("end", onEnd);
stream.once("close", onEnd); stream.once("close", onEnd);
stream.once("error", failFast); stream.once("error", failFast);