2017 © Pedro Peláez
 

library bbb-api-php

BigBlueButton PHP API Library for PHP updated by YaangVu

image

yaangvu/bbb-api-php

BigBlueButton PHP API Library for PHP updated by YaangVu

  • Friday, October 20, 2017
  • by YaangVu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 44 % Grown

The README.md

Build Status Scrutinizer Code Quality Coverage Status Downloads @bigbluebutton on Twitter, (*1)

PHP 5.4 PHP 5.5 PHP 5.6 PHP 7 PHP 7.1, (*2)

BigBlueButton API for PHP

The official and easy to use BigBlueButton API for PHP, makes easy for developers to use BigBlueButton API for PHP 5.4+., (*3)

Requirements

  • PHP 5.4 or above.
  • Curl library installed.

BigBlueButton API for PHP is also tested to work with HHVM and fully compatible with PHP 7.1., (*4)

Installation

bigbluebutton-api-php can be installed via Composer CLI, (*5)

composer require yaangvu/bbb-api-php:1.0.0

or by editing Composer.json, (*6)

{
    "require": {
        "yaangvu/bbb-api-php": "1.0.0"
    }
}

Usage

You should have environment variables BBB_SECURITY_SALT and BBB_SERVER_BASE_URL defined in your sever. *if you are using Laravel you can add it in your .env, (*7)

The you will be able to call BigBlueButton API of your server. A simple usage example for create meeting looks like:, (*8)

use BigBlueButton/BigBlueButton;

$bbb                 = new BigBlueButton();
$createMeetingParams = new CreateMeetingParameters('bbb-meeting-uid-65', 'BigBlueButton API Meeting');
$response            = $bbb->createMeeting($createMeetingParams);

echo "Created Meeting with ID: " . $response->getMeetingId();

Example

# Get meetings


use BigBlueButton\BigBlueButton; $bbb = new BigBlueButton(); $response = $bbb->getMeetings(); if ($response->getReturnCode() == 'SUCCESS') { foreach ($response->getRawXml()->meetings->meeting as $meeting) { // process all meeting } }

# Create Meeting


use BigBlueButton\BigBlueButton; use BigBlueButton\Parameters\CreateMeetingParameters; $bbb = new BigBlueButton(); $createMeetingParams = new CreateMeetingParameters($meetingID, $meetingName); $createMeetingParams->setAttendeePassword($attendee_password); $createMeetingParams->setModeratorPassword($moderator_password); $createMeetingParams->setDuration($duration); $createMeetingParams->setLogoutUrl($urlLogout); if ($isRecordingTrue) { $createMeetingParams->setRecord(true); $createMeetingParams->setAllowStartStopRecording(true); $createMeetingParams->setAutoStartRecording(true); } $response = $bbb->createMeeting($createMeetingParams); if ($response->getReturnCode() == 'FAILED') { return 'Can\'t create room! please contact our administrator.'; } else { // process after room created }

# Join Meeting


use BigBlueButton\BigBlueButton; use BigBlueButton\Parameters\JoinMeetingParameters; $bbb = new BigBlueButton(); $joinMeetingParams = new JoinMeetingParameters($meetingID, $name, $password); // $moderator_password for moderator $joinMeetingParams->setRedirect(true); $url = $bbb->getJoinMeetingURL($joinMeetingParams); // header('Location:' . $url);

# Close Meeting


use BigBlueButton\BigBlueButton; use BigBlueButton\Parameters\EndMeetingParameters; $bbb = new BigBlueButton(); $endMeetingParams = new EndMeetingParameters($meetingID, $moderator_password); $response = $bbb->endMeeting($endMeetingParams);

# Get Meeting Info


use BigBlueButton\BigBlueButton; use BigBlueButton\Parameters\GetMeetingInfoParameters; $bbb = new BigBlueButton(); $getMeetingInfoParams = new GetMeetingInfoParameters($meetingID, '', $moderator_password); $response = $bbb->getMeetingInfo($getMeetingInfoParams); if ($response->getReturnCode() == 'FAILED') { // meeting not found or already closed } else { // process $response->getRawXml(); }

# Get Recordings


use BigBlueButton\BigBlueButton; use BigBlueButton\Parameters\GetRecordingsParameters; $recordingParams = new GetRecordingsParameters(); $bbb = new BigBlueButton(); $response = $bbb->getRecordings($recordingParams); if ($response->getReturnCode() == 'SUCCESS') { foreach ($response->getRawXml()->recordings->recording as $recording) { // process all recording } }

note that BigBlueButton need about several minutes to process recording until it available.
You can check in bbb-record --watch, (*9)

# Delete Recording


use BigBlueButton\BigBlueButton; use BigBlueButton\Parameters\DeleteRecordingsParameters; $bbb = new BigBlueButton(); $deleteRecordingsParams= new DeleteRecordingsParameters($recordingID); // get from "Get Recordings" $response = $bbb->deleteRecordings($deleteRecordingsParams); if ($response->getReturnCode() == 'SUCCESS') { // recording deleted } else { // something wrong }

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub, (*10)

Contributing guidelines

Code style

Make sure the code style configuration is applied by running PHPCS-Fixer., (*11)

./vendor/bin/php-cs-fixer fix

Runing tests

For every implemented feature add unit tests and check all is green by running the command below., (*12)

./vendor/bin/phpunit

The Versions

20/10 2017

dev-master

9999999-dev http://bigbluebutton.org/

BigBlueButton PHP API Library for PHP updated by YaangVu

  Sources   Download

GNU Lesser General Public License

The Requires

  • php >=5.4
  • ext-curl *

 

The Development Requires

by Avatar YaangVu

api bbb bigbluebutton

20/10 2017

1.0.3

1.0.3.0 http://bigbluebutton.org/

BigBlueButton PHP API Library for PHP updated by YaangVu

  Sources   Download

GNU Lesser General Public License

The Requires

  • php >=5.4
  • ext-curl *

 

The Development Requires

by Avatar YaangVu

api bbb bigbluebutton

19/10 2017

1.0.1

1.0.1.0 http://bigbluebutton.org/

BigBlueButton PHP API Library for PHP updated by YaangVu

  Sources   Download

GNU Lesser General Public License

The Requires

  • php >=5.4
  • ext-curl *

 

The Development Requires

by Avatar YaangVu

api bbb bigbluebutton

19/10 2017

1.0.2

1.0.2.0 http://bigbluebutton.org/

BigBlueButton PHP API Library for PHP updated by YaangVu

  Sources   Download

GNU Lesser General Public License

The Requires

  • php >=5.4
  • ext-curl *

 

The Development Requires

by Avatar YaangVu

api bbb bigbluebutton

18/10 2017

1.0.0

1.0.0.0 http://bigbluebutton.org/

BigBlueButton PHP API Library for PHP updated by YaangVu

  Sources   Download

GNU Lesser General Public License

The Requires

  • php >=5.4
  • ext-curl *

 

The Development Requires

by Avatar YaangVu

api bbb bigbluebutton