https://github.com/tomashubelbauer/webrtc-airdrop
AirDrop based WebRTC signaling channel
https://github.com/tomashubelbauer/webrtc-airdrop
airdrop data-channel signaling-channel webrtc
Last synced: 29 days ago
JSON representation
AirDrop based WebRTC signaling channel
- Host: GitHub
- URL: https://github.com/tomashubelbauer/webrtc-airdrop
- Owner: TomasHubelbauer
- License: mit
- Created: 2021-09-03T11:30:36.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-28T08:55:29.000Z (about 4 years ago)
- Last Synced: 2025-05-25T08:40:01.139Z (about 1 year ago)
- Topics: airdrop, data-channel, signaling-channel, webrtc
- Language: JavaScript
- Homepage: https://tomashubelbauer.github.io/webrtc-airdrop
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webrtc AirDrop
I have an idea for using AirDrop as a signaling channel for WebRTC data channel.
I will prototype it for Firefox on macOS and Safari on iOS peers, but it should
work across any two browsers on iOS/macOS that support URL sharing over AirDrop.
## Flow
- The user opens https://tomashubelbauer.github.io/webrtc-airdrop
- The page generates offer SDP and sets it as JSON to the URL
- The user shares the URL via AirDrop
- The browser at the peer side opens the page
- The page generates answer SDP and sets it as JSON to the URL
- The user shares the URL back via AirDrop
- The browser at the original peer side opens the page (in a new tab)
- The new tab page relays the answer data to the origin tab (service worker)
- The original tab page finalizes the connection
- The new tab page closes itself
- The data channel opens
## Notes
The URL JSON payload is Base64 encoded, because Firefox fails to load the Share
menu providers if the URL is not encoded this way.