Giter VIP home page Giter VIP logo

fb-rtc's Introduction

Simple WebRTC Video Chat Using Firebase

Simple WebRTC Video Chat Using Firebase

This is a 1-to-1 video chat using WebRTC and Firebase as the signaling server. You can use socket.io for your signaling server instead of Firebase, but this uses Firebase to keep things simple. If you've never used WebRTC, this is the perfect repo for you to learn the basics.

Demo

Try out the demo at https://codepen.io/dmarcus/pen/PWmRmj. Open the CodePen on two different computers or mobile phones, press change the Firebase credentials and Viagenie credentials as described below, and press call to see the 1-to-1 video chat in action. Here's a video showing us using the demo:

Demo of WebRTC Video Chat

Tutorial

You don't need to follow this tutorial. You change simply download this repo, and run the code on your https server. But if you'd like to understand how the code works, take a look at the tutorial that goes with this repo.

Getting Started

Create a Firebase account, and replace these credentials with your credentials. Be sure to make it readable and writable to the world as explained in the tutorial. These credentials are found in js/script.js

var config = {
  apiKey: "AIzaSyCTw5HVSY8nZ7QpRp_gBOUyde_IPU9UfXU",
  authDomain: "websitebeaver-de9a6.firebaseapp.com",
  databaseURL: "https://websitebeaver-de9a6.firebaseio.com",
  storageBucket: "websitebeaver-de9a6.appspot.com",
  messagingSenderId: "411433309494"
};

You should also create an account on Viagenie, and replace the following code from js/script.js with the information from your account.

{'urls': 'turn:numb.viagenie.ca','credential': 'websitebeaver','username': '[email protected]'}

Built With

License

MIT License

Copyright (c) 2017 David Marcus

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

fb-rtc's People

Contributors

dmarcs avatar david-ambientsecurity avatar kolodny avatar

Watchers

 avatar  avatar

Forkers

kumarremoa

fb-rtc's Issues

Failed to set SSL role

I think maybe chrome has a bug regarding the handshaking process?

Failed to set remote answer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to apply the description for m= section with mid='0': Failed to set SSL role for the transport..

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.