WebRTC guidance

Thinking about WebRTC more and more these days,

I found a sample created by Satoru Nakata, so far when i start the sample, i get an error, but this seems to be related to HTTP not allowed on HTTPS.

https://playcanvas.com/project/370406/overview/webrtc-test

Anyone else shed some light on this topic? Where would be a good place to start?

You can probably get away with forking that project and changing it from http to https for the connection to the peerjs server. Or changing the https to http on the playcanvas app URL (eg. http://playcanv.as/p/6ovmS8Bs/).

you can no longer run http over https, this was policy changed maybe 3-5 months ago. always get an error. you can also not run playcanvas in http

WebRTC or peer.js?

Erm, I just did when I made the post above. Did you get an error or something?

Cannot fork the project anymore as it uses legacy scripts.

whenever I load playcanvas in http, it switches over to https, the address bar switches this. Im on chrome by the way.

And if you try to run any request in HTTP over HTTPS(like a post request in playcanvas for example, or maybe a websocket open like ‘ws://’), the request will fail. This was recently changed in chrome, there were warnings before it happened.

Have you got a browser plugin that forces https when possible?

When I click on http://playcanv.as/p/6ovmS8Bs/, it stays as http.

It changes to https for me, it might be a plugin even though same thing happens in incognito.

I’ve tried this link, but chrome and firefox still redirects http to https.

Yes, we have changed this so it always redirects to HTTPS. I don’t know why the old project above is using HTTP but really it should be using a HTTPS connection for WebRTC