Skip to content

Instantly share code, notes, and snippets.

@aoloe
Last active March 19, 2023 06:41
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save aoloe/81eed78027a8fcc238d6 to your computer and use it in GitHub Desktop.
Save aoloe/81eed78027a8fcc238d6 to your computer and use it in GitHub Desktop.
webrtc collaborative document editing

specification:

  • php server storing a server.
  • the first person opening a file becomes the master and is in charge to save to the server
  • all other users open webrtc connection to the master and keep the document in sync with him
  • if it makes things easier, only allow one user at a time to edit a block (paragraph, list, section)

todo:

  • check if and how to get webrtc to work without a node server.
  • try to convert a chat example in a text editor.

serverless webrtc chat:

the sample work by copy pasting string. it should also work with a php server for initializing the connection.

websockets in php? https://github.com/ratchetphp/Ratchet

http://peerjs.com/

https://scotch.io/tutorials/building-a-real-time-markdown-viewer

links:

markdown editors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment