Change camera offline error display and message (#13712)

* Don't display offline message in live player if camera is restreamed

* Update error message

* simplify message
This commit is contained in:
Josh Hawkins 2024-09-13 06:57:30 -05:00 committed by GitHub
parent 61854f1d6a
commit ba49054cd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,6 +59,7 @@ export default function LivePlayer({
onResetLiveMode, onResetLiveMode,
}: LivePlayerProps) { }: LivePlayerProps) {
const internalContainerRef = useRef<HTMLDivElement | null>(null); const internalContainerRef = useRef<HTMLDivElement | null>(null);
// camera activity // camera activity
const { activeMotion, activeTracking, objects, offline } = const { activeMotion, activeTracking, objects, offline } =
@ -299,12 +300,16 @@ export default function LivePlayer({
</div> </div>
{offline && !showStillWithoutActivity && ( {offline && !showStillWithoutActivity && (
<div className="flex size-full flex-col items-center"> <div className="absolute inset-0 left-1/2 top-1/2 flex h-96 w-96 -translate-x-1/2 -translate-y-1/2">
<p className="mb-5"> <div className="flex flex-col items-center justify-center rounded-lg bg-background/50 p-5">
{capitalizeFirstLetter(cameraConfig.name)} is offline <p className="my-5 text-lg">Stream offline</p>
</p>
<TbExclamationCircle className="mb-3 size-10" /> <TbExclamationCircle className="mb-3 size-10" />
<p>No frames have been received, check error logs</p> <p className="max-w-96 text-center">
No frames have been received on the{" "}
{capitalizeFirstLetter(cameraConfig.name)} <code>detect</code>{" "}
stream, check error logs
</p>
</div>
</div> </div>
)} )}