Coder Social home page Coder Social logo

tomashubelbauer / webrtc-airdrop Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 28 KB

AirDrop based WebRTC signaling channel

Home Page: https://tomashubelbauer.github.io/webrtc-airdrop

License: MIT License

HTML 13.84% JavaScript 85.58% CSS 0.58%
webrtc signaling-channel airdrop data-channel

webrtc-airdrop's Introduction

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.

webrtc-airdrop's People

Contributors

tomashubelbauer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.