dimircea / WebRTC

Various applications and examples implemented by using WebRTC
151 stars 201 forks source link

not working in my node app. #2

Open nasr18 opened 8 years ago

nasr18 commented 8 years ago

How do i config this in my node app??? im getting 'upgrade required. after providinghttps` its not working. keep on loading.

dimircea commented 8 years ago

You have to use HTTPS protocol, very likely you are using HTTP or you have missed something in the process of going from HTTP to HTTPS, and thus you get that message. Almost every web browsers that supports WebRTC allows it to run ONLY via HTTPS for security and privacy reasons. This change happened a few months back, and is nothing we can do to allow HTTP. Check in both sides, the client code and server code that you deal with HTTPS and not HTTP.

Check my article here :Building a Video/Audio Chat Web App with WebRTC for some more details.

nasr18 commented 8 years ago

how do i initiate the app??? there is no package.json. but i did executing npm install ws and then node server and after hitting https://localhost:3434 it keep on loading. am i doing correctly??

dimircea commented 8 years ago

1) Yes, ws is what you need.

2) Check your JS console (CTRL+ SHIFT + J) and also look on the browser development tools in the network console, to see what happens really.

3) In the client application, be sure that you are using wss protocol for web sockets.

4) your HTML file must be behind a web server (e.g., Apache), otherwise will not work. The WebRTC API and file:// protocol are not friends.

nasr18 commented 8 years ago

you there??? pls be online. i will check it out now.

ntlzz93 commented 7 years ago

the same problem with me. Please provide the solution fix it soon!

dimircea commented 7 years ago

The app works just fine. You have for sure a configuration issue on your server side. I will try to provide some guidelines on how to have this app up and running on a standard server configuration.

dimircea commented 7 years ago

The source code was now improved, and it includes HTTPS management on the backend NodeJS app. It also include free SSL certificate (self signed). The dependency modules are now available via package.json so just execute "npm install". The associated documentation (see http://web-engineering.info/node/57) was updated to reflect the changes. The current code was tested with Firefox and Chrome and works without problems. Notice that sometimes you may want to restart the web browser if it looks like you can't get an audio/video connection.