Simplest way to use WebRTC on the same machine without networking enabled?

108 views
Skip to first unread message

guest271314

unread,
Dec 20, 2022, 9:40:45 AM12/20/22
to discuss-webrtc
I have working code that establishes a data channel connection between a an extension offscreen document and an arbitrary Web page using the extension ServiceWorker as a signaling server for the purpose of transferring one of more ArrayBuffer's from the MV3 ServiceWorker to the Web page https://github.com/guest271314/offscreen-webrtc.

When I disable networking no offer is created. Thus the code doesn't work when offline as evident in chrome://webrtc-internals. In this Firefox bug I read that WebRTC doesn't work without a STUN or TURN server. I am not sure if Chrome has loopback ICE capability.

I see that https://github.com/pion/offline-browser-communication hardcodes some information to establish a connection.

I tried coturn once, yet still no WebRTC when offline.

How would I go about hardcoding necessary information to establish a data channel connection between the offscreen document and the local Web page I am visiting offline?


Reply all
Reply to author
Forward
0 new messages