mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 05:05:26 +03:00
Simplify layout
This commit is contained in:
parent
8b89a54e50
commit
6f86fe13ed
@ -165,33 +165,29 @@ export default function DynamicVideoPlayer({
|
|||||||
}, [controller, recordings]);
|
}, [controller, recordings]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`relative ${className ?? ""} cursor-pointer`}>
|
<div className={`relative ${className ?? ""}`}>
|
||||||
<div
|
<HlsVideoPlayer
|
||||||
className={`w-full relative ${isScrubbing || isLoading ? "hidden" : "visible"}`}
|
className={`w-full ${isScrubbing || isLoading ? "hidden" : "visible"} ${grow ?? ""}`}
|
||||||
>
|
videoRef={playerRef}
|
||||||
<HlsVideoPlayer
|
currentSource={source}
|
||||||
className={`${grow}`}
|
onTimeUpdate={onTimeUpdate}
|
||||||
videoRef={playerRef}
|
onPlayerLoaded={onPlayerLoaded}
|
||||||
currentSource={source}
|
onClipEnded={onClipEnded}
|
||||||
onTimeUpdate={onTimeUpdate}
|
onPlaying={() => {
|
||||||
onPlayerLoaded={onPlayerLoaded}
|
if (isScrubbing) {
|
||||||
onClipEnded={onClipEnded}
|
playerRef.current?.pause();
|
||||||
onPlaying={() => {
|
}
|
||||||
if (isScrubbing) {
|
|
||||||
playerRef.current?.pause();
|
|
||||||
}
|
|
||||||
|
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{config && focusedItem && (
|
{config && focusedItem && (
|
||||||
<TimelineEventOverlay
|
<TimelineEventOverlay
|
||||||
timeline={focusedItem}
|
timeline={focusedItem}
|
||||||
cameraConfig={config.cameras[camera]}
|
cameraConfig={config.cameras[camera]}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</HlsVideoPlayer>
|
</HlsVideoPlayer>
|
||||||
</div>
|
|
||||||
<PreviewPlayer
|
<PreviewPlayer
|
||||||
className={`${isScrubbing || isLoading ? "visible" : "hidden"} ${grow}`}
|
className={`${isScrubbing || isLoading ? "visible" : "hidden"} ${grow}`}
|
||||||
camera={camera}
|
camera={camera}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user