mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
Set loading when switching cameras
This commit is contained in:
parent
6b03a3800e
commit
b4890d7c06
@ -89,7 +89,13 @@ export default function DynamicVideoPlayer({
|
|||||||
if (!isScrubbing) {
|
if (!isScrubbing) {
|
||||||
setLoadingTimeout(setTimeout(() => setIsLoading(true), 1000));
|
setLoadingTimeout(setTimeout(() => setIsLoading(true), 1000));
|
||||||
}
|
}
|
||||||
}, [isScrubbing]);
|
|
||||||
|
return () => {
|
||||||
|
if (loadingTimeout) {
|
||||||
|
clearTimeout(loadingTimeout)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [camera, isScrubbing]);
|
||||||
|
|
||||||
const onPlayerLoaded = useCallback(() => {
|
const onPlayerLoaded = useCallback(() => {
|
||||||
if (!controller || !startTimestamp) {
|
if (!controller || !startTimestamp) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user