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;