feat: Spotify-style transfer between devices
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped

- persistent remote playback bar when another session is playing
  (device, title, play/pause, Transfer here)
- transfer remote -> local for audio and video, preserving position and queue,
  then stop the remote session
- cast from local players now sends the queue, start index and position, and
  stops local playback after the transfer
- full-screen player and remote dialog share the transfer payload
This commit is contained in:
1xDed committed 2026-11-27 13:32:13 +03:00
1 parent a98663691d
commit fa29331c1c
12 files changed
+421 -21

No files matched your search

+18 -3
View File
@@ -2,21 +2,36 @@ import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
import IconButton from "@mui/material/IconButton";
import Tooltip from "@mui/material/Tooltip";
import React from "react";
import useRemoteControlStore from "@/utils/store/remoteControl";
import useRemoteControlStore, {
type RemoteTransfer,
} from "@/utils/store/remoteControl";
type CastButtonProps = {
item?: BaseItemDto | null;
transfer?: Omit<RemoteTransfer, "item">;
/** Computed on click so playback position/queue are current. */
getTransfer?: () => Omit<RemoteTransfer, "item">;
size?: "small" | "medium" | "large";
};
const CastButton = ({ item, size = "medium" }: CastButtonProps) => {
const CastButton = ({
item,
transfer,
getTransfer,
size = "medium",
}: CastButtonProps) => {
const openDialog = useRemoteControlStore((s) => s.openDialog);
return (
<Tooltip title={item ? "Play on another device" : "Remote control"}>
<IconButton
size={size}
aria-label={item ? "Play on another device" : "Remote control"}
onClick={() => openDialog(item ?? null)}
onClick={() =>
openDialog({
...(getTransfer ? getTransfer() : transfer),
item: item ?? null,
})
}
>
<span className="material-symbols-rounded">cast</span>
</IconButton>