mirror of
https://github.com/yattee/yattee.git
synced 2026-08-05 23:01:28 +00:00
Fix sending extracted videos (Twitch streams) to other devices
The remote control loadVideo command only carried the raw video ID and an instance URL, so extracted videos (Twitch live streams and other yt-dlp sites) failed on the receiver: it tried to fetch the ID from the /api/v1/videos endpoint, which rejects non-YouTube IDs. The command now carries the full ContentSource and title. The receiver rebuilds the VideoID from the source and opens a placeholder Video - the player then re-extracts streams and full metadata from the original URL, same as when opening the video locally. Media-source extractors (WebDAV/SMB/local) keep using the existing UUID:path branch. Both fields are optional for protocol compatibility: old receivers ignore them, commands from old senders keep the legacy behavior. Also stop sending a start time for live streams - there is no shared timeline, the receiver joins at the live edge.
This commit is contained in:
@@ -52,7 +52,10 @@ enum RemoteControlCommand: Codable, Sendable {
|
||||
case setVolume(Float)
|
||||
case setMuted(Bool)
|
||||
case setRate(Float)
|
||||
case loadVideo(videoID: String, instanceURL: String?, startTime: TimeInterval?, awaitPlayCommand: Bool?)
|
||||
/// `videoSource` carries the full ContentSource so non-API videos (e.g. extracted
|
||||
/// Twitch streams) can be reconstructed on the receiver. Optional for
|
||||
/// backward compatibility with older app versions.
|
||||
case loadVideo(videoID: String, instanceURL: String?, startTime: TimeInterval?, awaitPlayCommand: Bool?, videoSource: ContentSource?, videoTitle: String?)
|
||||
case closeVideo
|
||||
case toggleFullscreen
|
||||
case playNext
|
||||
|
||||
Reference in New Issue
Block a user