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:
Arkadiusz Fal
2026-07-31 23:35:59 +02:00
parent 2c0c2e853a
commit 908a916f76
3 changed files with 88 additions and 9 deletions

View File

@@ -527,8 +527,9 @@ struct VideoContextMenuContent: View {
await remoteControl.loadVideo(
videoID: video.id.videoID,
videoTitle: video.title,
videoSource: video.id.source,
instanceURL: instanceURL,
startTime: startTime,
startTime: video.isLive ? nil : startTime,
pauseLocalPlayback: false,
on: device
)
@@ -556,11 +557,13 @@ struct VideoContextMenuContent: View {
// Send load video command with current playback time
// pauseLocalPlayback: true will pause local playback when remote device confirms it started playing
// Live streams have no shared timeline - the remote device joins the stream at the live edge
await remoteControl.loadVideo(
videoID: video.id.videoID,
videoTitle: video.title,
videoSource: video.id.source,
instanceURL: instanceURL,
startTime: currentTime,
startTime: video.isLive ? nil : currentTime,
pauseLocalPlayback: true,
on: device
)