From 2c013935666f576554ac7e94f171346c37a6075a Mon Sep 17 00:00:00 2001 From: Amir Date: Mon, 13 May 2019 14:52:29 +0100 Subject: [PATCH 1/5] 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 2/5] 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. From 506331c51bb3d44bf811fe473ae2bf4c134ee023 Mon Sep 17 00:00:00 2001 From: Amir Sanni Date: Mon, 13 May 2019 16:16:56 +0100 Subject: [PATCH 3/5] Add auto-detect of page protocol --- js/comm.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/comm.js b/js/comm.js index 6396cf5..20a86a5 100644 --- a/js/comm.js +++ b/js/comm.js @@ -18,9 +18,17 @@ var myPC; var awaitingResponse; var streamConstraints; var myMediaStream; +let wsChat; const room = getRoom(); -const wsChat = new WebSocket("ws://localhost:8080/comm"); + +if(location.protocol === 'http:'){ + wsChat = new WebSocket("ws://1410inc.xyz:8080/comm"); +} + +else{ + wsChat = new WebSocket("wss://1410inc.xyz:8080/wss2/comm"); +} window.addEventListener('load', function(){ startCounter();//shows the time spent in room From 22e98690ab1b048cecd6abbabb81c2a382efdfa6 Mon Sep 17 00:00:00 2001 From: Amir Sanni Date: Mon, 13 May 2019 16:18:40 +0100 Subject: [PATCH 4/5] Code refractor --- ws/bin/server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ws/bin/server.php b/ws/bin/server.php index a96d595..13adb07 100644 --- a/ws/bin/server.php +++ b/ws/bin/server.php @@ -7,7 +7,7 @@ * @date 23-Dec-2016 */ -require(realpath(dirname(__FILE__) . '/../') .'/vendor/autoload.php'); +require '../vendor/autoload.php'; use Amir\Comm; From e96cbd3cbda49ec853b9ed4d0c795806f72b122c Mon Sep 17 00:00:00 2001 From: Amir Date: Thu, 16 May 2019 23:55:52 +0100 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d490baa..df4d0f3 100644 --- a/README.md +++ b/README.md @@ -47,4 +47,4 @@ To host this online, you'll need to set up a few things: # 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. + You can test at https://1410inc.xyz/video-call-app.