saltsthlm / kamel-graduation-project

Kamel's Graduation Project
MIT License
0 stars 0 forks source link

Kamel Graduation Project

Example WebSocket + WebRTC

This branch shows how WebRTC can be used to build a simple chat app. WebSockets can be used to exchange keys between peers to establish the WebRTC connection.

Initial Setup

Run the init script from the root directory:

./init.sh

Use the App

Open two browser tabs:

localhost:3000/#init
localhost:3000

In the first tab, wait for WebRTC meta data to appear at the top of the page and copy it.

In the second tab, paste the meta data into the Other ID field, then click connect. Wait for meta data to appear at the top of the page and copy it.

In the first tab, paste the meta data into the Other ID field, then click connect.

You should now be able to send messages from one tab to the other.

Related Links

WebRTC:

WebSockets: