Skip to content

mojolingo/talking_stick

Repository files navigation

TalkingStick

This gem provides easy WebRTC communication in any Rails app.

Code Climate

Goals

  • Provide easy group-based (2 or more participants) audio/video communication
  • Allow selecting audio or audio+video
  • Pluggable signaling delivery technology
  • Plug & Play functionality - works out of the box
  • Focus on simplicity at the API level, while maximizing the possibilities of integrating communication into existing Rails apps

Installation

Note that TalkingStick requires jQuery, and installs jquery-rails gem as a dependency.

TalkingStick is built as a Rails Engine, and so follows those conventions.

  1. Add to Gemfile and update the bundle

    gem 'talking_stick'

    Now run bundle install to download and install the gem.

  2. Mount the engine Add the following to your application's config/routes.rb:

    mount TalkingStick::Engine, at: '/talking_stick'
  3. Install and Run migration To add the required models to your application, the migrations must be copied and run:

    $ rake talking_stick:install:migrations db:migrate
    
  4. Import Assets Add the following to your application's assets/javascripts/application.js:

    //= require talking_stick/application

    And the following to your application's assets/stylesheets/application.scss:

    *= require talking_stick/application
  5. [optional] Generate the default participant and room views which are then available for customization. From your app's root directory:

    $ rails generate talking_stick:views
    
  6. Videconference! After booting Rails, point your browser to something like http://localhost:3000/talking_stick/rooms. From there you will be able to create and join rooms.

For a better experience, we recommend also using Bootstrap. Easy installation of Bootstrap into Rails is available via twitter-bootstrap-rails.

How it works

  • Each room is assigned a unique ID
  • Rails app keeps track of participants in each room
  • Rails app notifies all room participants when one joins or leaves
  • Rails app proxies call setup between participants in each room

Extending TalkingStick