Skip to content

Instantly share code, notes, and snippets.

@IgorDePaula
Created October 16, 2018 17:49
Show Gist options
  • Save IgorDePaula/1ad33b3708dfd28a384a2dc92d0a0702 to your computer and use it in GitHub Desktop.
Save IgorDePaula/1ad33b3708dfd28a384a2dc92d0a0702 to your computer and use it in GitHub Desktop.
{
"require": {
"bigbluebutton/bigbluebutton-api-php": "~2.0.0"
}
}
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "8b17d4c6a3ab09630a0ab91877bb4cad",
"packages": [
{
"name": "bigbluebutton/bigbluebutton-api-php",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/bigbluebutton/bigbluebutton-api-php.git",
"reference": "878c1a4747ddd62237641e522ff7bc4b47061d4e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bigbluebutton/bigbluebutton-api-php/zipball/878c1a4747ddd62237641e522ff7bc4b47061d4e",
"reference": "878c1a4747ddd62237641e522ff7bc4b47061d4e",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": ">=5.4"
},
"require-dev": {
"composer/composer": "1.7.*@dev",
"ext-mbstring": "*",
"friendsofphp/php-cs-fixer": "~2.11",
"fzaninotto/faker": "~1.8.0",
"php": ">=7.0",
"php-coveralls/php-coveralls": "2.1.*",
"phpunit/phpunit": "6.*",
"squizlabs/php_codesniffer": "3.*"
},
"type": "library",
"autoload": {
"psr-4": {
"BigBlueButton\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-3.0"
],
"authors": [
{
"name": "Ghazi Triki",
"email": "ghazi.nocturne@gmail.com",
"role": "Developer"
}
],
"description": "BigBlueButton PHP API Library for PHP",
"homepage": "http://bigbluebutton.org/",
"keywords": [
"api",
"bbb",
"bigbluebutton"
],
"time": "2018-08-01T18:28:53+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
sudo docker run --name bigbluebutton -d -p 80:80/tcp -p 443:443/tcp -p 1935:1935 -p 5066:5066 -p 3478:3478 -p 3478:3478/udp bigbluebutton/bigbluebutton -h 192.168.1.178
<?php
require 'vendor/autoload.php';
use BigBlueButton\BigBlueButton;
use BigBlueButton\Parameters\CreateMeetingParameters;
// URL: http://192.168.1.178/bigbluebutton/
// Secret: 6bbdc14d32df911075a5f3176adc1a0f
//6bbdc14d32df911075a5f3176adc1a0f
putenv('BBB_SECRET=6bbdc14d32df911075a5f3176adc1a0f');
putenv('BBB_SERVER_BASE_URL=http://192.168.1.178/bigbluebutton/');
$bbb = new BigBlueButton();
$create = new CreateMeetingParameters(md5(uniqid(time())), 'PHP Greater :-: Top10 mama mia 2asdasdasd');
$create->setAttendeePassword('asdqwe');
$create->setModeratorPassword('123qwe');
$create->setMaxParticipants(34);
$create->setCopyright('copy left');
$create->isBreakout = true;
$create->setWelcomeMessage('Sejam bem vindos php xiita');
$create->setAutoStartRecording(true);
$create->setWebcamsOnlyForModerator(true);
$create->setRecord(true);
$create->setDuration(30);
$response = $bbb->createMeeting($create);
$meetId = $response->getMeetingId();
echo PHP_EOL;echo PHP_EOL;
echo "Created Meeting with ID: " . $meetId;
$meInfo = new \BigBlueButton\Parameters\JoinMeetingParameters($meetId, 'igorw','123qwqe');
$meInfo->setRedirect(true);
$meInfo->setPassword('123123');
$meInfo->setJoinViaHtml5(true);
$meInfo->freeJoin = true;
echo PHP_EOL;
echo PHP_EOL;
$response = $bbb->getJoinMeetingURL($meInfo);
//echo($response);
echo PHP_EOL;
$meInfo2 = new \BigBlueButton\Parameters\JoinMeetingParameters($meetId, 'igor3w','123qwqe');
$meInfo2 = $meInfo2->setRedirect(true)->setJoinViaHtml5(true);
$new = $bbb->joinMeeting($meInfo2);
echo PHP_EOL;
echo $new;
echo PHP_EOL;
//$result = $bbb->getMeetings();
//foreach($result->getMeetings() as $meeting){
//print_r(PHP_EOL.$meeting->getMeetingId().' '.$meeting->getMeetingName().PHP_EOL);
//}
$result = $bbb->getRecordings(new \BigBlueButton\Parameters\GetRecordingsParameters());
foreach($result->getRecords() as $meeting){
//print_r(PHP_EOL.$meeting->getName().' '.$meeting->getPlaybackUrl().PHP_EOL);
}
/*$getr = new \BigBlueButton\Parameters\GetRecordingsParameters();
$getr->setRecordId('1d092c6144f6933fd3201d0cfc67727ec2055269-1538595016313');
$result = $bbb->getRecordings($getr);
var_dump($result);*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment