feat: add cross-device playback and remote control
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
- native SyncPlay groups with shared queues, ready/buffering and local pause/seek reporting - follow-me prompt that transfers another session's playback to this device - auto-skip intros/recaps and skip-credits for final items - blink:// deep links with timestamped scene sharing via QR - Quick Connect approval and QR onboarding from a phone - Rust WebSocket client with Authorization header for Jellyfin 12, capabilities advertising, live sessions and remote commands
This commit is contained in:
1 parent
cb5ee9b672
commit
5746bf35a5
39 files changed
+3235
-18
No files matched your search
@@ -10,10 +10,16 @@ import { toNumber } from "lodash";
|
||||
import React, {
|
||||
type ChangeEventHandler,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
useTransition,
|
||||
} from "react";
|
||||
import { useShallow } from "zustand/shallow";
|
||||
import {
|
||||
getAutoSkipSegments,
|
||||
setAutoSkipSegments,
|
||||
} from "@/utils/storage/player";
|
||||
import { useApiInContext } from "@/utils/store/api";
|
||||
import {
|
||||
changeAudioTrack,
|
||||
@@ -67,6 +73,25 @@ const VideoPlayerSettingsMenu = ({
|
||||
if (itemId) startSync({ itemId, sessionId: null });
|
||||
};
|
||||
|
||||
const [autoSkip, setAutoSkip] = useState(false);
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
getAutoSkipSegments().then((enabled) => {
|
||||
if (!cancelled) setAutoSkip(enabled);
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, []);
|
||||
|
||||
const toggleAutoSkip = () => {
|
||||
setAutoSkip((enabled) => {
|
||||
const next = !enabled;
|
||||
setAutoSkipSegments(next);
|
||||
return next;
|
||||
});
|
||||
};
|
||||
|
||||
const [subtitleIsChanging, startSubtitleChange] = useTransition();
|
||||
const handleSubtitleChange: ChangeEventHandler<
|
||||
HTMLInputElement | HTMLTextAreaElement
|
||||
@@ -188,6 +213,20 @@ const VideoPlayerSettingsMenu = ({
|
||||
onChange={toggleSync}
|
||||
/>
|
||||
</MenuItem>
|
||||
<MenuItem onClick={toggleAutoSkip}>
|
||||
<Typography
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
}}
|
||||
>
|
||||
Auto-skip intro & recap
|
||||
</Typography>
|
||||
<Switch
|
||||
checked={autoSkip}
|
||||
onClick={(event) => event.stopPropagation()}
|
||||
onChange={toggleAutoSkip}
|
||||
/>
|
||||
</MenuItem>
|
||||
</MenuList>
|
||||
</Popover>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user