Hacker News new | past | comments | ask | show | jobs | submit login

This looks to use Web Sockets, not WebRTC, right? I don't see any RTCPeerConnection, and the peerServer variable is unused.

I ask because I've spent multiple days trying to get a viable non-local WebRTC connection going with no luck.

view-source:https://thelongestyard.link/q3a-demo/?server=Seveja






Web sockets are only used for WebRTC connection establishment. The code that creates the RTCPeerConnection is part of the Emscripten-generated JavaScript bundle. I'm using a library called HumbleNet to emulate Berkeley sockets over WebRTC.

The code is here: https://github.com/jdarpinian/ioq3 and here: https://github.com/jdarpinian/HumbleNet. For example, here is the file where the RTCPeerConnection is created: https://github.com/jdarpinian/HumbleNet/blob/master/src/humb...

I feel your pain. WebRTC is extremely difficult to use.


Check out Trystero[1], it makes WebRTC super simple to develop with.

[1] https://github.com/dmotz/trystero




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: