mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 17:14:26 +03:00
always show stream info when restreamed
This commit is contained in:
parent
0eebbd362a
commit
6d46d7a3ed
@ -211,7 +211,7 @@ export function CameraStreamingDialog({
|
|||||||
<span className="sr-only">Info</span>
|
<span className="sr-only">Info</span>
|
||||||
</div>
|
</div>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-80">
|
<PopoverContent className="w-80 text-xs">
|
||||||
Audio must be output from your camera and configured in
|
Audio must be output from your camera and configured in
|
||||||
go2rtc for this stream.
|
go2rtc for this stream.
|
||||||
<div className="mt-2 flex items-center text-primary">
|
<div className="mt-2 flex items-center text-primary">
|
||||||
|
|||||||
@ -1047,93 +1047,82 @@ function FrigateCameraFeatures({
|
|||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent className="max-w-96">
|
<DropdownMenuContent className="max-w-96">
|
||||||
<div className="flex flex-col gap-5 p-4">
|
<div className="flex flex-col gap-5 p-4">
|
||||||
{Object.values(camera.live.streams).length > 1 && (
|
{!isRestreamed && (
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-2">
|
||||||
<Label htmlFor="streaming-method" className="">
|
<Label>Stream</Label>
|
||||||
Stream
|
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
||||||
</Label>
|
<LuX className="size-4 text-danger" />
|
||||||
<Select
|
<div>Restreaming is not enabled for this camera.</div>
|
||||||
value={streamName}
|
<Popover>
|
||||||
onValueChange={(value) => {
|
<PopoverTrigger asChild>
|
||||||
setStreamName?.(value);
|
<div className="cursor-pointer p-0">
|
||||||
}}
|
<LuInfo className="size-4" />
|
||||||
>
|
<span className="sr-only">Info</span>
|
||||||
<SelectTrigger className="w-full">
|
</div>
|
||||||
{Object.keys(camera.live.streams).find(
|
</PopoverTrigger>
|
||||||
(key) => camera.live.streams[key] === streamName,
|
<PopoverContent className="w-80 text-xs">
|
||||||
)}
|
Set up go2rtc for additional live view options and audio
|
||||||
</SelectTrigger>
|
for this camera.
|
||||||
|
<div className="mt-2 flex items-center text-primary">
|
||||||
<SelectContent>
|
<Link
|
||||||
<SelectGroup>
|
to="https://docs.frigate.video/configuration/live"
|
||||||
{Object.entries(camera.live.streams).map(
|
target="_blank"
|
||||||
([stream, name]) => (
|
rel="noopener noreferrer"
|
||||||
<SelectItem
|
className="inline"
|
||||||
key={stream}
|
>
|
||||||
className="cursor-pointer"
|
Read the documentation{" "}
|
||||||
value={name}
|
<LuExternalLink className="ml-2 inline-flex size-3" />
|
||||||
>
|
</Link>
|
||||||
{stream}
|
</div>
|
||||||
</SelectItem>
|
</PopoverContent>
|
||||||
),
|
</Popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{isRestreamed &&
|
||||||
|
Object.values(camera.live.streams).length > 0 && (
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
<Label htmlFor="streaming-method">Stream</Label>
|
||||||
|
<Select
|
||||||
|
value={streamName}
|
||||||
|
onValueChange={(value) => {
|
||||||
|
setStreamName?.(value);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<SelectTrigger className="w-full">
|
||||||
|
{Object.keys(camera.live.streams).find(
|
||||||
|
(key) => camera.live.streams[key] === streamName,
|
||||||
)}
|
)}
|
||||||
</SelectGroup>
|
</SelectTrigger>
|
||||||
</SelectContent>
|
|
||||||
</Select>
|
|
||||||
|
|
||||||
{preferredLiveMode != "jsmpeg" && isRestreamed && (
|
<SelectContent>
|
||||||
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
<SelectGroup>
|
||||||
{supportsAudioOutput ? (
|
{Object.entries(camera.live.streams).map(
|
||||||
<>
|
([stream, name]) => (
|
||||||
<LuCheck className="size-4 text-success" />
|
<SelectItem
|
||||||
<div>Audio is available for this stream</div>
|
key={stream}
|
||||||
</>
|
className="cursor-pointer"
|
||||||
) : (
|
value={name}
|
||||||
<>
|
>
|
||||||
<LuX className="size-4 text-danger" />
|
{stream}
|
||||||
<div>Audio is unavailable for this stream</div>
|
</SelectItem>
|
||||||
<Popover>
|
),
|
||||||
<PopoverTrigger asChild>
|
)}
|
||||||
<div className="cursor-pointer p-0">
|
</SelectGroup>
|
||||||
<LuInfo className="size-4" />
|
</SelectContent>
|
||||||
<span className="sr-only">Info</span>
|
</Select>
|
||||||
</div>
|
|
||||||
</PopoverTrigger>
|
{preferredLiveMode != "jsmpeg" && isRestreamed && (
|
||||||
<PopoverContent className="w-80 text-xs">
|
|
||||||
Audio must be output from your camera and
|
|
||||||
configured in go2rtc for this stream.
|
|
||||||
<div className="mt-2 flex items-center text-primary">
|
|
||||||
<Link
|
|
||||||
to="https://docs.frigate.video/configuration/live"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
className="inline"
|
|
||||||
>
|
|
||||||
Read the documentation{" "}
|
|
||||||
<LuExternalLink className="ml-2 inline-flex size-3" />
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</PopoverContent>
|
|
||||||
</Popover>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{preferredLiveMode != "jsmpeg" &&
|
|
||||||
isRestreamed &&
|
|
||||||
supportsAudioOutput && (
|
|
||||||
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
||||||
{supports2WayTalk ? (
|
{supportsAudioOutput ? (
|
||||||
<>
|
<>
|
||||||
<LuCheck className="size-4 text-success" />
|
<LuCheck className="size-4 text-success" />
|
||||||
<div>Two-way talk is available for this stream</div>
|
<div>Audio is available for this stream</div>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<LuX className="size-4 text-danger" />
|
<LuX className="size-4 text-danger" />
|
||||||
<div>
|
<div>Audio is unavailable for this stream</div>
|
||||||
Two-way talk is unavailable for this stream
|
|
||||||
</div>
|
|
||||||
<Popover>
|
<Popover>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<div className="cursor-pointer p-0">
|
<div className="cursor-pointer p-0">
|
||||||
@ -1142,11 +1131,11 @@ function FrigateCameraFeatures({
|
|||||||
</div>
|
</div>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent className="w-80 text-xs">
|
<PopoverContent className="w-80 text-xs">
|
||||||
Your device must suppport the feature and WebRTC
|
Audio must be output from your camera and
|
||||||
must be configured for two-way talk.
|
configured in go2rtc for this stream.
|
||||||
<div className="mt-2 flex items-center text-primary">
|
<div className="mt-2 flex items-center text-primary">
|
||||||
<Link
|
<Link
|
||||||
to="https://docs.frigate.video/configuration/live/#webrtc-extra-configuration"
|
to="https://docs.frigate.video/configuration/live"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="inline"
|
className="inline"
|
||||||
@ -1161,31 +1150,77 @@ function FrigateCameraFeatures({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{preferredLiveMode != "jsmpeg" &&
|
||||||
|
isRestreamed &&
|
||||||
|
supportsAudioOutput && (
|
||||||
|
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
||||||
|
{supports2WayTalk ? (
|
||||||
|
<>
|
||||||
|
<LuCheck className="size-4 text-success" />
|
||||||
|
<div>
|
||||||
|
Two-way talk is available for this stream
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<LuX className="size-4 text-danger" />
|
||||||
|
<div>
|
||||||
|
Two-way talk is unavailable for this stream
|
||||||
|
</div>
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<div className="cursor-pointer p-0">
|
||||||
|
<LuInfo className="size-4" />
|
||||||
|
<span className="sr-only">Info</span>
|
||||||
|
</div>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent className="w-80 text-xs">
|
||||||
|
Your device must suppport the feature and
|
||||||
|
WebRTC must be configured for two-way talk.
|
||||||
|
<div className="mt-2 flex items-center text-primary">
|
||||||
|
<Link
|
||||||
|
to="https://docs.frigate.video/configuration/live/#webrtc-extra-configuration"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="inline"
|
||||||
|
>
|
||||||
|
Read the documentation{" "}
|
||||||
|
<LuExternalLink className="ml-2 inline-flex size-3" />
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{preferredLiveMode == "jsmpeg" && isRestreamed && (
|
{preferredLiveMode == "jsmpeg" && isRestreamed && (
|
||||||
<div className="flex flex-col items-center gap-3">
|
<div className="flex flex-col items-center gap-3">
|
||||||
<div className="flex flex-row items-center gap-2">
|
<div className="flex flex-row items-center gap-2">
|
||||||
<IoIosWarning className="mr-1 size-8 text-danger" />
|
<IoIosWarning className="mr-1 size-8 text-danger" />
|
||||||
|
|
||||||
<p className="text-sm">
|
<p className="text-sm">
|
||||||
Live view is in low-bandwidth mode due to buffering or
|
Live view is in low-bandwidth mode due to buffering
|
||||||
stream errors.
|
or stream errors.
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
className={`flex items-center gap-2.5 rounded-lg`}
|
||||||
|
aria-label="Reset the stream"
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
onClick={() => setLowBandwidth(false)}
|
||||||
|
>
|
||||||
|
<MdOutlineRestartAlt className="size-5 text-primary-variant" />
|
||||||
|
<div className="text-primary-variant">
|
||||||
|
Reset stream
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
)}
|
||||||
className={`flex items-center gap-2.5 rounded-lg`}
|
</div>
|
||||||
aria-label="Reset the stream"
|
)}
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
onClick={() => setLowBandwidth(false)}
|
|
||||||
>
|
|
||||||
<MdOutlineRestartAlt className="size-5 text-primary-variant" />
|
|
||||||
<div className="text-primary-variant">Reset stream</div>
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{isRestreamed && (
|
{isRestreamed && (
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
@ -1309,7 +1344,39 @@ function FrigateCameraFeatures({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3 flex flex-col gap-5">
|
<div className="mt-3 flex flex-col gap-5">
|
||||||
{Object.values(camera.live.streams).length > 1 && (
|
{!isRestreamed && (
|
||||||
|
<div className="flex flex-col gap-2 p-2">
|
||||||
|
<Label>Stream</Label>
|
||||||
|
<div className="flex flex-row items-center gap-1 text-sm text-muted-foreground">
|
||||||
|
<LuX className="size-4 text-danger" />
|
||||||
|
<div>Restreaming is not enabled for this camera.</div>
|
||||||
|
<Popover>
|
||||||
|
<PopoverTrigger asChild>
|
||||||
|
<div className="cursor-pointer p-0">
|
||||||
|
<LuInfo className="size-4" />
|
||||||
|
<span className="sr-only">Info</span>
|
||||||
|
</div>
|
||||||
|
</PopoverTrigger>
|
||||||
|
<PopoverContent className="w-80 text-xs">
|
||||||
|
Set up go2rtc for additional live view options and audio for
|
||||||
|
this camera.
|
||||||
|
<div className="mt-2 flex items-center text-primary">
|
||||||
|
<Link
|
||||||
|
to="https://docs.frigate.video/configuration/live"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="inline"
|
||||||
|
>
|
||||||
|
Read the documentation{" "}
|
||||||
|
<LuExternalLink className="ml-2 inline-flex size-3" />
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</PopoverContent>
|
||||||
|
</Popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{isRestreamed && Object.values(camera.live.streams).length > 0 && (
|
||||||
<div className="mt-1 p-2">
|
<div className="mt-1 p-2">
|
||||||
<div className="mb-1 text-sm">Stream</div>
|
<div className="mb-1 text-sm">Stream</div>
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user