From 8be251062817a0cbf7bed182ff988825845b29a2 Mon Sep 17 00:00:00 2001 From: Gildonei Mendes Anacleto Junior Date: Thu, 25 Apr 2019 08:51:54 -0300 Subject: [PATCH 1/3] Fix bug loading video #25 createObjectUrl() is deprecated. Updating code with @karolkarp solution on issue #25 --- js/comm.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/comm.js b/js/comm.js index 6396cf5..0ba0f43 100644 --- a/js/comm.js +++ b/js/comm.js @@ -570,8 +570,7 @@ function startCall(isCaller){ //When remote stream becomes available myPC.ontrack = function(e){ - document.getElementById("peerVid").src = window.URL.createObjectURL(e.streams[0]); - // document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]); + document.getElementById("peerVid").srcObject = e.streams[0]; }; @@ -636,8 +635,7 @@ function setLocalMedia(streamConstraints, isCaller){ navigator.mediaDevices.getUserMedia( streamConstraints ).then(function(myStream){ - document.getElementById("myVid").src = window.URL.createObjectURL(myStream); - // document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]); + document.getElementById("myVid").srcObject = myStream; myPC.addStream(myStream);//add my stream to RTCPeerConnection From 2c013935666f576554ac7e94f171346c37a6075a Mon Sep 17 00:00:00 2001 From: Amir Date: Mon, 13 May 2019 14:52:29 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b28e0a..ac953c1 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ To test this app on your local server: - Works best on Chrome, Firefox and the latest versions of Opera desktop browser. -#Note +## Note To host this online, you'll need to set up a few things: -- Create Ratchet as a service so it can run persistently on your server. Check the file *ratchet_as_a_service.txt* for the guide on how to do this on CentOS7 +- Create Ratchet as a service so it can run persistently on your server. Check the file *create-ratchet-as-a-service-with-daemon.txt* for the guide on how to do this on CentOS7 - If on SSL, Ratchet won't work unless you make some changes on your server. - Enable mod_proxy.so - Enable mod_proxy_wstunnel.so From 286546b0f83e58904506725433f1b1a0dcf95d88 Mon Sep 17 00:00:00 2001 From: Amir Date: Mon, 13 May 2019 16:15:30 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ac953c1..d490baa 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,8 @@ To host this online, you'll need to set up a few things: - Once you put the Proxypass directive there, restart your server and there you go. This [answer on Stack Overflow](https://stackoverflow.com/a/28393526/4522890) should be helpful. + + + + # Demo + You can test at http://1410inc.xyz/video-call-app. Please test on Firefox as Chrome will not grant access to media devices if not HTTPS.