Skip to content

Integrate iroh WebRTC extension in p2p transfer UI #34

@radumarias

Description

@radumarias

How to test iroh WebRTC extension.

git clone these repos in the smae folder and use the specified branch

Folder GitHub Repository Branch
iroh https://github.com/anchalshivank/iroh feature/webrtc-wasm-support
iroh-examples https://github.com/anchalshivank/iroh-examples main
n0-watcher https://github.com/anchalshivank/n0-watcher feature/webrtc-wasm-support
net-tools https://github.com/anchalshivank/net-tools main

Goto to iroh-examples/webrtc-chat and run these

In terminal-1

cargo run --bin cli2 accept

In terminal-2 run the suggested command in terminal-1 with cargo run --bin cli2 connect .... They will then start to echo-reply each other.

Integration p2p UI

Change the UI in https://github.com/radumarias/syncoxiders/tree/main/p2p-transfer slightly to share the node ID as above in a link (URL), and when opened in another tab, try to create the connection between the 2 peers and let communication going

Flow

  • user-1 Select file
  • Share
  • Create url like https://my-p2p-transfer.com/node-id and copy it to the clipboard
  • Send url to user-2 somehow
  • In another browser/app have a button Receive
  • Show an input text and paste the url
  • Extract the node-id
  • Connect to it
  • Show the communication logs in a text area somewhere at the bottom in both apps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions