feat(stream): direct-play passthrough for browser-native files
Hueco #3 / 3a (CLI side). StreamSession gains PlayMethod; when the web sends "direct", the daemon serves the raw file over /stream (HTTP Range, no ffmpeg) instead of transcoding to HLS — zero CPU, instant seek. Runs before the ffmpeg-availability check so direct-play works even with transcode disabled. Legacy/empty PlayMethod keeps the HLS path, so an old web that never sends "direct" is unaffected.
This commit is contained in:
parent
3592b9f95a
commit
c8d7c4bba5
2 changed files with 31 additions and 0 deletions
|
|
@ -410,6 +410,13 @@ type StreamSession struct {
|
|||
// AudioIndex selects the source audio track (-map 0:a:N). -1 means
|
||||
// "use the default/first track".
|
||||
AudioIndex int `json:"audioIndex,omitempty"`
|
||||
// PlayMethod is how the daemon should serve this session:
|
||||
// "" — default (HLS transcode); also what legacy servers send.
|
||||
// "direct" — the source is already browser-native (the web decided this
|
||||
// from library scan metadata + an agent-version gate). Serve
|
||||
// the raw file over /stream (HTTP Range, no ffmpeg) instead of
|
||||
// transcoding to HLS. See hueco #3 phase 3a in the roadmap.
|
||||
PlayMethod string `json:"playMethod,omitempty"`
|
||||
}
|
||||
|
||||
// SyncResponse is returned by the server with all pending actions for the CLI.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue