mirror of
https://github.com/jeffvli/feishin.git
synced 2024-11-20 06:27:09 +01:00
fix speed state
This commit is contained in:
parent
c7214fc7ce
commit
ecef9bea5e
@ -143,7 +143,7 @@ export const App = () => {
|
||||
if (!isRunning) {
|
||||
const extraParameters = useSettingsStore.getState().playback.mpvExtraParameters;
|
||||
const properties: Record<string, any> = {
|
||||
speed: usePlayerStore.getState().current.speed,
|
||||
speed: usePlayerStore.getState().speed,
|
||||
...getMpvProperties(useSettingsStore.getState().playback.mpvProperties),
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,6 @@ export interface PlayerState {
|
||||
seek: boolean;
|
||||
shuffledIndex: number;
|
||||
song?: QueueSong;
|
||||
speed: number;
|
||||
status: PlayerStatus;
|
||||
time: number;
|
||||
};
|
||||
@ -32,6 +31,7 @@ export interface PlayerState {
|
||||
};
|
||||
repeat: PlayerRepeat;
|
||||
shuffle: PlayerShuffle;
|
||||
speed: number;
|
||||
volume: number;
|
||||
}
|
||||
|
||||
@ -805,7 +805,7 @@ export const usePlayerStore = create<PlayerSlice>()(
|
||||
},
|
||||
setCurrentSpeed: (speed) => {
|
||||
set((state) => {
|
||||
state.current.speed = speed;
|
||||
state.speed = speed;
|
||||
});
|
||||
},
|
||||
setCurrentTime: (time, seek = false) => {
|
||||
@ -1011,7 +1011,6 @@ export const usePlayerStore = create<PlayerSlice>()(
|
||||
seek: false,
|
||||
shuffledIndex: 0,
|
||||
song: {} as QueueSong,
|
||||
speed: 1.0,
|
||||
status: PlayerStatus.PAUSED,
|
||||
time: 0,
|
||||
},
|
||||
@ -1026,6 +1025,7 @@ export const usePlayerStore = create<PlayerSlice>()(
|
||||
},
|
||||
repeat: PlayerRepeat.NONE,
|
||||
shuffle: PlayerShuffle.NONE,
|
||||
speed: 1.0,
|
||||
transcode: {
|
||||
enabled: false,
|
||||
},
|
||||
@ -1130,7 +1130,7 @@ export const useVolume = () => usePlayerStore((state) => state.volume);
|
||||
|
||||
export const useMuted = () => usePlayerStore((state) => state.muted);
|
||||
|
||||
export const useSpeed = () => usePlayerStore((state) => state.current.speed);
|
||||
export const useSpeed = () => usePlayerStore((state) => state.speed);
|
||||
|
||||
export const usePlayerFallback = () => usePlayerStore((state) => state.fallback);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user