Search code examples
laravelvue.jswebrtcaudio-streamingvideochat

Webrtc video/audio chat in Laravel+Vue.JS


I am making a video+voice chat in webrtc. The issue i am facing is that my voice is coming back to me and other person's to him. We both can listen each other but we both should not listen our own voices in our speakers. We are using headphones and away from each other. This is not an echo issue. If someone know any configuration option for this or any other solution please let me know.

VueJS:

export default {

    props: ['conversation' , 'currentUser', 'threads'],
    data() {
        return {
          data:"",
            conversationId : this.conversation.conversationId,
            channel : this.conversation.channel_name,
            messages : this.conversation.messages,
            withUser : this.conversation.user,
            text : '',
            constraints : {
                audio: true,
                video: false
            },
        }
    }

I am using this api:

      navigator.mediaDevices.getUserMedia({
        audio: true,
        video: false
    })

Solution

  • Make sure the local video is muted. See e.g. the left video on https://simpl.info/rtcpeerconnection/ If you can hear yourself before you are even connected that is most likely the issue.