72
GitHub - AquiGorka/webrtc-qr: WebRTC Connect Experiment - https://webrtc-qr.surg...
source link: https://github.com/AquiGorka/webrtc-qr
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
P2P Connect Experiment
Using QR codes to share signalling data between two devices a WebRTC connection is established.
- Open up https://webrtc-qr.surge.sh in a desktop browser and in a mobile browser.
- In either browser choose
Host
and in the other oneJoin
- The browser that hosts will show a series of QR codes (the data for the
signalling offer
plus some metadata to read it on the other device) - When the guest device (the one that joined) shows a series of QR codes it means it has read the
offer
and it is showing thesignalling answer
. Point the qr codes towards the host device so that it can read the qr codes. - When the connection is established a chime will ring (not in Mobile Safari though) and the devices will be connected.
For the time being a semi-transparent video is shown to help point the QR codes towards the center of the scanning device - this needs improvement.
Dev
npm i npm start
Build
npm build
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK