From d73c8bb90c87ed10ee2162f22cfcebb5a71b7341 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 24 Feb 2024 06:48:18 -0700 Subject: [PATCH] Fix overlay in safari and firefox (#10015) --- .../player/PreviewThumbnailPlayer.tsx | 127 +++++++++--------- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/web/src/components/player/PreviewThumbnailPlayer.tsx b/web/src/components/player/PreviewThumbnailPlayer.tsx index ef6203080..d2edbff88 100644 --- a/web/src/components/player/PreviewThumbnailPlayer.tsx +++ b/web/src/components/player/PreviewThumbnailPlayer.tsx @@ -96,68 +96,73 @@ export default function PreviewThumbnailPlayer({ return ( - onPlayback(true)} - onMouseLeave={isMobile ? undefined : () => onPlayback(false)} - onClick={onClick} - > - {playingBack && ( -
- -
- )} - - {(review.severity == "alert" || review.severity == "detection") && ( - - {review.data.objects.map((object) => { - return getIconForLabel(object, "w-3 h-3 text-white"); - })} - {review.data.audio.map((audio) => { - return getIconForLabel(audio, "w-3 h-3 text-white"); - })} - {review.data.sub_labels?.map((sub) => { - return getIconForSubLabel(sub, "w-3 h-3 text-white"); - })} - - )} - {!playingBack && ( -
- - {config && - formatUnixTimestampToDateTime(review.start_time, { - strftime_fmt: - config.ui.time_format == "24hour" - ? "%b %-d, %H:%M" - : "%b %-d, %I:%M %p", - })} -
- )} -
-
- {playingBack && ( - +
onPlayback(true)} + onMouseLeave={isMobile ? undefined : () => onPlayback(false)} + onClick={onClick} + > + {playingBack && ( +
+ +
+ )} + - )} - {!playingBack && review.has_been_reviewed && ( -
- )} + {(review.severity == "alert" || review.severity == "detection") && ( + + {review.data.objects.map((object) => { + return getIconForLabel(object, "w-3 h-3 text-white"); + })} + {review.data.audio.map((audio) => { + return getIconForLabel(audio, "w-3 h-3 text-white"); + })} + {review.data.sub_labels?.map((sub) => { + return getIconForSubLabel(sub, "w-3 h-3 text-white"); + })} + + )} + {!playingBack && ( +
+ + {config && + formatUnixTimestampToDateTime(review.start_time, { + strftime_fmt: + config.ui.time_format == "24hour" + ? "%b %-d, %H:%M" + : "%b %-d, %I:%M %p", + })} +
+ )} +
+
+ {playingBack && ( + + )} + {!playingBack && review.has_been_reviewed && ( +
+ )} +