2017 © Pedro Peláez
 

library php-bigbluebutton

image

sanduhrs/php-bigbluebutton

  • Tuesday, March 27, 2018
  • by sanduhrs
  • Repository
  • 2 Watchers
  • 2 Stars
  • 88 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 9 Versions
  • 11 % Grown

The README.md

PHP BigBlueButton API Library

BigBlueButton is an open source web conferencing system for on-line learning. – http://www.bigbluebutton.org, (*1)

This is a php library to interface with a BigBlueButton server instance., (*2)

Supported PHP-FIG Recommendations

  • PSR-1: Basic Coding Standard
    http://www.php-fig.org/psr/psr-1/
  • PSR-2: Coding Style Guide
    http://www.php-fig.org/psr/psr-2/
  • PSR-4: Improved Autoloading
    http://www.php-fig.org/psr/psr-4/

Installation

This package is Composer compatible. Install Composer on your system to use it. The run, (*3)

composer require sanduhrs/php-bigbluebutton

Configuration

To get your API URL and secret login to your BigBlueButton server and run:, (*4)

$ bbb-conf --secret
       URL: http://example.org/bigbluebutton/
    Secret: aiShaiteih6nahchie1quaiyul8ce4Zu

Usage

Initialize a BigBlueButton object:

<?php

require_once 'vendor/autoload.php';

use sanduhrs\BigBlueButton;

$url = 'http://example.org/bigbluebutton/';
$secret = 'aiShaiteih6nahchie1quaiyul8ce4Zu';
$endpoint = 'api/';

// Initialize a BigBlueButton object.
$bbb = new BigBlueButton($url, $secret, $endpoint);

Get the version of the remote server:

$version = $bbb->server->getVersion();

Add a meeting:

$meeting = $bbb->server->addMeeting([
    'id' => '123-456-789-000',
    'attendeePW' => 'Guphei4i',
    'moderatorPW' => 'ioy9Xep9',
    'name' => 'A BigBlueButton meeting',
    'welcome' => 'Welcome to %%CONFNAME%%.',
    'logoutURL' => 'https://example.org/',
    'record' => true,
    'autoStartRecording' => true,
    'meta'  => [
        'bbb-recording-ready-url' => urlencode('https://example.com/api/v1/recording_status'),
        'presenter' => 'John Smith',
    ],
    //any other parameters from [BBB API Documentation](https://docs.bigbluebutton.org/dev/api.html#create)
]);

Add a meeting with pre-uploaded slides:

$meeting = [
    'id' => '123-456-789-001',
    'name' => 'A BigBlueButton meeting with custom slides',
];
$meeting['slides'][] = new Document(
   'https://example.org/slide.png',
   'slide.png',
);
$meeting = $bbb->server->addMeeting($meeting);

Get meeting join URL for a moderator:

$full_name = 'Martin Moderator';
$url = $meeting->join($full_name, true);

Get meeting join URL for an attendee:

$full_name = 'Anton Attendee';
$url = $meeting->join($full_name);

Full Usage Example

Initialize your project with Composer:, (*5)

composer init

Install this package and its dependencies:, (*6)

composer require sanduhrs/php-bigbluebutton

Copy this to a file called 'index.php', adjust the '$url' and '$secret' variables, then try out your setup:, (*7)

<?php

require_once 'vendor/autoload.php';

use sanduhrs\BigBlueButton;

$url = 'http://example.org/bigbluebutton/';
$secret = 'aiShaiteih6nahchie1quaiyul8ce4Zu';
$endpoint = 'api/';

// Initialize a BigBlueButton object.
$bbb = new BigBlueButton($url, $secret, $endpoint);

// Get the version of the remote server.
$version = $bbb->server->getVersion();
print "$version<br />\n";

// Add a meeting.
$meeting = $bbb->server->addMeeting([
    'id' => '123-456-789-000',
    'attendeePW' => 'Guphei4i',
    'moderatorPW' => 'ioy9Xep9',
    'name' => 'A BigBlueButton meeting',
    'welcome' => 'Welcome to %%CONFNAME%%.',
    'logoutURL' => 'https://example.org/',
    'record' => true,
    'autoStartRecording' => true,
    'meta'  => [
        'bn-recording-ready-url' => urlencode('https://example.com/api/v1/recording_status'),
        'presenter' => 'John Smith',
    ],
    //any other parameters from [BBB API Documentation](https://docs.bigbluebutton.org/dev/api.html#create)
]);
print '<pre>' . print_r($meeting, true) . "</pre>\n\n";

// Get meeting join URL for a moderator.
$full_name = 'Martin Moderator';
$url = $meeting->join($full_name, true);
print "Hi $full_name, you are a moderator. Please join the call via $url<br />\n\n";

// Get meeting join URL for an attendee:
$full_name = 'Anton Attendee';
$url = $meeting->join($full_name);
print "Hi $full_name, you are an attendee. Please join the call via $url<br />\n\n";

Bigbluebutton Secret and URI discovery

bbb-conf --secret

Tests

export BBB_URI=http://example.org/bigbluebutton/
export BBB_SECRET=aiShaiteih6nahchieq1quaiyul8ce4Zu
export BBB_ENDPOINT=api/
./vendor/bin/phpunit

License

GNU GENERAL PUBLIC LICENSE Version 3 and later, (*8)

The Versions

27/03 2018

dev-master

9999999-dev

  Sources   Download

GPL GPL-3.0-or-later

The Requires

 

The Development Requires

by Stefan Auditor

27/03 2018

0.5.1

0.5.1.0

  Sources   Download

GPL-3.0-or-later

The Requires

 

The Development Requires

by Stefan Auditor

22/03 2018

0.5.0

0.5.0.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor

22/03 2018

0.4.4

0.4.4.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor

21/03 2018

0.4.3

0.4.3.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor

19/07 2016

0.4.2

0.4.2.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor

18/07 2016

0.4.1

0.4.1.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor

18/07 2016

0.4.0

0.4.0.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor

02/03 2016

0.3.0

0.3.0.0

  Sources   Download

GPL

The Requires

 

The Development Requires

by Stefan Auditor