Sequence diagram: Stream URL fetch failure
Sequence diagram: Stream URL fetch failure
sequenceDiagram
participant User
participant Shell as Svelte Shell
participant Engine as Playback Engine
participant HTTP as HTTP Client (reqwest)
User->>Shell: Press play
Shell->>Engine: invoke("play_track", source)
Engine->>Engine: Resolve stream URL (via Plugin Runtime)
Engine-->>Engine: Got StreamInfo { url, expires_at }
Note over Engine: expires_at is null or in the future — proceed
Engine->>HTTP: GET url
HTTP-->>Engine: 404 Not Found
Engine-->>Shell: emit("playback_error", { error: "Stream unavailable" })
Engine->>Engine: Auto-advance queue
Engine-->>Shell: emit("track_changed", next_track)
Shell-->>User: Show toast "Stream unavailable, skipping"
sequenceDiagram
participant Engine as Playback Engine
participant RT as Plugin Runtime
Engine->>Engine: Check StreamInfo.expires_at
Note over Engine: expires_at is in the past — URL is stale
Engine->>RT: stream(plugin_id, content_id) — re-resolve
RT-->>Engine: StreamInfo { url: new_url, expires_at: future }
Engine->>Engine: Fetch new_url
Was this page helpful?
Thanks for your feedback!