Commit ab7b741e authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Stream audio directly instead of downloading the whole file first

Every stream endpoint (library, soundmarks, posts, live-location, rooms)
only accepted the access token via an Authorization header - fine for
apiFetch, but <audio src="..."> can't send custom headers, so the frontend
was fetching the entire file as a blob before playback could even start
(no progressive playback, no seeking). Added
get_current_user_for_stream, which accepts the token as a ?token= query
param too (same reasoning as the Rooms websocket fix), and switched all
five stream endpoints to it. FileResponse already supports Range requests
natively, so a direct <audio src> now gets real 206 Partial Content
responses - confirmed live (curl -H "Range: ..." against
/library/stream/1?token=...).
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 913721b5
Pipeline #1085 passed with stage
in 3 minutes and 16 seconds