mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-11 05:35:25 +03:00
Fix possibly missing media info
This commit is contained in:
parent
4c756beb0e
commit
f208651b32
@ -10,8 +10,8 @@ type LiveProducerMetadata = {
|
||||
remote_addr: string;
|
||||
user_agent: string;
|
||||
sdp: string;
|
||||
medias: string[];
|
||||
receivers: string[];
|
||||
medias?: string[];
|
||||
receivers?: string[];
|
||||
recv: number;
|
||||
};
|
||||
|
||||
@ -21,8 +21,8 @@ type LiveConsumerMetadata = {
|
||||
remote_addr: string;
|
||||
user_agent: string;
|
||||
sdp: string;
|
||||
medias: string[];
|
||||
senders: string[];
|
||||
medias?: string[];
|
||||
senders?: string[];
|
||||
send: number;
|
||||
};
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
||||
return (
|
||||
cameraMetadata.producers.find(
|
||||
(prod) =>
|
||||
prod.medias.find((media) => media.includes("audio, sendonly")) != undefined,
|
||||
prod.medias && prod.medias.find((media) => media.includes("audio, sendonly")) != undefined,
|
||||
) != undefined
|
||||
);
|
||||
}, [cameraMetadata]);
|
||||
@ -112,7 +112,7 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
|
||||
return (
|
||||
cameraMetadata.producers.find(
|
||||
(prod) =>
|
||||
prod.medias.find((media) => media.includes("audio, recvonly")) != undefined,
|
||||
prod.medias && prod.medias.find((media) => media.includes("audio, recvonly")) != undefined,
|
||||
) != undefined
|
||||
);
|
||||
}, [cameraMetadata])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user