fix: fence stream recovery and EOF advancement by playback session

This commit is contained in:
TIANYAO ZHANG committed 2026-10-03 16:55:34 +08:00
1 parent c904190912
commit 79fb8443be
3 files changed
+108 -1

No files matched your search

+2
View File
@@ -834,6 +834,8 @@ export class AudioPlayer extends EventEmitter {
}
getDuckingGain(): number { return this.duckingGainAt(performance.now()); }
getState(): PlayerState { return this.state; }
/** Changes on stop or a new play/seek, so asynchronous recovery can be fenced. */
getPlaybackSessionId(): number { return this.sessionId; }
// True only while attached to an external (Spotify sidecar) PCM stream. Used
// by the orchestrator to decide whether to re-attach: stop() detaches (sets
// externalMode=false) so this is false after any player.stop().