bigbluebutton Videoconferencing system API wrapper, which handles query building and implements common methods to manage meetings

  1. Requirements
  2. Installation
  3. Usage
  4. Resources

This extension helps you to integrate great open-source conferencing system BigBlueButton into your great Yii projects. It implements almost all features from current stable release, such as creating, joining, listing and ending meetings. You may also easily add support of new methods (such as slides and recordings) that appeared in latest beta (if i won't do it first :)


  • Available BigBlueButton server (tested with 0.71a, should also work with newer, currently beta, versions). See installation instructions here. For testing you can also use public server provided by BigBlueButton developers available here.
  • Yii 1.1 (should also work with older versions).
  • libxml (php extension, installed almost everywhere) and "allow_url_fopen" setting must be on (enabled almost everywhere)


  1. You should have security salt from BigBlueButton server (that is already installed somewhere, i assume) to make API queries. You can find out how to get it here:

  2. Copy extension files to /protected/extensions/bigbluebutton.

  3. Set up your config file (/protected/config/main.php):

			//server and salt provided here are intended for BigBlueButton's testing server
			//do not use it in your real projects
			//security salt - required
			//API host - required
			//the rest parameters are optional
			//port is 80 by default 
			//default path to API

			//-you may set default passwords here or set
			// unique passwords for each conference
			//-or even use no passwords — BigBlueButton 
			// will assign them randomly in that case

			//common moderator password for any conference
			//common attendee password for any conference

			//common url to redirect users after leaving conference, 
			//which will be transmitted to Yii::app()->createAbsoluteUrl.
			//default is site root. you may set unique url for each conference.


I assume you're already familiar (at least a bit) with BigBlueButton videoconference system and looked through documentation.

Now you have ready BigBlueButton server, you found security salt and server address and set it up in configuration. To access system API you may use extension's "low-level" methods: "createApiQuery" which builds url with given parameters and handles security issues, and "getApiResponse", which loads previously created url and returns response as php array. Using these methods you can run any type of API query described in docs. Try it in one of your controllers:

	CVarDumper::dump($data, 10, 1);
} catch (BigBlueButtonException $ex)
	//remember to properly handle exception if something goes wrong
	throw $ex;

...and the result will look (if you had any meetings running, of course) like this:

    'returncode' => 'SUCCESS'
    'meetings' => array
        'meeting' => array
            'meetingID' => '1335965308981'
            'attendeePW' => '123'
            'moderatorPW' => '12345'
            'hasBeenForciblyEnded' => false
            'running' => true

Fortunately you don't have to deal with these methods manually (though they'll be useful if you wish to extend class functionality). Extension provides a bunch of methods which will help you to list, create, join and end meetings. Let's look at examples:

//set default passwords (you may also set them from configuration)

//create simple meeting with default parameters and generate join url for TestUser
//see what response we've got from server
CVarDumper::dump($meeting, 10, 1);
echo "<br/>";

//join url is constructed with viewer privileges by default   
$joinUrl=$bbb->getJoinMeetingUrl($meeting['meetingID'], "TestUser");
//redirect user to conference immediately...
//...or send him a link to join manually
echo CHtml::link("Join my cool conference!", $joinUrl)."<br/>";

//check if created meeting is running
//(actually it isn't, because we just created it, but
// there are no participants)
echo "meeting state: ".(($isRunning)?"running":"not running")."<br/>";
//show all meetings
CVarDumper::dump($meetings, 10, 1)."<br/>";
echo "<br/>";

//imagine you have authenticated user somewhere...

//get created meeting for another user 
//with moderator privileges to join and end conference
		//user id will be taken from Yii::app()->user->id
		//moderator password
CVarDumper::dump($meeting, 10, 1);
echo "<br/>";

//now before we could end meeting we need at least one member there
//to get it started, otherwise it won't be counted as 'running'.
//so use join url as shown above and open conference in another tab.
//if it's time to end meeting, you should do like this:
//$bbb->endMeeting($meeting['meetingID'], $meeting['moderatorPW']);
//or this, because we have meeting data with moderator privileges:
echo CHtml::link("End that boring conference", $meeting['endUrl'])."<br/>";
//but do not simply show that link to real user, use getApiResponse()
//or endMeeting() methods instead
//show all running conferences for specified user
		//username which will be shown in BigBlueButton client
		//user id
		//request running meetings only (default is any meetings)
		//generate meeting interaction urls with viewer privileges
//array of meetings with urls for user to join or end meeting
CVarDumper::dump($meetings, 10, 1);
echo "<br/>";

//the list of ended meetings with full information about them
CVarDumper::dump($meetings, 10, 1);
echo "<br/>";        
//...or the list of all meetings with less information, 
//but much faster on large number of meetings
CVarDumper::dump($meetings, 10, 1);
echo "<br/>";

//build a link to create another meeting with a bunch of options
	"My awesome show",
		//set meeting id if you don't want it to be created automatically.
		//may be you'll manage meetings with your own database
		//and you can supply it's id here
		//free access to any viewer, overwriting password from configuration
		//some custom moderator password     
		//another logout url...
		//welcome chat message    
		"welcome"=>"Hello world!",
		//+any parameters as described in API docs..    
//you may store url somewhere and call later
//or call $bbb->createMeeting() with same parameters as above
//to create it immediately

//check server state
//hope it's true
echo $bbb->url." server availability: ".(($isOnline)?"ok":"fail");
echo "<br/>";

//and don't forget to catch exceptions
	//will be false
	echo $bbb->url." server availability: ".(($isOnline)?"ok":"fail");
	echo "<br/>";
	//will throw an exception
catch (BigBlueButtonException $ex)
	echo $ex->getMessage();


Thanks to BigBlueButton developers, who provide a free public testing server, I have a live demo here:

On that site you can see basic functions implemented and sample code illustrating them. You can also setup your own BigBlueButton server as virtual machine on any pc using instructions available on their site.

3 0
Yii Version: 1.1
License: BSD-2-Clause
Category: Web Service
Developed by: xapon
Created on: May 4, 2012
Last updated: 10 years ago


show all

Related Extensions