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
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:
1 parent
a98663691d
commit
fa29331c1c
12 files changed
+421
-21
No files matched your search
@@ -12,15 +12,34 @@ interface PlayerActionsProps {
|
||||
onClose: () => void;
|
||||
/** The track currently playing (for cast / instant mix). */
|
||||
item?: BaseItemDto | null;
|
||||
positionTicks?: number;
|
||||
queue?: BaseItemDto[];
|
||||
startIndex?: number;
|
||||
/** Volume control, rendered between the queue and expand buttons. */
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
const PlayerActions = ({ onExpand, onClose, item, children }: PlayerActionsProps) => {
|
||||
const PlayerActions = ({
|
||||
onExpand,
|
||||
onClose,
|
||||
item,
|
||||
positionTicks = 0,
|
||||
queue = [],
|
||||
startIndex = 0,
|
||||
children,
|
||||
}: PlayerActionsProps) => {
|
||||
return (
|
||||
<div className="audio-player-actions">
|
||||
{item && <InstantMixButton item={item} />}
|
||||
{item && <CastButton item={item} />}
|
||||
{item && <CastButton
|
||||
item={item}
|
||||
transfer={{
|
||||
kind: "audio",
|
||||
positionTicks,
|
||||
queue,
|
||||
startIndex,
|
||||
}}
|
||||
/>}
|
||||
<QueueButton />
|
||||
<div className="audio-player-volume">{children}</div>
|
||||
<Tooltip title="Open player">
|
||||
|
||||
@@ -245,7 +245,14 @@ const AudioPlayer = () => {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<PlayerActions onExpand={handleNavigate} onClose={handleClose} item={item}>
|
||||
<PlayerActions
|
||||
onExpand={handleNavigate}
|
||||
onClose={handleClose}
|
||||
item={item}
|
||||
positionTicks={secToTicks(progress)}
|
||||
queue={tracks ?? []}
|
||||
startIndex={currentTrack}
|
||||
>
|
||||
<PlayerVolume
|
||||
volume={volume}
|
||||
isMuted={isMuted}
|
||||
|
||||
@@ -31,6 +31,7 @@ import VideoPlayerSettingsMenu from "./settingsMenu";
|
||||
|
||||
import "./controls.scss";
|
||||
import { clearQueue } from "@/utils/store/queue";
|
||||
import useQueue from "@/utils/store/queue";
|
||||
import ProgressDisplay from "./ProgressDisplay";
|
||||
|
||||
/**
|
||||
@@ -307,7 +308,17 @@ const VideoPlayerControls = ({
|
||||
: "volume_up"}
|
||||
</span>
|
||||
</IconButton>
|
||||
<CastButton item={item} />
|
||||
<CastButton
|
||||
item={item}
|
||||
getTransfer={() => ({
|
||||
kind: "video",
|
||||
positionTicks: secToTicks(
|
||||
usePlaybackStore.getState().getCurrentTime(),
|
||||
),
|
||||
queue: useQueue.getState().tracks ?? [],
|
||||
startIndex: useQueue.getState().currentItemIndex,
|
||||
})}
|
||||
/>
|
||||
<QueueButton />
|
||||
|
||||
<ChaptersListButton />
|
||||
|
||||
Reference in new issue
Block a user