onvif: relax backchannel search to accept whitespace

This commit is contained in:
Koushik Dutta
2022-10-21 22:26:57 -07:00
parent 5f129c6d86
commit 2e6d83e1ae

View File

@@ -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<CodecMatch> {
for (const match of audioSection.matchAll(codecRegex)) {
const [_, payloadType, sdpName, sampleRate, _skip, channels] = match;