amirsanni / Video-Call-App

A text, audio and video chat application built with webRTC and Ratchet (PHP WebSocket)
230 stars 144 forks source link

camera capture not displaying at all on both ends. #19

Closed greigmarshalseiy closed 6 years ago

greigmarshalseiy commented 6 years ago

Hi i have setup the app as per your instructions. Below is what I am doing.

  1. I have setup my own PHP Ratchet websocket server.
  2. I use your app to connect to that websocket server on port 8080. Shows connected.
  3. I am able to connect to the room from 2 devices (my laptop and from my mobile). I am able to send messages over the chat from device 1 and the same is received by 2nd device. Also vice-versa.
  4. However, when i make a camera call, and accept it on other device. No camera shows on both ends.
  5. I am seeing that the H/W camera light on laptop is active which means it is capturing the stream but isn't displaying on the myvid html element. Also peer video too not visible.

Could you please suggest what needs to be checked? Thanks in advance.

Imp Note: Earlier, I had written my own WebRTC code (from Mozilla) and it shows the camera capture without any issues. This is just an FYI to rule out any issues with WebRTC not working on my machine :-)

amirsanni commented 6 years ago

Glad to hear that you were able to get it working as expected except for the camera issue.

I'll suggest you revoke the permission given to the app to use your camera on both devices, then try again. Ensure no other app is using the camera at the same time.

greigmarshalseiy commented 6 years ago

I have traced where the issue lies. Thanks Amir, hats off to you 👍

robagi commented 5 years ago

@greigmarshalseiy Could you tell us how you solved the problem?

namnode commented 5 years ago

@greigmarshalseiy Could you tell us how you solved the problem? My case is change to

document.getElementById('myVid').srcObject = myStream; document.getElementById('peerVid').srcObject = e.streams[0];