RTCMultiConnection
RTCMultiConnection copied to clipboard
echos my own voice on unmute
Hello Muaz, Thanks for your awsome code on webrtc multiconnection trying achive mute and unmute using this docs =>https://www.rtcmulticonnection.org/docs/mute https://www.rtcmulticonnection.org/docs/unmute/ firstly this code for mute =>var localStream = connection.attachStreams[0]; localStream.mute('both'); and this code for unmute =>var localStream = connection.attachStreams[0]; localStream.unmute('both'); is not working on my end tried many times and the second thing is after using this code => var firstRemoteStream = connection.streamEvents.selectFirst({ remote: true }).stream; firstRemoteStream.unmute(); for unmute the echo of my own voice is heard so i need help or can you provide any solution for the voice echo after unmute
Thanks in advance
In my case, I resolved the issue in this way. try this.
- connection.autoCreateMediaElement = false; //prevent create default media element
- create video element in connection.onstream callback function var video = document.createElement('video'); try { video.setAttributeNode(document.createAttribute('autoplay')); video.setAttributeNode(document.createAttribute('playsinline')); } catch (e) { video.setAttribute('autoplay', true); video.setAttribute('playsinline', true); } video.srcObject = event.stream;
add "playsinline" to local video element
I have the same Problem how did you fixed it?