moved playback and quality in one settings menu

This commit is contained in:
Jorrin
2024-04-02 22:01:48 +02:00
parent 4eaf04761e
commit 6c55ed92e2
5 changed files with 156 additions and 96 deletions

View File

@@ -2,6 +2,8 @@ import { useCallback } from "react";
import { usePlayerStore } from "~/stores/player/store";
const speeds = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2];
export const usePlaybackSpeed = () => {
const videoRef = usePlayerStore((state) => state.videoRef);
@@ -15,6 +17,7 @@ export const usePlaybackSpeed = () => {
);
return {
speeds,
currentSpeed: videoRef?.props.rate ?? 1,
changePlaybackSpeed,
} as const;