Open bollwyvl opened 2 years ago
I came across this problem some time ago and started using the y-webrtc-signaling
'binary' from y-webrtc.
The y-webrtc-signaling
source file bin/server.js should also give anyone wanting to implement the signaling server in python a good starting point.
For anyone wanting to give it a go, you need nodejs and npm and than just run in a directory where npm
can install your project
# install y-webrtc package into your current folder
$ npm i y-webrtc
$ PORT=4444 npx y-webrtc-signaling
Signaling server running on localhost: 4444
It says running on localhost, but it's actually listening on 0.0.0.0
, meaning it's listening on all network interfaces, so all the IPs your machine has.
In Jupyter do:
Settings
Settings Editor
/Advanced Settings Editor
WebRTC Sharing
and click on itSignaling URLs
choose custom signaling servers
Add
ws://YOUR_IP_OR_HOSTNAME:4444
put the following in your overrides.json
{
"@jupyterlite/webrtc-docprovider:plugin": {
"signalingUrls": [
"ws://YOUR_IP_OR_HOSTNAME:4444"
]
}
}
Your signaling server can run under localhost
/127.0.0.1
(YOUR_IP_OR_HOSTNAME
), but your jupiterlite cant (I don't know why, probably part of the webrtc security model..). For local testing I just run both on 127.0.0.10
, because my local ip changes a lot.
This setup is just for testing!
Problem
Suggested Improvement