mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix showing loading indicator when first loading a camera without previews (#12064)
This commit is contained in:
parent
c72d304515
commit
d01457e64d
@ -172,6 +172,12 @@ function PreviewVideoPlayer({
|
|||||||
|
|
||||||
const [firstLoad, setFirstLoad] = useState(true);
|
const [firstLoad, setFirstLoad] = useState(true);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (cameraPreviews && cameraPreviews.length > 0) {
|
||||||
|
setFirstLoad(false);
|
||||||
|
}
|
||||||
|
}, [cameraPreviews]);
|
||||||
|
|
||||||
const [currentPreview, setCurrentPreview] = useState(initialPreview);
|
const [currentPreview, setCurrentPreview] = useState(initialPreview);
|
||||||
|
|
||||||
const onPreviewSeeked = useCallback(() => {
|
const onPreviewSeeked = useCallback(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user