Compare commits
5 Commits
c4d6cdd209
...
LINXD-2270
Author | SHA1 | Date | |
---|---|---|---|
451fff0a6b | |||
a568e542a7 | |||
14af825eab | |||
f3ba6d37c2 | |||
a4356f06be |
@ -20811,15 +20811,28 @@ 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');
|
||||
}
|
||||
|
||||
console.log('----------stream', stream);
|
||||
console.log('stream.getAudioTracks()', stream.getAudioTracks());
|
||||
socket.emit('consumer-resume')
|
||||
|
||||
remoteVideo.srcObject = stream
|
||||
remoteVideo.setAttribute('autoplay', true)
|
||||
// remoteVideo.autoplay = true
|
||||
remoteVideo.controls = true;
|
||||
remoteVideo.muted = true;
|
||||
remoteVideo.loop = true;
|
||||
remoteVideo.setAttribute('playsinline', '');
|
||||
remoteVideo.src = stream;
|
||||
remoteVideo.volume = 1.0;
|
||||
|
||||
// window.localStream = stream; // A
|
||||
// window.localAudio.srcObject = stream; // B
|
||||
// window.localAudio.autoplay = true; // C
|
||||
|
||||
remoteVideo.play()
|
||||
.then(() => {
|
||||
@ -20860,24 +20873,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
|
||||
}
|
||||
|
@ -453,15 +453,28 @@ 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');
|
||||
}
|
||||
|
||||
console.log('----------stream', stream);
|
||||
console.log('stream.getAudioTracks()', stream.getAudioTracks());
|
||||
socket.emit('consumer-resume')
|
||||
|
||||
remoteVideo.srcObject = stream
|
||||
remoteVideo.setAttribute('autoplay', true)
|
||||
// remoteVideo.autoplay = true
|
||||
remoteVideo.controls = true;
|
||||
remoteVideo.muted = true;
|
||||
remoteVideo.loop = true;
|
||||
remoteVideo.setAttribute('playsinline', '');
|
||||
remoteVideo.src = stream;
|
||||
remoteVideo.volume = 1.0;
|
||||
|
||||
// window.localStream = stream; // A
|
||||
// window.localAudio.srcObject = stream; // B
|
||||
// window.localAudio.autoplay = true; // C
|
||||
|
||||
remoteVideo.play()
|
||||
.then(() => {
|
||||
@ -502,24 +515,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
|
||||
}
|
||||
|
Reference in New Issue
Block a user