lynckia / licode

Open Source Communication Provider based on WebRTC and Cloud technologies
http://lynckia.com/licode
MIT License
3.1k stars 1.01k forks source link

Local Audio is transferred back inside of a remote stream when using MCU #318

Open xMysteriox opened 9 years ago

xMysteriox commented 9 years ago

I'm having a serious problem with the local audio being transferred back within the remote streams. This does not happen when using P2P.

I've already spent A LOT of hours trying to figure out why this is happening, this is what I have concluded so far:

There is only one video object which is the remote stream, the local stream is not being played in any way.

Any help, hints or suggestions would be appreciated!

lodoyun commented 9 years ago

Everything points to echo except this

Muting / setting the volume to 0 of the remote stream does not mute the local audio being transferred, it only mutes the audio of the remote stream

However I haven't been able to reproduce this. From the MCU standpoint I can guarantee that it is not resending your own stream back unless you explicitly subscribe to it. Could that be the case? This also makes sense because you cannot subscribe to your own stream in p2p the way Licode is built.

Check if you have this or something similar in your client code.

xMysteriox commented 9 years ago

Awesome, I managed to fix it, thanks for the hint! :+1:

My implementation of Licode is part of a larger Application with multiple local camera sources and types so I wrote a method for checking if the stream is local. Instead of implementing it, I used the "local" attribute of the stream, which of course didn't work...

What I don't understand is why the local audio-stream was being played, without there being a Player / HTML-Object for it. As soon as I removed the remote video-object the local audio-stream was gone aswell.

sciaz commented 8 years ago

It does not work for me .

    if (localStream.getID() !== stream.getID()) {
                                room.subscribe(stream);

Could you show me how to solve it? it will be appreciated.