Code Monkey home page Code Monkey logo

bigbluebutton_rails's Introduction

BigBlueButton on Rails

<img src=“https://secure.travis-ci.org/mconf/bigbluebutton_rails.png?branch=master” alt=“Build Status” />

BigBlueButton integration for Ruby on Rails 3.

Features:

  • Allows multiple servers and multiple conference rooms.

  • Full API access using bigbluebutton-api-ruby.

  • Easy way to join conferences: simply create a room and call the “join” action.

  • Easy integration with authentication and authorization mechanisms, such as Devise and CanCan.

  • Possibility to create private rooms, that require a password to join.

  • Deals with visitors (users that are not logged), allowing (or forbidding) them to join rooms.

  • Random meeting IDs to avoid problems with end_meeting, timeouts and reuse of URLs.

  • Server activity monitor.

  • “On-the-fly” server selection when a meeting is started.

Possible future features:

  • Limit the number of users per room and rooms per server.

  • Server administration (modify config.xml, use bbb-conf, etc.).

  • Load balancing.

For more future features and issues check our google code page.

Supported versions

BigBlueButton

The current version of this gem supports all the following versions of BigBlueButton:

  • 0.8: It can already be used with BBB 0.8 but not all features are supported yet, such as pre-upload of slides and anything related to recordings. See TODO_08.

  • 0.7: Including 0.7, 0.71 and 0.71a.

Ruby

Tested in rubies:

  • ruby-1.9.2

  • ruby-1.9.3

Rails

To be used with *Rails 3* only (should work on 3.0, 3.1 and 3.2). Tested with Rails 3.2.

Installation

You can install the latest version of BigbluebuttonRails using RubyGems:

gem install bigbluebutton_rails

Or simply add the following line in your Gemfile:

gem "bigbluebutton_rails"

After installing, you need to run the generator:

rails generate bigbluebutton_rails:install

This generator will create a migration file, a language file and some additional resources. These additional files are basically the JQuery library, a stylesheet and some images. They are only used in the views provided by this gem, so you may or may not use them. You can easily generate the views and modify them to use other resources.

To now more about the generators see How to: Generators

Routes

The routes to BigbluebuttonRails can be generated with the helper bigbluebutton_routes. See the example below:

bigbluebutton_routes :default

It will generate the default routes. You need to call it at least once and the routes will be scoped with ‘bigbluebutton’. They will look like:

/bigbluebutton/servers
/bigbluebutton/servers/my-server/new
/bigbluebutton/servers/my-server/rooms
/bigbluebutton/rooms
/bigbluebutton/rooms/my-room/join

You can also make the routes use custom controllers:

bigbluebutton_routes :default, :controllers => { :servers => 'custom_servers', :rooms => 'custom_rooms' }

You can choose which controller in use:

bigbluebutton_routes :default, :only => 'servers'

You may also want shorter routes to access conference rooms. For that, use the option room_matchers:

resources :users do
  bigbluebutton_routes :room_matchers
end

It creates routes to the actions used to access a conference room, so you can allow access to webconference rooms using URLs such as:

http://myserver.com/my-community/room-name/join
http://myserver.com/user-name/room-name/join

For more information see:

Basic configurations

There are some basic assumptions made by BigbluebuttonRails:

  • You have a method called current_user that returns the current user;

  • The current_user has an attribute or method called “name” that returns his/her fullname.

If you don’t, you can change this behaviour easily, keep reading.

BigbluebuttonRails uses the methods bigbluebutton_user and bigbluebutton_role(room) to get the current user and to get the permission that the current user has in the room, respectively. These methods are defined in lib/bigbluebutton_rails/controller_methods.rb and you can reimplement them in your application controller to change their behaviour as shown below.

class ApplicationController < ActionController::Base

  # overriding bigbluebutton_rails function
  def bigbluebutton_user
    current_user && current_user.is_a?(User) ? current_user : nil
  end

  def bigbluebutton_role(room)
    ...
  end

end

See also

Contributing/Development

Fork this repository, clone your fork and start by installing the dependencies:

bundle install

Save spec/rails_app/features/config.yml.example as config.yml and edit it to set values for an existent BigBlueButton server. You will need it to run the integration tests. For more information see the page Testing in our wiki.

Prepare the rails_app used for tests:

rake setup:rails_app
rake setup:rails_app:db SERVER=my-server # select a server you defined in 'config.yml'

Run the tests:

rake spec
rake cucumber SERVER=my-server

Or simply:

rake SERVER=my-server

Note: If you don’t set the SERVER variable, the first server in config.yml will be used.

Develop. :)

If you want your code to be integrated in this repository, please fork it, create a branch with your modifications and submit a pull request.

Test Coverage

Coverage is analyzed by default when you run:

rake spec

Run it and look at the file coverage/index.html.

Best Practices

We use the gem rails_best_practices to get some nice tips on how to improve the code.

Run:

rake best_practices

And look at the file rails_best_practices_output.html to see the tips.

License

Distributed under The MIT License (MIT). See LICENSE.

Contact

This project is developed as part of Mconf (mconf.org). Contact:

  • Mconf: A scalable opensource multiconference system for web and mobile devices

  • PRAV Labs - UFRGS - Porto Alegre - Brazil

  • www.inf.ufrgs.br/prav/gtmconf

bigbluebutton_rails's People

Contributors

daronco avatar merqlove avatar fbottin avatar tcaddy avatar

Watchers

James Cloos 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.