mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-19 09:47:15 +00:00
Update useSkipTime.ts
This commit is contained in:
parent
e6b4b0f41b
commit
39255bad80
1 changed files with 4 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ const MAX_RETRIES = 3;
|
|||
|
||||
export function useSkipTime() {
|
||||
const { playerMeta: meta } = usePlayerMeta();
|
||||
const [skiptime, setSkiptime] = useState(0);
|
||||
const [skiptime, setSkiptime] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchSkipTime = async (retries = 0): Promise<void> => {
|
||||
|
|
@ -31,10 +31,12 @@ export function useSkipTime() {
|
|||
|
||||
const skipTime = data.introSkipTime || null;
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("Skip time:", skipTime);
|
||||
setSkiptime(skipTime);
|
||||
} catch (error) {
|
||||
console.error("Error fetching skip time:", error);
|
||||
setSkiptime(0);
|
||||
setSkiptime(null);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue