/* Two the phone can reach that the mock never knew, found while mapping every api.js wrapper against it for this round: unmocked they fall through to the real IPC, which on a file:// page rejects — a console warning AND a toast, in a step that has nothing to do with either. The transport is answered the way the real core answers it, with an event and nothing else; `resume` cannot restart the position ticks (they live in the closure the play_* command opened), so the state is right and the position simply stands still. */ if (cmd === "player_control") { const act = String(args?.action || ""); if (act === "pause" || act === "stop") { clearInterval(posTimer); posTimer = null; } if (act === "pause") later(60, () => mockEmit("soulseek:player", { kind: "paused" })); if (act === "stop") later(60, () => mockEmit("soulseek:player", { kind: "stopped" })); if (act === "resume") later(60, () => mockEmit("soulseek:player", { kind: "playing" })); return Promise.resolve(); } if (cmd === "open_external") return Promise.resolve();