Package: jupyterlab-webrtc-docprovider
jupyterlab-webrtc-docproviderDocument collaboration forJupyterLab, powered byy-webrtc.RequirementsPython >=3.7JupyterLab >=3.1or a derived application likeJupyterLiteorRetroLabHow to Use ItInstallthe packageConfigureyour server for collaborationLaunch aLumino-based Jupyter client that supports collaboratione.g. JupyterLab 3.1+, RetroLab 0.3+, or JupyterLite (beta)Open the client with theroomURL parameterse.g.http://localhost:8888/lab?room=demooptionally provideusernameandusercolore.g.http://localhost:8888/lab?room=demo&username=jo&usercolor=e65100these parameters will probably be consumed, butthat's okayOpen a shared editing activity likeNotebookorEditorInstallTo install the extension, run:pipinstalljupyterlab-webrtc-docprovider
mambainstall-cconda-forgejupyterlab-webrtc-docprovider
condainstall-cconda-forgejupyterlab-webrtc-docproviderFor a development install, see thecontributing guide.How it WorksUnlike JupyterLab's built-in, purely WebSocket-basedcollaborativedocument provider,jupyterlab-webrtc-docproviderrelies on:an initialingsignaling serverto locate peerstheWebRTCprotocol to coordinate actual data exchangeConfigurationServer ConfigurationJupyter Server is configured withjupyter_server_config.json:{"LabServerApp":{"collaborative":true}}collaborativeThis flag must be enabled for the provider to be used.In JupyterLite, this is a configurable ofjupyter-config-datainjupyter-lite.json.Client ConfigurationUser-configurable settings can be pre-populated in{sys.prefix}/share/jupyter/lab/settings/overrides.json:roomPrefixandsignalingUrlsare security-related.{"@jupyterlite/webrtc-docprovider:plugin":{"disabled":false,"room":"an pre-shared room name","roomPrefix":"a-very-unique-name","signalingUrls":["wss://y-webrtc-signaling-eu.herokuapp.com","wss://y-webrtc-signaling-us.herokuapp.com","wss://signaling.yjs.dev"],"usercolor":"f57c00","username":"Jo V. Un"}}In JupyterLite, this can be configured with anoverrides.jsonroomPrefixBy default, the final room ID that is actually sent to the signaling server will be the
SHA256 hash of the configured room prefix and the chosen room name.By default this prefix is the domain serving the site, but for common URLs (likelocalhost) a more random prefix should be chosen.signalingUrlsBy default, a number of public signaling servers are provided, as described byy-webrtc, as shown above.Note: the signaling server, as the name suggests, should only know high-level
metadata about your exchange, and should be protected from third-parties by standard
SSL encryption.However, a real deployment shouldnotrely on free hosted services at runtime.
Some research would be required to find an appropriate server for your specific
deployment.usernameThe name displayed to others next to your cursor in shared editing sessions.usercolorA suggested color of your cursor, as displayed to others next in shared editing
sessions.UninstallTo remove the extension, run:pipuninstalljupyterlab_webrtc_docprovider
mambauninstalljupyterlab_webrtc_docprovider
condauninstalljupyterlab_webrtc_docproviderOpen SourceThis work is licensed under theBSD 3-Clause License.The code was originally extracted fromJupyterLiteandJupyterLab, which are also
covered under the BSD 3-Clause License.Two vendored patches (special thanks to@datakurre) are applied tosimple-peerandint64-buffer, both of which are licensed
under the MIT license, and should hopefully be merged some day.