title: Uncaught (in promise) DOMException: Could not start video source , Uncaught Error: The error you provided does not contain a stack trace
body: <p>Hey guys am trying to run a webrtc video call using react, node, socket and peerjs, if i try starting a video chat with chrome it works, if i run chrome as private and connect as second user using the video link it works but if i try connecting from another browser using same video link e.g edge or opera it doesn't work instead it console log an error..</p>
  <p><strong>My code</strong></p>
  <pre><code>import React from 'react'
  import io from 'socket.io-client'
  import Peer from 'peerjs'
  import './ClassWall.css'
  
  const socket = io.connect('http://localhost:4000/')
  
  
  class LiveClass extends React.Component{
      constructor(){
          super()
          this.state = {
              userId :'',
              classStatus: '',
          }
      } 
      
      async componentDidMount(){
          const videoGrid = document.getElementById('video-grid')
          const Myvideo = document.createElement('video')
          Myvideo.muted = true
  
  //set user id of logged in user
          try {
              const response = await fetch('http://localhost:4000/Auth//UserID/id',{
                  headers:{token:localStorage.token}
              })
              const Parse = await response.json()
              this.setState({userId:Parse})
          } catch (error) {
                          
          }
          //get user id to connect through peer
          const myPeer = new Peer(this.state.userId,{
              host: '/',
              port:4001
          })
          //connect and share video stream
          try {
              navigator.mediaDevices.getUserMedia({
                  video:true,
                  audio:true
              }).then(stream=&gt;{
                  this.AddVideoStream(Myvideo,stream)
             
              socket.on('user-connected',userId=&gt;{
                      connectToNewUser(userId,stream)
                      console.log('new user',userId)
                  })
                  
              })
              
              myPeer.on('open',id =&gt;{
                  socket.emit('join-class',this.props.match.params.id,id)
              })
             
              
          } catch (error) {
              console.log('error',error)    
          }
          this.checkIfClassTrue()
          //get new user video stream and connect
          
          async function connectToNewUser(userId,stream){
              const call  = await myPeer.call(userId,stream)
              const video = document.createElement('video')
                  call.on('stream',userVideostream=&gt;{
                      this.AddVideoStream(video,userVideostream)
                  })
              call.on('close',()=&gt;{
                  video.remove()
              })
          console.log('connected with user')
          }
      }
      //check if its class
      checkIfClassTrue = async()=&gt;{
          const response = await fetch(`http://localhost:4000/liveclass/${this.props.match.params.id}`)
          const Parse = await response.json()
          this.setState({classStatus:Parse})
      }
      //Add video stream
      AddVideoStream = async(video,stream) =&gt;{
          const videoGrid = document.getElementById('video-grid')
          video.srcObject = stream
          video.addEventListener('loadedmetadata', () =&gt;{
              video.play()
          })
          videoGrid.append(video)
      }
  
      
      render(){
          return(
              &lt;div&gt;
                 {
                     this.state.classStatus === 'Not found'?
                     'not found':&lt;div id=&quot;video-grid&quot;&gt;&lt;/div&gt;
                 }
              &lt;/div&gt;
          )
      }
      }
  
  export default LiveClass
  </code></pre>
  <p>Error connecting with a different browser</p>
  <pre><code>Error1: Uncaught Error: The error you provided does not contain a stack trace.
  
  Error 2: Uncaught (in promise) DOMException: Could not start video source
  </code></pre>