PHP code example of joisarjignesh / bigbluebutton

1. Go to this page and download the library: Download joisarjignesh/bigbluebutton library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joisarjignesh / bigbluebutton example snippets


dd(\Bigbluebutton::isConnect()); //default 
dd(\Bigbluebutton::server('server1')->isConnect()); //for specific server 
dd(bigbluebutton()->isConnect()); //using helper method 

\Bigbluebutton::create([
    'meetingID' => 'tamku',
    'meetingName' => 'test meeting',
    'attendeePW' => 'attendee',
    'moderatorPW' => 'moderator'
]); 

use BigBlueButton\Parameters\CreateMeetingParameters;

$meetingParams = new CreateMeetingParameters($meetingID, $meetingName);
$meetingParams->setModeratorPW('moderatorPassword');
$meetingParams->setAttendeePW('attendeePassword');

\Bigbluebutton::create($meetingParams);

$createMeeting = \Bigbluebutton::initCreateMeeting([
    'meetingID' => 'tamku',
    'meetingName' => 'test meeting',
    'attendeePW' => 'attendee',
    'moderatorPW' => 'moderator',
]);

$createMeeting->setDuration(100); //overwrite default configuration
\Bigbluebutton::create($createMeeting);

  \Bigbluebutton::create([
      'meetingID' => 'tamku',
      'meetingName' => 'test meeting',
      'attendeePW' => 'attendee',
      'moderatorPW' => 'moderator',
      'presentation'  => [ //must be array
          ['link' => 'https://www.example.com/doc.pdf', 'fileName' => 'doc.pdf'], //first will be default and current slide in meeting
          ['link' => 'https://www.example.com/php_tutorial.pptx', 'fileName' => 'php_tutorial.pptx'],
      ],
  ]); 
  

\Bigbluebutton::create([
    'meetingID' => 'tamku',
    'meetingName' => 'test meeting',
    'attendeePW' => 'attendee',
    'moderatorPW' => 'moderator',
    'endCallbackUrl'  => 'www.example.com/callback',
    'logoutUrl' => 'www.example.com/logout',
]); 

\Bigbluebutton::create([
    'meetingID' => 'tamku',
    'meetingName' => 'test meeting',
    'attendeePW' => 'attendee',
    'moderatorPW' => 'moderator',
    'bbb-recording-ready-url'  => 'https://example.com/api/v1/recording_status',
]); 

use JoisarJignesh\Bigbluebutton\Facades\Bigbluebutton;

return redirect()->to(
 Bigbluebutton::join([
    'meetingID' => 'tamku',
    'userName' => 'disa',
    'password' => 'attendee' //which user role want to join set password here
 ])
);

\Bigbluebutton::join([
    'meetingID' => 'tamku',
    'userName' => 'disa',
    'password' => 'attendee', //which user role want to join set password here
    'redirect' => false, //it will not redirect into bigblueserver
    'userId' =>  "54575",
    'customParameters' => [  
       'foo' => 'bar',
       'key' => 'value'
    ]
]);

\Bigbluebutton::all(); //using facade
bigbluebutton()->all(); //using helper method 

use JoisarJignesh\Bigbluebutton\Facades\Bigbluebutton;

Bigbluebutton::getMeetingInfo([
    'meetingID' => 'tamku',
    'moderatorPW' => 'moderator' //moderator password set here
]);

Bigbluebutton::isMeetingRunning([
    'meetingID' => 'tamku',
]);

Bigbluebutton::isMeetingRunning('tamku'); //second way 

use JoisarJignesh\Bigbluebutton\Facades\Bigbluebutton;

Bigbluebutton::close([
    'meetingID' => 'tamku',
    'moderatorPW' => 'moderator' //moderator password set here
]);

\Bigbluebutton::getRecordings([
    'meetingID' => 'tamku',
    //'meetingID' => ['tamku','xyz'], //pass as array if get multiple recordings 
    //'recordID' => 'a3f1s',
    //'recordID' => ['xyz.1','pqr.1'] //pass as array note :If a recordID is specified, the meetingID is ignored.
    // 'state' => 'any' // It can be a set of states separate by commas  
]);

\Bigbluebutton::publishRecordings([
   'recordID' => 'a3f1s',
    //'recordID' => ['xyz.1','pqr.1'] //pass as array if publish multiple recordings
   'state' => true //default is true  
]);

\Bigbluebutton::deleteRecordings([
    //'recordID' => 'a3f1s',
    'recordID' => ['a3f1s','a4ff2'] //pass array if multiple delete recordings
]);

\Bigbluebutton::updateRecordings([
    //'recordID' => 'a3f1s',
    'recordID' => ['a3f1s','a4ff2'] //pass array if multiple delete recordings
]);
 
dd(Bigbluebutton::hooksCreate([
      'callbackURL' => 'example.test', //ll meeting id
      'getRaw' => true //optional
]));
 
dd(Bigbluebutton::hooksDestroy([
     'hooksID' => 33
]));

dd(Bigbluebutton::hooksDestroy('53')); //second way

dd(\Bigbluebutton::getApiVersion()); //return as collection 

 $url = \Bigbluebutton::start([
     'meetingID' => 'tamku',
     'meetingName' => 'test meeting name',
     'moderatorPW' => 'moderator', //moderator password set here
     'attendeePW' => 'attendee', //attendee password here
     'userName' => 'John Deo',//for join meeting 
     //'redirect' => false // only want to create and meeting and get join url then use this parameter 
 ]);

return redirect()->to($url);
 

php artisan vendor:publish --tag=bigbluebutton-config

php artisan config:clear