From 2e6d83e1aeb31fa9abea7fe2d21946f98b09da1e Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 21 Oct 2022 22:26:57 -0700 Subject: [PATCH] onvif: relax backchannel search to accept whitespace --- plugins/onvif/src/onvif-intercom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/onvif/src/onvif-intercom.ts b/plugins/onvif/src/onvif-intercom.ts index cf56bf14b..0ec662651 100644 --- a/plugins/onvif/src/onvif-intercom.ts +++ b/plugins/onvif/src/onvif-intercom.ts @@ -52,7 +52,7 @@ interface CodecMatch { channels: string; } -const codecRegex = /a=rtpmap:(\d+) (.*?)\/(\d+)/g +const codecRegex = /a=rtpmap:\s*(\d+) (.*?)\/(\d+)/g function* parseCodecs(audioSection: string): Generator { for (const match of audioSection.matchAll(codecRegex)) { const [_, payloadType, sdpName, sampleRate, _skip, channels] = match;