User story: Stream audio from a plugin
**As a** plugin developer, **I want** to provide audio streaming through my plugin by returning a URL or byte stream, **so that** the playback engine can play content from my source.
User story: Stream audio from a plugin
As a plugin developer,
I want to provide audio streaming through my plugin by returning a URL or byte stream,
so that the playback engine can play content from my source.
Priority
Must
Acceptance criteria
- Given my plugin declares
streamcapability withstreaming_mode = "url", when the platform requests a stream for content IDX, then I return a JSON response with a validurlandcontent_typewithin the timeout. - Given my plugin declares
streamcapability withstreaming_mode = "pipe"(v2 — Won’t for v1, pipe mode deferred), when the platform requests a stream, then I write audio bytes to stdout (or the IPC channel) until the stream ends or a stop signal is received. - Given I return a URL that becomes unreachable, when the playback engine tries to fetch it, then the engine reports a STREAM_UNAVAILABLE error and advances to the next queue item.
- Given I return an unsupported audio format, when the engine receives it, then the engine returns UNSUPPORTED_FORMAT and does not crash.
Notes / constraints
- Streaming mode is declared in the plugin manifest, not negotiated at request time.
- The core handles HTTP fetching for URL-mode streams (NFR-PERF-1).
Traceability
- Requirement IDs: FR-PLUGIN-5, FR-CORE-1
- NFRs: NFR-PERF-1