feat: cross-platform titlebar, video transfers and client cleanup
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
Adds frameless-window controls for Windows/Linux (native traffic lights on macOS), keeps transfers at the current position for video, lets the video player use the same sync/device controls as the media bar, and removes dead code plus assorted UI/perf issues.
This commit is contained in:
1 parent
4bdd0139bf
commit
6675a55957
26 files changed
+561
-316
No files matched your search
@@ -176,9 +176,20 @@ export function VideoPlayer() {
|
||||
|
||||
const handleReady = async () => {
|
||||
if (api && !isPlayerReady && player.current) {
|
||||
player.current.currentTime = ticksToSec(
|
||||
userDataLastPlayedPositionTicks ?? 0,
|
||||
);
|
||||
const target = ticksToSec(userDataLastPlayedPositionTicks ?? 0);
|
||||
const seekToStartPosition = () => {
|
||||
if (!player.current) return;
|
||||
if (usePlaybackStore.getState().metadata.item?.Id !== itemId) return;
|
||||
const drift = Math.abs(player.current.currentTime - target);
|
||||
if (target > 1 && drift > 5) {
|
||||
player.current.currentTime = target;
|
||||
}
|
||||
};
|
||||
player.current.currentTime = target;
|
||||
// HLS players can reset their position once the manifest loads;
|
||||
// re-apply the transfer/resume position after startup.
|
||||
window.setTimeout(seekToStartPosition, 700);
|
||||
window.setTimeout(seekToStartPosition, 1800);
|
||||
|
||||
if (navigator.mediaSession && mediaSource) {
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
@@ -527,7 +538,7 @@ export function VideoPlayer() {
|
||||
}
|
||||
}, []);
|
||||
|
||||
const idleTimerRef = useRef<NodeJS.Timeout | null>(null);
|
||||
const idleTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
// Function to clear the existing idle timer
|
||||
const clearIdleTimer = useCallback(() => {
|
||||
|
||||
Reference in new issue
Block a user