mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-19 01:17:06 +03:00
add jsmpeg warning to context menu
This commit is contained in:
parent
2619235de1
commit
97918d2bbe
@ -27,6 +27,7 @@ import {
|
|||||||
GroupStreamingSettings,
|
GroupStreamingSettings,
|
||||||
} from "@/types/frigateConfig";
|
} from "@/types/frigateConfig";
|
||||||
import { useStreamingSettings } from "@/context/streaming-settings-provider";
|
import { useStreamingSettings } from "@/context/streaming-settings-provider";
|
||||||
|
import { IoIosWarning } from "react-icons/io";
|
||||||
|
|
||||||
type LiveContextMenuProps = {
|
type LiveContextMenuProps = {
|
||||||
camera: string;
|
camera: string;
|
||||||
@ -174,9 +175,17 @@ export default function LiveContextMenu({
|
|||||||
<ContextMenu key={camera} onOpenChange={handleOpenChange}>
|
<ContextMenu key={camera} onOpenChange={handleOpenChange}>
|
||||||
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
<ContextMenuTrigger>{children}</ContextMenuTrigger>
|
||||||
<ContextMenuContent>
|
<ContextMenuContent>
|
||||||
<div className="text-md py-1 pl-2 capitalize text-primary-variant">
|
<div className="flex flex-col items-start gap-1 py-1 pl-2">
|
||||||
|
<div className="text-md capitalize text-primary-variant">
|
||||||
{camera.replaceAll("_", " ")}
|
{camera.replaceAll("_", " ")}
|
||||||
</div>
|
</div>
|
||||||
|
{preferredLiveMode == "jsmpeg" && isRestreamed && (
|
||||||
|
<div className="flex flex-row items-center gap-1">
|
||||||
|
<IoIosWarning className="mr-1 size-4 text-danger" />
|
||||||
|
<p className="mr-2 text-xs">Low-bandwidth mode</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{preferredLiveMode != "jsmpeg" && isRestreamed && supportsAudio && (
|
{preferredLiveMode != "jsmpeg" && isRestreamed && supportsAudio && (
|
||||||
<>
|
<>
|
||||||
<ContextMenuSeparator className="mb-1" />
|
<ContextMenuSeparator className="mb-1" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user