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