Not working on local
Notice: Undefined property: stdClass::$v in C:\xampp\htdocs\Video-Call-App-master\Server.php on line 15
Notice: Trying to get property 'iceServers' of non-object in C:\xampp\htdocs\Video-Call-App-master\Server.php on line 15
null****

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:

Hello, I have done that still I am getting error. it is not getting connected.
do you have any idea about this? -> https://stackoverflow.com/questions/62869583/php-web-socket-not-connect-in-ssl
Thank you
On Mon, Jul 13, 2020 at 12:06 PM xuzhousoft09 [email protected] wrote:
Hi, based on your Notice, I doubt your Server.php is not configured correctly. You need a turn/stun server https://xirsys.com/, and the Server.php file should be configured like this:
[image: image] https://user-images.githubusercontent.com/12077057/87277791-9e5b7380-c515-11ea-950a-b1d42a4bb683.png
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amirsanni/Video-Call-App/issues/45#issuecomment-657387148, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALRRHG7P4YFRBYSBCQVFWZLR3KTPVANCNFSM4OYGDN5Q .
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.
@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.