Browse Source

Merge script

pull/54/head
Amir Sanni 6 years ago
parent
commit
7c074fa2fc
  1. 9
      README.md
  2. 12
      js/comm.js
  3. 2
      ws/bin/server.php

9
README.md

@ -18,9 +18,9 @@ To test this app on your local server: @@ -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
@ -43,3 +43,8 @@ To host this online, you'll need to set up a few things: @@ -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 https://1410inc.xyz/video-call-app.

12
js/comm.js

@ -19,6 +19,7 @@ var awaitingResponse; @@ -19,6 +19,7 @@ var awaitingResponse;
var streamConstraints;
var myMediaStream;
let wsChat;
<<<<<<< HEAD
const room = getRoom();
if(location.protocol === 'http:'){
@ -27,6 +28,17 @@ if(location.protocol === 'http:'){ @@ -27,6 +28,17 @@ if(location.protocol === 'http:'){
else{
wsChat = new WebSocket("wss://1410inc.xyz/wss/comm");
=======
const room = getRoom();
if(location.protocol === 'http:'){
wsChat = new WebSocket("ws://1410inc.xyz:8080/comm");
}
else{
wsChat = new WebSocket("wss://1410inc.xyz:8080/wss2/comm");
>>>>>>> e96cbd3cbda49ec853b9ed4d0c795806f72b122c
}
window.addEventListener('load', function(){

2
ws/bin/server.php

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
* @date 23-Dec-2016
*/
require(realpath(dirname(__FILE__) . '/../') .'/vendor/autoload.php');
require '../vendor/autoload.php';
use Amir\Comm;

Loading…
Cancel
Save