fix(casting): report the real PlayMethod to Jellyfin

This commit is contained in:
Uruk
2026-05-22 02:20:51 +02:00
parent b38064e2da
commit 0cc3a8469d
3 changed files with 29 additions and 5 deletions

View File

@@ -75,6 +75,11 @@ const attemptLoad = async (
throw new Error("getStreamUrl returned no URL");
}
const playMethod: "Transcode" | "DirectPlay" = data.mediaSource
?.TranscodingUrl
? "Transcode"
: "DirectPlay";
await client.loadMedia({
mediaInfo: buildCastMediaInfo({
item,
@@ -82,6 +87,7 @@ const attemptLoad = async (
api,
playSessionId: data.sessionId ?? undefined,
selection,
playMethod,
}),
startTime: startPositionMs / 1000,
});