fix(qconnect): suppress local playback automation when connected
When QBZ is the local renderer in a QConnect session and the web player presses next, the server sends SET_STATE with the new track. The backend correctly starts playback, but the frontend's gapless transition handler saw the track_id change, treated it as a local gapless event, and called nextTrack() — which advanced the CoreBridge queue every 1s polling cycle, flooding the queue and destroying the shuffle order. Root cause: shouldQconnectSuppressLocalPlaybackAutomation only suppressed when a peer renderer was active (activeRendererId !== localRendererId). When QBZ IS the renderer, remoteControlMode stayed false, so all local automation (gapless, auto-advance, resume-from-stop) remained active and fought the server. Fix: suppress local playback automation whenever QConnect is connected, regardless of which renderer is active. The server is the authority for track transitions in all QConnect scenarios. cc
This commit is contained in:
1 file changed
+6
-2
@@ -196,9 +196,13 @@ export function isQconnectPeerRendererActive(
|
||||
|
||||
export function shouldQconnectSuppressLocalPlaybackAutomation(
|
||||
connected: boolean,
|
||||
sessionSnapshot: QconnectSessionSnapshot | null | undefined
|
||||
_sessionSnapshot: QconnectSessionSnapshot | null | undefined
|
||||
): boolean {
|
||||
return connected && isQconnectPeerRendererActive(sessionSnapshot);
|
||||
// When QConnect is connected, the server is the authority for track
|
||||
// transitions — regardless of whether QBZ is the local renderer or a peer
|
||||
// is rendering. Suppress gapless interception, auto-advance, and
|
||||
// resume-from-stop so the frontend never fights the server.
|
||||
return connected;
|
||||
}
|
||||
|
||||
export function resolveQconnectPlayNextAuthoritativeTrackId(params: {
|
||||
|
||||
Reference in new issue
Block a user