mediasoup-sample
mediasoup-sample copied to clipboard
I am setting up this on amazon aws server but not working
It is working on localhost but on amazon aws it is not working do we have to change ip address any where in code?
Yes, in server/config.js you have to change rtcAnnouncedIPv4
to the public IP address of your AWS server.
I have done like this is it right way?
rtcAnnouncedIPv4: 13.52.248.221,
http://localhost:8080/socket.io/?roomId=room1&peerName=Bob&EIO=3&transport=polling&t=N8u7qLQ
getting this error on console it should not localhost there my public ip should come where to change this
Please. inspect frontend/public files for matches.
thanks brother that issue has been resolved but i got one more
TypeError: Cannot read property 'getUserMedia' of undefined
may be this is because of ssl can you help me with this how to resolve this
Have you installed npm packages for the frontend app as mentioned in the Readme?
yes i have installed properly as per readme instructions
Hi @paragikjain ,@footniko, I am also getting the error TypeError: Cannot read property 'getUserMedia' of undefined. Can you please let me know if you have resolved it .
Regards, Hari Vyas
Are you using SSL?
HI, I am not using SSL But i am getting different error now . Failed to load resource: net::ERR_CONNECTION_REFUSED -- socket.io.js1 app.js:9 Uncaught ReferenceError: io is not defined at app.js:9
I am using nginx for reverser proxy at localhost:3000 Regards, Hari Vyas
@harivyas35 it means it can't find io (socket.io-client lib) that's been loaded with index.html
Make sure you started the server and change the port in index.html:
https://github.com/footniko/mediasoup-sample/blob/master/frontend/public/index.html#L5
HI, The server is running . Can you please suggest me to which port should i change .
Regards, Hari Vyas
Please, google how to use socket.io on server and client sides. Those are basic things that are not related to this sample. As I specified, you have to use the port your socket server is running on here: https://github.com/footniko/mediasoup-sample/blob/master/frontend/public/index.html#L5
HI , Thank you for your quick replies. My socket server is running on port 8080 And the same port i have used in index.html file . But still the error is coming .
Regards, Hari Vyas
I am using nginx for reverser proxy at localhost:3000 Are you using the app with Nginx or directly?
Failed to load resource: net::ERR_CONNECTION_REFUSED -- socket.io.js1
It clearly says it can't reach http://localhost:8080/socket.io/socket.io.js Make sure you can open it in your browser without errors
Hi , I am using the app with nginx , on Aamazon EC2 . Regards,
So, you have your app deployed to AWS ec2 and trying to reach it with localhost URL?
Change http://localhost:8080/socket.io/socket.io.js
to https://your-domain/socket.io/socket.io.js
Hi , I changed it tom my domain name . But still no luck . Below is the error . Failed to load resource: the server responded with a status of 404 (Not Found) app.js:9 Uncaught ReferenceError: io is not defined at app.js:9 The doamin is - http://ec2-13-233-96-31.ap-south-1.compute.amazonaws.com
Regards, Hari VYas
@harivyas35 http://ec2-13-233-96-31.ap-south-1.compute.amazonaws.com is not reachable. Make sure you configured your Nginx proxy properly
HI @footniko , Please check now (http://ec2-13-233-96-31.ap-south-1.compute.amazonaws.com ),it was closed by mistake , it is running now and the nginx config file is below. server { listen 80 default_server; server_name _;
location / { proxy_pass http://localhost:3000/; } }
The frontend is running at port 3000
@harivyas35 if it's the full code, it's wrong, please google how to configure Nginx with node.js apps. Also, make sure all the needed UDP ports are opened in AWS console