Download the PHP package littleredbutton/bigbluebutton-api-php without Composer

On this page you can find all versions of the php package littleredbutton/bigbluebutton-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
littleredbutton/bigbluebutton-api-php
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package bigbluebutton-api-php

:tada: Best BigBlueButton API for PHP

The unofficial and easiest to use BigBlueButton API for PHP, makes easy for developers to use BigBlueButton API v2.2+ for PHP 7.4+.

Build Status Coverage Status PHP from Packagist

This API uses BigBlueButton and is not endorsed or certified by BigBlueButton Inc. BigBlueButton and the BigBlueButton Logo are trademarks of BigBlueButton Inc.

Table of Contents

:question: Why should I use a fork?

To explain why you should use a fork, we have to explain why we created our own fork. While BigBlueButton is a great product, contributing as an external developer is often cumbersome. Bug fixes and features are not merged. Modern enhancements are postponed or not allowed. Therefore 4 people from different companies and universities decided to create a open minded alternative to the existing PHP API. While we are still backwards compatible, this fork has the following advantages:

:gear: Installation and usage

Requirements

In order to use this library you have to make sure to meet the following requirements:

Installation

We are using composer to manage and install all libraries, so you need to use it too. If you setup composer for your project, you just have to add this API to your required section via

Basic usage

To make any requests to your BigBlueButton instance, you have to create an API object:

If you didn't use composer before, make sure that you include vendor/autoload.php.

In general the usage is closly related to the official API description. This means to create a room, you have to create a CreateMeetingParameters object and set all required parameters via the related setter method. This means to set the attendeePW, you have to call setAttendeePW and so on.

Test if API url and secret are valid

:closed_book: Documentation

Administration

Get API version

Create a meeting

Experimental features

:warning: Not officially supported by bbb

Guest policy Beside the guest policies ALWAYS_ACCEPT, ALWAYS_DENY, and ASK_MODERATOR there is also the option ALWAYS_ACCEPT_AUTH. sourcecode

ASK_MODERATOR is asking the moderator(s) to accept or decline the join of a user or guest. When using our api guest users are by default marked as 'unauthorized' users.

By using the option ALWAYS_ACCEPT_AUTH all authorized users (non-guests) can directly join the meeting and the moderators approval is only required for unauthorized users, like guests.

Join a meeting

End a meeting

Monitoring

Get a list of meetings

Is a meeting running?

Get meeting info

Recording

Get recordings

Publish recordings

Delete recordings

Use HTTP transports

This library allows you to replace the complete HTTP transport layer used to communicate with BigBlueButton with so called HTTP transports.

This can be useful if you want to manipulate the HTTP requests before being sent to BigBlueButton or to perform integration tests with this library where no real HTTP requests are desired.

Additionally, the transports allows adjusting the options for the underlying backend in a detailed way.

Available transports

CurlTransport (default)

The CurlTransport uses the plain curl extension of PHP and requires no additional libraries except for the extension. If no explicit transport if configured while constructing the API object, the CurlTransport is created using some recommended default options.

Nevertheless, there may be reasons to create the CurlTransport manually. For example, to set customized cURL options. See the following examples for usage:

This creates the CurlTransport with the default options as done by the BigBlueButton class internally if no transport given:

use BigBlueButton\BigBlueButton;
use BigBlueButton\Http\Transport\CurlTransport;

$transport = CurlTransport::createWithDefaultOptions();
$bbb = new BigBlueButton('https://bbb.example.com/bigbluebutton/', 'S3cr3t', $transport);
// [...]

To set custom cURL options - like additional HTTP headers to be sent and custom timeouts:

use BigBlueButton\BigBlueButton;
use BigBlueButton\Http\Transport\CurlTransport;

$transport = CurlTransport::createWithDefaultOptions([
    CURLOPT_CONNECTTIMEOUT => 5,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_HTTPHEADER => [
        'X-Custom-Header: custom-header-value',
    ],
]);
$bbb = new BigBlueButton('https://bbb.example.com/bigbluebutton/', 'S3cr3t', $transport);
// [...]

See PHP documentation for a full list of cURL options.

:warning: Avoid creating the CurlTransport directly with new new CurlTransport(); unless you exactly know what you are doing. This will completely avoid adding the recommended default cURL options.

PsrHttpClientTransport

This transport allows you to use any HTTP client built on top of PSR-7, PSR-17 and PSR-18. As PSR-17 especially is very factory-driven, this transport requires a request factory and a stream factory.

This transport requires the composer packages psr/http-client, psr/http-factory and psr/http-message to be installed manually. This almost will be done by requiring package(s) providing PSR-7, PSR-17 and PSR-18.

To discover proper packages, see packagist.org:

A quick example with the Symfony HTTP client PSR-18 adapter and nyholm/psr7.

