mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
moved playback and quality in one settings menu
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user