This commit is contained in:
Sergiu Toma 2022-12-22 09:26:37 +02:00
parent f3ba6d37c2
commit 14af825eab
2 changed files with 38 additions and 36 deletions

View File

@ -20811,6 +20811,7 @@ const connectRecvTransport = async () => {
if (audioParams) { if (audioParams) {
console.log('❗ Have AUDIO stream to consume'); console.log('❗ Have AUDIO stream to consume');
let audioTrack = await getAudioTrask(audioParams) let audioTrack = await getAudioTrask(audioParams)
console.log('audioTrack', audioTrack);
stream.addTrack(audioTrack) stream.addTrack(audioTrack)
} else { } else {
console.log('❗ Don\'t have AUDIO stream to consume'); console.log('❗ Don\'t have AUDIO stream to consume');
@ -20866,24 +20867,24 @@ const getAudioTrask = async (audioParams) => {
const audioTrack = consumerAudio.track const audioTrack = consumerAudio.track
audioTrack.applyConstraints({ // audioTrack.applyConstraints({
audio: { // audio: {
advanced: [ // advanced: [
{ // {
echoCancellation: {exact: true} // echoCancellation: {exact: true}
}, // },
{ // {
autoGainControl: {exact: true} // autoGainControl: {exact: true}
}, // },
{ // {
noiseSuppression: {exact: true} // noiseSuppression: {exact: true}
}, // },
{ // {
highpassFilter: {exact: true} // highpassFilter: {exact: true}
} // }
] // ]
} // }
}) // })
return audioTrack return audioTrack
} }

View File

@ -453,6 +453,7 @@ const connectRecvTransport = async () => {
if (audioParams) { if (audioParams) {
console.log('❗ Have AUDIO stream to consume'); console.log('❗ Have AUDIO stream to consume');
let audioTrack = await getAudioTrask(audioParams) let audioTrack = await getAudioTrask(audioParams)
console.log('audioTrack', audioTrack);
stream.addTrack(audioTrack) stream.addTrack(audioTrack)
} else { } else {
console.log('❗ Don\'t have AUDIO stream to consume'); console.log('❗ Don\'t have AUDIO stream to consume');
@ -508,24 +509,24 @@ const getAudioTrask = async (audioParams) => {
const audioTrack = consumerAudio.track const audioTrack = consumerAudio.track
audioTrack.applyConstraints({ // audioTrack.applyConstraints({
audio: { // audio: {
advanced: [ // advanced: [
{ // {
echoCancellation: {exact: true} // echoCancellation: {exact: true}
}, // },
{ // {
autoGainControl: {exact: true} // autoGainControl: {exact: true}
}, // },
{ // {
noiseSuppression: {exact: true} // noiseSuppression: {exact: true}
}, // },
{ // {
highpassFilter: {exact: true} // highpassFilter: {exact: true}
} // }
] // ]
} // }
}) // })
return audioTrack return audioTrack
} }