Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Bigbluebutton Api Php Laravel Package

littleredbutton/bigbluebutton-api-php

PHP client for the BigBlueButton API. Create and manage meetings, join URLs, recordings, and server calls from your Laravel or PHP app with a simple, typed wrapper around BBB endpoints and responses.

View on GitHub
Deep Wiki
Context7

Getting Started

First Steps

  1. Installation

    composer require littleredbutton/bigbluebutton-api-php
    

    Add the service provider to config/app.php:

    'providers' => [
        // ...
        LittleRedButton\BigBlueButton\BigBlueButtonServiceProvider::class,
    ],
    
  2. Configuration Publish the config file:

    php artisan vendor:publish --provider="LittleRedButton\BigBlueButton\BigBlueButtonServiceProvider"
    

    Update .env with your BBB server URL, secret, and credentials:

    BBB_URL=https://your-bbb-server.com/bigbluebutton-api
    BBB_SECRET=your-secret-key
    
  3. First Use Case: Create a Meeting

    use LittleRedButton\BigBlueButton\BigBlueButton;
    
    $bbb = app(BigBlueButton::class);
    $meeting = $bbb->createMeeting([
        'name' => 'Team Sync',
        'meetingID' => 'team-sync-2025',
        'attendeePW' => 'password123',
        'moderatorPW' => 'moderator123',
    ]);
    

Implementation Patterns

Common Workflows

  1. Meeting Management

    • Create/Join Meetings:
      $meeting = $bbb->createMeeting($params);
      $joinUrl = $bbb->getJoinUrl($meeting['meetingID']);
      
    • List Active Meetings:
      $activeMeetings = $bbb->getMeetings(['state:active']);
      
  2. User & Session Control

    • Kick Users:
      $bbb->kickUser($meetingId, $userId);
      
    • Mute/Unmute Participants:
      $bbb->muteUser($meetingId, $userId, true);
      
  3. Webhooks & Events

    • Subscribe to meeting events (e.g., started, ended):
      $bbb->subscribeToEvents('meeting-started', function ($payload) {
          // Handle event (e.g., log, notify Slack)
      });
      
  4. Recording Management

    • Publish/Delete Recordings:
      $bbb->publishRecording($meetingId, $recordId);
      $bbb->deleteRecording($recordId);
      

Integration Tips

  • Laravel Queues: Offload long-running tasks (e.g., recording processing) to queues.
    dispatch(new ProcessRecordingJob($recordId));
    
  • Caching: Cache frequent API calls (e.g., meeting lists) with Laravel’s cache.
    $meetings = Cache::remember("bbb_meetings_{$state}", now()->addMinutes(5), fn() =>
        $bbb->getMeetings(['state:' => $state])
    );
    
  • Middleware: Protect BBB routes with auth middleware.
    Route::middleware(['auth:admin'])->group(function () {
        Route::post('/bbb/meetings', [MeetingController::class, 'create']);
    });
    

Gotchas and Tips

Pitfalls

  1. Rate Limiting

    • BBB may throttle requests. Use exponential backoff for retries:
      try {
          $response = $bbb->createMeeting($params);
      } catch (RateLimitException $e) {
          sleep($e->retryAfter);
          retry();
      }
      
  2. Secret Key Security

    • Never hardcode BBB_SECRET in code. Use Laravel’s .env and validate it’s set:
      if (!config('bbb.secret')) {
          throw new \RuntimeException('BBB secret not configured!');
      }
      
  3. Meeting ID Conflicts

    • Ensure meetingID is unique. Use UUIDs or timestamps:
      $meetingId = 'meeting-' . Str::uuid()->toString();
      
  4. Webhook Verification

    • Always verify webhook signatures to prevent spoofing:
      $payload = file_get_contents('php://input');
      $signature = $_SERVER['HTTP_X_BBB_SIGNATURE'];
      if (!$bbb->verifyWebhook($payload, $signature)) {
          abort(403, 'Invalid webhook signature');
      }
      

Debugging

  • Enable Debug Mode Set debug: true in config/bbb.php to log raw API responses:
    'debug' => env('BBB_DEBUG', false),
    
  • Check API Responses Inspect $bbb->getLastResponse() for errors:
    if ($bbb->getLastResponse()->failed()) {
        Log::error('BBB API Error:', ['response' => $bbb->getLastResponse()->json()]);
    }
    

Extension Points

  1. Custom API Clients Extend LittleRedButton\BigBlueButton\Client to add methods:

    class CustomBbbClient extends Client {
        public function customMethod($param) {
            return $this->post('/custom-endpoint', $param);
        }
    }
    
  2. Event Handlers Bind custom logic to BBB events:

    event(new MeetingStarted($meetingId));
    
  3. Recording Processing Use Laravel’s finished events to trigger post-processing:

    $bbb->onRecordingFinished($recordId, function ($record) {
        // Upload to S3, notify users, etc.
    });
    
  4. Fallback for Offline BBB Implement a fallback queue for critical actions (e.g., meeting creation):

    if (!$bbb->isOnline()) {
        Queue::later(now()->addMinutes(5), new RetryMeetingCreationJob($params));
    }
    
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity