forked from External/mediamtx
webrtc: support reading and proxying stereo PCMU/PCMA tracks (#3402)
This commit is contained in:
parent
6da8aee64f
commit
ca6e1259fb
8 changed files with 221 additions and 64 deletions
|
|
@ -376,11 +376,10 @@ const editOffer = (sdp) => {
|
|||
const sections = sdp.split('m=');
|
||||
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
const section = sections[i];
|
||||
if (section.startsWith('video')) {
|
||||
sections[i] = setCodec(section, videoForm.codec.value);
|
||||
} else if (section.startsWith('audio')) {
|
||||
sections[i] = setAudioBitrate(setCodec(section, audioForm.codec.value), audioForm.bitrate.value, audioForm.voice.checked);
|
||||
if (sections[i].startsWith('video')) {
|
||||
sections[i] = setCodec(sections[i], videoForm.codec.value);
|
||||
} else if (sections[i].startsWith('audio')) {
|
||||
sections[i] = setAudioBitrate(setCodec(sections[i], audioForm.codec.value), audioForm.bitrate.value, audioForm.voice.checked);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -391,9 +390,8 @@ const editAnswer = (sdp) => {
|
|||
const sections = sdp.split('m=');
|
||||
|
||||
for (let i = 0; i < sections.length; i++) {
|
||||
const section = sections[i];
|
||||
if (section.startsWith('video')) {
|
||||
sections[i] = setVideoBitrate(section, videoForm.bitrate.value);
|
||||
if (sections[i].startsWith('video')) {
|
||||
sections[i] = setVideoBitrate(sections[i], videoForm.bitrate.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue