New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sever not cnnected #43
Comments
Did the you start the web socket server?
Amir Sanni
…On Fri, 15 May 2020, 2:29 am kps92, ***@***.***> wrote:
i have setup the application in localhost when i open chat room it says
unable to connevt to server how should i resolve it
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#43>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOTAMP6LL2CEOXYBUXD7QDRRSLGJANCNFSM4NBFMARA>
.
|
Yes I executes the command server. Php but it shows unable to connect server My port is localhost ,127.0.0.1, port 80 |
Can you share what's you have in ws/bin/server.php? Your web socket is
meant to listen on a different port from your http server.
Amir Sanni
…On Fri, 15 May 2020, 5:29 am kps92, ***@***.***> wrote:
Yes I executes the command server. Php but it shows unable to connect
server
My port is localhost ,127.0.0.1, port 80
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOTAMNFEKHDGMUO7TM2ODDRRTAL7ANCNFSM4NBFMARA>
.
|
|
please find the zip file of a code |
Hi @kps92 Will look into the file now and revert hopefully tomorrow. Sorry for the late response. |
I noticed 2 issues:
I updated both as shown below:
You may need to update your |
Hello, amirsanni I have a same problem at my local ubuntu server. my config files are: js/config.js:
ws/bin/server.php
When I ran 'php ws/bin/server.php', I got an error:
Could you please tell me how to resolve this error? |
The error is from |
The command line part works as expected since we are not printing anything in the console. The error is from your config.js file. You need to include the port. Change |
Hello amirsanni, Thank you for your advise. I changed
to
I also changed the Server.example.php to Server.php and edited it to
Then, I tested it with my two computers (LAN with static IPs). Not only that, there is a ‘500 Internal Server Error’. |
Read your comments again. Which of the devices have these errors? My guess is remote, right? |
yes, I created it as below:
|
Sorry, I updated my comment. Check the cause of the 500 error. This may be a CORS issue. Also, note that you won't be able to access the devices' mic and camera unless you are on SSL. |
Both of my two computers have the 500 error. |
Can you check the network tab for the exact error? |
I need the Network tab. Open the Network tab and click the request to Server.php that fails. |
The preview section, please |
Guess you have error_reporting turned off. The error is from the file and this line |
Hello, amirsanni Thank you for your quickly response. my Server.php is: I checked my apache error.log, it said:
|
You need to install and enable CURL. |
Hello amirsanni, Thank you for your support! I resoved the 500 error by installing the curl module. I can do text message chat between my two LAN computers now. But, another problem is the audio and video call funtions dosen't work for me.
On the other hand, the caller computer dosen't get any error. I think above errors are due to my config.js and server.php are not configured correctly. my config.js
my server.php
Could you please give me some advise? |
This error si because you're trying to connect to web socket without SSL. You have two options but most likely, the second is your best bet because last I checked, Ratchet does not support SSL (wss) directly. Option 1: Change the Option 2: Use wss and create a proxy that will route the connection to the ws URL that you currently have. |
Hello, amirsanni Thank you for your quickly respongse.
I did this, but got an error
I think I didn't configure the proxy correctly, could you please give me some instruction. Base on this article refer, I installed proxy, proxy_http, and proxy_wstunnel. I also added the 'VirtualHost' into my apache2.conf file as below.
my config.js is:
my server.php is:
|
I am not sure of the rewrite rule you have there. Update your proxies to the below:
Then update the URL in config.js to the below:
Note: You can use any string you prefer in place of secure. |
This is a result of the proxy. Something is still wrong. I don't understand
why you have rewrite condition for the web socket URL and what the
condition does. Same for `ProxyRequest off`.
The issue might be related to both.
I used the same configuration I shared with you and it works well.
Can you explain what they do?
Amir Sanni
…On Fri, 3 Jul 2020, 6:04 pm xuzhousoft09, ***@***.***> wrote:
Hello, amirsanni
Thank you for your advise.
I changed my 'VirtualHost' to
<VirtualHost *:443>
ServerName 192.168.0.109
RewriteEngine on
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
const appRoot = 'http://192.168.0.109/video-call-app/';
const wsUrl = 'wss://192.168.0.109/secure';
const spinnerClass = 'fa fa-spinner faa-spin animated';
But I got a new error:
comm.js:28 WebSocket connection to 'wss://192.168.0.109/secure' failed:
Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
[image: image]
<https://user-images.githubusercontent.com/12077057/86487037-9e2ddc00-bd8f-11ea-8e76-7a3cb68b20b3.png>
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOTAMJLTHGX7PDNCUK2LJTRZYFSBANCNFSM4NBFMARA>
.
|
Oh! Yes, it should be in the SSL config file.
Once the recording is stopped, it'll be downloaded to your device.
Amir Sanni
…On Sat, 4 Jul 2020, 4:40 am xuzhousoft09, ***@***.***> wrote:
Many thanks. It worked.
I should have written the into the 'default-ssl.conf' file.
But, how to record the video or audio contents?
I clicked the 'Record' button, but where is the recorded files?
[image: image]
<https://user-images.githubusercontent.com/12077057/86504443-f47c3880-bdea-11ea-929a-57e2add9190e.png>
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOTAMMX5UGFNUPHHQURH2LRZ2QDXANCNFSM4NBFMARA>
.
|
hi amir its working is it possible to have more than 2 person join this call |
thanks i got it |
Hello, amir after the callee clicked the 'start audio call' button to accept the audio call, a javascript error happened.
I searched about this error, many people said can use the 'muted' tag to resolve it, but even if I added the 'muted' tag, it didn't disappear. I changed below codes in 'video-call-app comm.html' audio id="callerTone" src="media/callertone.mp3" loop preload="auto" to audio id="callerTone" src="media/callertone.mp3" loop preload="auto" muted above change can mute the ring tone, but the error still exits. |
That error has nothing to do with the server but the browser you're using. Latest version of major browsers will throw this error if you try to play an audio if the user is yet to interact with the page. Do this test, have the recipient move his noise about or click the chat before calling him, you didn't get this error. But if he loads the page without doing anything and you call him, the error will occur. I'm not sure of a solution for this. Only solution is to have the user interact with the page before playing the audio. Programmatically triggering an event won't fix it either. |
You can click the link on the error for more information. I can do an update to catch the error and display a friendly message or trigger something. |
Yes, maybe you should 'trigger something or display a friendly message' during your next update. |
Hello Amir Is it possible to record the voice/video of both the users on both the users' devices (or on the server side)? Because I want to record the audio and video chat forcibly.
But, after that, I found a problem. In my case, the problem is, because an user can change the javascript code in his browser, he can disable the recording function. |
The fact that you can only record yourself is not a problem, but what was implemented. With the current solution, the best option is to record both streams separately. So yes, you can record the other user but the streams will be recorded separately. |
Hello, amir Thank you for your answer. I want to record both sides of a call.
That's OK. |
Yes but you have to implement this functionality first. |
i have setup the application in localhost when i open chat room it says unable to connevt to server how should i resolve it
The text was updated successfully, but these errors were encountered: