staskobzar / vue-audio-visual

VueJS audio visualization components
MIT License
693 stars 111 forks source link

Add ability to mute audio output #41

Closed pasloc closed 4 years ago

pasloc commented 4 years ago

I want to build an application where the user only sees his own microphone input. I'm using the av-media component which works really good, but it always outputs the audio.

staskobzar commented 4 years ago

Hello, It just depends what MediaStream you supply to the component. If you use navigator.mediaDevices.getUserMedia it should be ok. If you use webrtc and RTCPeerConnection, try to get your sender tracks with getSenders() and then create a new MediaStream which you can feed to the av-media component.

staskobzar commented 4 years ago

https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/getSenders

pasloc commented 4 years ago

Thank you for your quick reply. I solved the problem. I had to disable the connect-distination. My problem was that I tried this by setting :connect-destination="false". This was not working because there is a typo. The component uses "distination" and the documentation says dist.. and desti... I copied the wrong example :/

staskobzar commented 4 years ago

Sorry, you are right! I have updated source code and has set connect-destination default to false. Just released new v2.0.3, please upgrade and try. Keep in mind that it is false now. Thanks and good luck

pasloc commented 4 years ago

Thank you so much. Now it's working as you said. I'm really happy :)