refactor: improve UI and fix videoplayer bugs
This commit is contained in:
12 files changed
+523
-174
No files matched your search
@@ -4,12 +4,13 @@ import { useShallow } from "zustand/shallow";
|
||||
import ticksDisplay from "@/utils/methods/ticksDisplay";
|
||||
import { usePlaybackStore } from "@/utils/store/playback";
|
||||
|
||||
const ProgressDislay = () => {
|
||||
const ProgressDisplay = () => {
|
||||
const { currentTime, itemDuration, isUserSeeking, seekValue } =
|
||||
usePlaybackStore(
|
||||
useShallow((state) => ({
|
||||
currentTime: state.playerState.currentTime,
|
||||
itemDuration: state.metadata.itemDuration,
|
||||
itemDuration:
|
||||
state.metadata.itemDuration ?? state.metadata.item?.RunTimeTicks,
|
||||
isUserSeeking: state.playerState.isUserSeeking,
|
||||
seekValue: state.playerState.seekValue,
|
||||
})),
|
||||
@@ -19,9 +20,9 @@ const ProgressDislay = () => {
|
||||
<Typography>
|
||||
{ticksDisplay(isUserSeeking ? (seekValue ?? 0) : (currentTime ?? 0))}
|
||||
</Typography>
|
||||
<Typography>{ticksDisplay(itemDuration)}</Typography>
|
||||
<Typography>{ticksDisplay(itemDuration ?? 0)}</Typography>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProgressDislay;
|
||||
export default ProgressDisplay;
|
||||
Reference in new issue
Block a user