feat(playback): move a session between devices

One device holds the audio; the rest watch the same session over an
event stream and act as remotes. Picking a device hands the audio over
at the position the previous one reported, and that device stops.

Also centre the command palette with margins instead of a translate:
animate-rise sets its own transform and dropped the offset on mobile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kami
2026-08-08 19:12:26 +04:00
parent bfe22745bc
commit 4ead344aec
13 changed files with 1194 additions and 5 deletions
+14
View File
@@ -20,6 +20,20 @@ server {
proxy_cache_bypass $http_upgrade;
}
# The cross-device event stream is long-lived and must arrive unbuffered:
# with proxy buffering on, nginx holds each event until it has a chunk worth
# forwarding, which is exactly the latency this channel exists to avoid.
location /api/playback/stream {
proxy_pass http://backend:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Authorization "Bearer ${MUZICK_API_KEY}";
proxy_set_header Connection '';
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 1h;
}
location /api {
proxy_pass http://backend:3000;
proxy_http_version 1.1;