Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master

This branch is 155 commits behind mozilla:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
static
.gitignore
Procfile
README.md
app.js
cloudfoundry.json
package.json

README.md

Social API + WebRTC Demo

Quick Start

  1. This demo requires Firefox 19+. Grab the latest nightly.

  2. Create a new profile. You don't want to be messing with all these prefs in a profile that you use regularly.

  3. Set the following boolean prefs via about:config

    social.enabled: true
    social.active: true
    media.navigator.enabled: true
    media.navigator.permission.disabled: true
    media.peerconnection.enabled: true
    dom.disable_open_during_load: false
    
  4. Set the SocialAPI provider, also via about:config. It's ok that the provider is named "facebook", the SocialAPI grabs the first pref prefixed with social.manifest. Note that the pref is actually a JSON string.

    social.manifest.facebook: {
      "location":"http://webrtc-social.herokuapp.com/manifest.json",
      "name":"WebRTC Social Demo",
      "iconURL":"http://webrtc-social.herokuapp.com/icon.png",
      "workerURL":"http://webrtc-social.herokuapp.com/worker.js",
      "sidebarURL":"http://webrtc-social.herokuapp.com/sidebar.htm",
      "origin":"http://webrtc-social.herokuapp.com",
      "enabled":true,"last_modified":135101330568
    }
    
  5. Restart the browser.

  6. Login with Persona when the SocialAPI sidebbar shows up. Get a friend to login (or login with a new profile on the same machine), and click to initiate a video call. You can drag-and-drop to share files and tabs!

Local Development

It is easier to hack on this by setting up a local server:

$ npm install
$ env PORT=5000 AUDIENCE="http://localhost:5000" node app.js

and set the SocialAPI provider to:

social.manifest.facebook: {"location":"http://localhost:5000/manifest.json","name":"WebRTC Social Demo","iconURL":"http://localhost:5000/icon.png","workerURL":"http://localhost:5000/worker.js","sidebarURL":"http://localhost:5000/sidebar.htm","origin":"http://localhost:5000","enabled":true,"last_modified":135101330568}
Something went wrong with that request. Please try again.