mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-04 03:49:39 +05:00
parent
bc7c799f3c
commit
da6639d799
1 changed files with 10 additions and 2 deletions
|
@ -75,6 +75,7 @@ export const ReleasePlayerCustom = (props: {
|
||||||
const [playerError, setPlayerError] = useState(null);
|
const [playerError, setPlayerError] = useState(null);
|
||||||
const [playbackRate, setPlaybackRate] = useState(1);
|
const [playbackRate, setPlaybackRate] = useState(1);
|
||||||
const [isErrorDetailsOpen, setIsErrorDetailsOpen] = useState(false);
|
const [isErrorDetailsOpen, setIsErrorDetailsOpen] = useState(false);
|
||||||
|
const [isEpLoadingTimeout, setIsEpLoadingTimeout] = useState(null);
|
||||||
|
|
||||||
const [retryCount, setRetryCount] = useState(0);
|
const [retryCount, setRetryCount] = useState(0);
|
||||||
|
|
||||||
|
@ -130,13 +131,20 @@ export const ReleasePlayerCustom = (props: {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
if (episode.selected) {
|
if (episode.selected) {
|
||||||
|
if (isEpLoadingTimeout) {
|
||||||
|
clearTimeout(isEpLoadingTimeout);
|
||||||
|
}
|
||||||
|
setPlayerError(null);
|
||||||
SetPlayerProps({
|
SetPlayerProps({
|
||||||
src: null,
|
src: null,
|
||||||
poster: null,
|
poster: null,
|
||||||
type: null,
|
type: null,
|
||||||
});
|
});
|
||||||
setPlayerError(null);
|
setIsEpLoadingTimeout(
|
||||||
__getInfo();
|
setTimeout(() => {
|
||||||
|
__getInfo();
|
||||||
|
}, 250)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [episode.selected, retryCount]);
|
}, [episode.selected, retryCount]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue