Comments (4)
Hi, you should configure your apache proxy correctly.
In my case:
/etc/apache2/sites-available/default-ssl.conf
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName 192.168.0.109
RewriteCond ${HTTP:Upgrade} websocket [NC]
RewriteCond ${HTTP:Connection} upgrade [NC]
RewriteRule /(.*) ws://192.168.0.109:8080$1 [P,L]
ProxyPass /secure/ ws://192.168.0.109:8080/
ProxyPassReverse /secure/ ws://192.168.0.109:8080/
ProxyRequests off
......
config.js
'use strict';
const appRoot = 'https://192.168.0.109/video-call-app/';
const wsUrl = 'wss://192.168.0.109/secure';
const spinnerClass = 'fa fa-spinner faa-spin animated';
comm.js
const room = getRoom();
window.addEventListener('load', function(){
console.log(${wsUrl});
wsChat = new WebSocket(${wsUrl}/comm);
server.php
require 'vendor/autoload.php';
use Amir\Comm;
use Ratchet\App;
//set an array of origins allowed to connect to this server
$allowed_origins = ['192.168.0.109', '127.0.0.1'];
// Run the server application through the WebSocket protocol on port 8080
$app = new App('192.168.0.109', 8080, '0.0.0.0');//App(hostname, port, 'whoCanConnectIP', '')
//create socket routes
//route(uri, classInstance, arrOfAllowedOrigins)
$app->route('/comm', new Comm, $allowed_origins);
//run websocket
$app->run();
restart your apache and your video-call-app
I hope it can help you.
from video-call-app.
Hi, based on your Notice, I doubt your Server.php is not configured correctly.
You need a turn/stun server, and the Server.php file should be configured like this:
from video-call-app.
from video-call-app.
@ElsnerPHP If you're testing on local, you should be able to connect to the web socket server successfully without using SSL (i.e. ws
). However, the remote user won't be able to access their media devices (Camera and Microphone) unless you have SSL setup.
from video-call-app.
Related Issues (20)
- Cannot read property 'version' of undefine HOT 3
- PHP ERROR, SERVER CONNECT HOT 2
- WebSocket connection to 'ws://192.168.64.3:8080/ws/comm' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED HOT 2
- White screen, not able to create room HOT 9
- Class not found HOT 17
- Install service on Ubuntu HOT 1
- TURN STUN service HOT 1
- Cannot destructure property 'url' of 'iceServer' as it is null. HOT 1
- Steps not properly mentioned. What to do with Server.php file HOT 2
- sever not cnnected HOT 43
- Multi User Video Chat HOT 1
- everyone can use the chat rooms without any authentication HOT 2
- timer not working
- It does not establish connections
- Lack of response?
- connect to websocket online!!!
- Como funciona esto?
- RTCpeerConnection
- Unable to connect to the chat server! Kindly refresh
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from video-call-app.