use BigBlueButton\BigBlueButton;
use BigBlueButton\Http\Transport\Bridge\PsrHttpClient\PsrHttpClientTransport;
use Nyholm\Psr7\Factory\Psr17Factory;
use Symfony\Component\HttpClient\Psr18Client;

$psr18Client = new Psr18Client();
$psr17Factory = new Psr17Factory();
// Optional: Default headers sent with each request, argument can be left out.
$defaultHeaders = [
    'X-Custom-Header' => 'custom-header-value',
];

// The $psr17Factory acts both as request and stream factory
$transport = new PsrHttpClientTransport($psr18Client, $psr17Factory, $psr17Factory, $defaultHeaders);
$bbb = new BigBlueButton('https://bbb.example.com/bigbluebutton/', 'S3cr3t', $transport);
// [...]

Another alternative is to use php-http/discovery which will find a proper PSR-17 and PSR-18 implementation based on installed packages. This is for example desirable if you are embedding this library in an own library-styled project which should not force any vendor.

use BigBlueButton\BigBlueButton;
use BigBlueButton\Http\Transport\Bridge\PsrHttpClient\PsrHttpClientTransport;
use Http\Discovery\Psr17FactoryDiscovery;
use Http\Discovery\Psr18ClientDiscovery;

$transport = new PsrHttpClientTransport(
    Psr18ClientDiscovery::find(),
    Psr17FactoryDiscovery::findRequestFactory(),
    Psr17FactoryDiscovery::findStreamFactory(),
    $defaultHeaders // see previous example for details
);
$bbb = new BigBlueButton('https://bbb.example.com/bigbluebutton/', 'S3cr3t', $transport);
// [...]
SymfonyHttpClientTransport

This transport directly allows to use the Symfony HTTP client without the detour via PSR-17 and PSR-18.

To use this transport you must install at least symfony/http-client-contracts and a proper implementation. Usually it is enough to require symfony/http-client via Composer.

For standalone environments you can create the transport easily using the factory method. This will pick the correct Symfony HTTP client suitable for your environment automatically in background:

use BigBlueButton\BigBlueButton;
use BigBlueButton\Http\Transport\Bridge\SymfonyHttpClient\SymfonyHttpClientTransport;

// Optional: Default headers sent with each request, argument can be left out.
$defaultHeaders = [
    'X-Custom-Header' => 'custom-header-value',
];
// Optional: Default options for each request, argument can be left out.
// See https://symfony.com/doc/current/http_client.html for details.
$defaultOptions = [
    'timeout' => 5,
    'max_duration' => 10,
];

$transport = SymfonyHttpClientTransport::create($defaultHeaders, $defaultOptions);
$bbb = new BigBlueButton('https://bbb.example.com/bigbluebutton/', 'S3cr3t', $transport);
// [...]

You can also pass a preconfigured instance of Symfony\Contracts\HttpClient\HttpClientInterface manually if desired:

use BigBlueButton\BigBlueButton;
use BigBlueButton\Http\Transport\Bridge\SymfonyHttpClient\SymfonyHttpClientTransport;
use Symfony\Component\HttpClient\CurlHttpClient;

$httpClient = new CurlHttpClient();

$transport = new SymfonyHttpClientTransport(
    $httpClient,
    $defaultHeaders, // see previous example for details
    $defaultOptions // see previous example for details
);
$bbb = new BigBlueButton('https://bbb.example.com/bigbluebutton/', 'S3cr3t', $transport);
// [...]

Implementing your own transport (advanced)

If the transports inside this library are not suitable for you, you can implement your own custom transport for fulfilling custom requirements:

use BigBlueButton\Http\Transport\TransportInterface;
use BigBlueButton\Http\Transport\TransportRequest;
use BigBlueButton\Http\Transport\TransportResponse;

final class CustomTransport implements TransportInterface
{
    /**
     * {@inheritDoc}
     */
     public function request(TransportRequest $request) : TransportResponse
     {
        $url = $request->getUrl();
        $contentType = $request->getContentType();
        // aka request body
        $payload = $request->getPayload();

        // [...]

        return new TransportResponse($reponseBody, $jsessionId);
     }
 }

Your TranportInterface implementation must use all values provided by the TransportRequest object passed (currently content type, URL and payload (body)). Based on the response by the backend you are using you must construct a proper TransportResponse object containing response body and the JSESSION cookie when passed by BBB.

Run tests of this library

Before running the tests, please ensure that all development dependencies of this package are installed. Depending on the version of composer you possibly need to run

To run the unit tests of this library simply type

The integration requires additional setup as there are using a real BigBlueButton server. You need to create a .env.local file to configure which server to use and the proper credentials:

It is also possible to pass both variables as real environment variables by using e.g. export in your shell.

To run the integration tests of this library then type

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub


All versions of bigbluebutton-api-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-curl Version *
ext-simplexml Version *
ext-mbstring Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package littleredbutton/bigbluebutton-api-php contains the following files

Loading the files please wait ....