refactor: improve UI and fix videoplayer bugs

This commit is contained in:
--remove-section committed 2025-12-20 15:00:41 +05:30
1 parent 3000146e66
commit 6576bfe5f3
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;