mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Fix camera switching and loading position (#10982)
* Fix alignment * Set loading when switching cameras
This commit is contained in:
		
							parent
							
								
									d7ae0eedf8
								
							
						
					
					
						commit
						a823a18496
					
				@ -89,7 +89,13 @@ export default function DynamicVideoPlayer({
 | 
			
		||||
    if (!isScrubbing) {
 | 
			
		||||
      setLoadingTimeout(setTimeout(() => setIsLoading(true), 1000));
 | 
			
		||||
    }
 | 
			
		||||
  }, [isScrubbing]);
 | 
			
		||||
 | 
			
		||||
    return () => {
 | 
			
		||||
      if (loadingTimeout) {
 | 
			
		||||
        clearTimeout(loadingTimeout)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }, [camera, isScrubbing]);
 | 
			
		||||
 | 
			
		||||
  const onPlayerLoaded = useCallback(() => {
 | 
			
		||||
    if (!controller || !startTimestamp) {
 | 
			
		||||
@ -179,7 +185,7 @@ export default function DynamicVideoPlayer({
 | 
			
		||||
        }}
 | 
			
		||||
      />
 | 
			
		||||
      {isLoading && (
 | 
			
		||||
        <ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x1/2 -translate-y-1/2" />
 | 
			
		||||
        <ActivityIndicator className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2" />
 | 
			
		||||
      )}
 | 
			
		||||
    </>
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user