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

View File

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