PHP code example of barivanlab / video-call-meet-laravel-webrtc

1. Go to this page and download the library: Download barivanlab/video-call-meet-laravel-webrtc 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/ */

    

barivanlab / video-call-meet-laravel-webrtc example snippets


use Barivanlab\VideoCallMeet\Facades\Meet;

// Register a participant
$join = Meet::join('team-standup', 'Alice');
// ['peer_id' => '…', 'peers' => [['id' => '…', 'name' => 'Bob']]]

// Deliver a signaling message (offer / answer / candidate / state)
Meet::signal('team-standup', $fromPeerId, $toPeerId, 'offer', $sdpPayload);

// Collect messages for a peer since a sequence number
$messages = Meet::poll('team-standup', $peerId, $lastSequence);

use Barivanlab\VideoCallMeet\Contracts\SignalingServiceContract;

public function join(SignalingServiceContract $meet)
{
    return $meet->join('team-standup', 'Alice');
}
bash
# Publish everything (config + views + assets)
php artisan vendor:publish --tag=meet

# …or publish selectively
php artisan vendor:publish --tag=meet-config   # config/meet.php
php artisan vendor:publish --tag=meet-views    # resources/views/vendor/meet
php artisan vendor:publish --tag=meet-assets   # public/vendor/meet/{css,js}