Compare commits
5 Commits
c4d6cdd209
...
LINXD-2270
Author | SHA1 | Date | |
---|---|---|---|
451fff0a6b | |||
a568e542a7 | |||
14af825eab | |||
f3ba6d37c2 | |||
a4356f06be |
@ -20811,15 +20811,28 @@ 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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('----------stream', stream);
|
||||||
|
console.log('stream.getAudioTracks()', stream.getAudioTracks());
|
||||||
socket.emit('consumer-resume')
|
socket.emit('consumer-resume')
|
||||||
|
|
||||||
remoteVideo.srcObject = stream
|
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()
|
remoteVideo.play()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -20860,24 +20873,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
|
||||||
}
|
}
|
||||||
|
@ -453,15 +453,28 @@ 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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('----------stream', stream);
|
||||||
|
console.log('stream.getAudioTracks()', stream.getAudioTracks());
|
||||||
socket.emit('consumer-resume')
|
socket.emit('consumer-resume')
|
||||||
|
|
||||||
remoteVideo.srcObject = stream
|
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()
|
remoteVideo.play()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -502,24 +515,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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user