forked from Github/frigate
UI fixes (#11012)
* Get pip working correctly * Fix system graphs click and hover states
This commit is contained in:
@@ -127,22 +127,22 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
||||
if (mainRef.current == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const fsListener = () => {
|
||||
setFullscreen(document.fullscreenElement != null);
|
||||
};
|
||||
const pipListener = () => {
|
||||
setPip(document.pictureInPictureElement != null);
|
||||
};
|
||||
document.addEventListener("fullscreenchange", fsListener);
|
||||
document.addEventListener("focusin", pipListener);
|
||||
|
||||
return () => {
|
||||
document.removeEventListener("fullscreenchange", fsListener);
|
||||
document.removeEventListener("focusin", pipListener);
|
||||
};
|
||||
}, [mainRef]);
|
||||
|
||||
useEffect(() => {
|
||||
setPip(document.pictureInPictureElement != null);
|
||||
// we know that these deps are correct
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [document.pictureInPictureElement]);
|
||||
|
||||
// playback state
|
||||
|
||||
const [audio, setAudio] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user