amirsanni / Video-Call-App

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

Video doesn't work #25

Closed gildonei closed 5 years ago

gildonei commented 5 years ago

I deployed this app on address https://phpvideochat.lupahosting.com.br/ and tried to Connect over 2 different mobile phones and video didn't show up.

Any ideas?

karolkarp commented 5 years ago

createObjectUrl() is deprecated. Change it in comm.js from this -> document.getElementById("peerVid").src = window.URL.createObjectURL(e.streams[0]);

to this: document.getElementById("peerVid").srcObject = e.streams[0];

and from this: document.getElementById("myVid").src = window.URL.createObjectURL(myStream);

to this: document.getElementById("myVid").srcObject = myStream;

amirsanni commented 5 years ago

@gildonei Please let me know if that fixes it for you so I can update the code with it.

Also, can you try on two PCs so as to be able to check if there is an error message in the browser console?

gildonei commented 5 years ago

It worked, but only one vídeo was loaded. Got some error. Will continue doing tests. If you want, you can use the above URL as your Live Demo.

gildonei commented 5 years ago

Tried again with 1 mobile phone and a PC. Worked fine. Running more tests. Will keep up to date.