deviny/bbb-php-api

The BigBlueButton 的简单 PHP API。

v1.7 2023-05-14 18:41 UTC

This package is auto-updated.

Last update: 2024-09-14 21:16:04 UTC


README

原始版本可在以下位置找到: https://github.com/petermentzer/bbb-api-php

由 Devin Yang 重新打包。

https://yty.ccc.tc/demo/

示例

创建会议和加入链接。

<?php

use DevinY\BigBlueButtonPhpApi\Bbb;
require __DIR__.'/../vendor/autoload.php';
define("DEFAULT_SECURITY_SALT", "YOUR SALT");
define("DEFAULT_SERVER_BASE_URL", "YOUR SERVER URL");

$meeting_id = time();
$meeting = new Bbb($meeting_id);
$meeting->setName("This is Meeting Name");
echo sprintf("<a href='%s'>Join as Student</a><br/>",$meeting->attendee("John"));
echo sprintf("<a href='%s'>Join as Teacher</a><br/>",$meeting->moderator("Devin"));
?>

预上传幻灯片

<?php
$meetingObj->slides(['https://ccc.test/p1.pdf','https://ccc.test/p2.pdf']);
?>

定义不同的服务器

<?php
$meeting = new Bbb("test");
$meeting->setServerBaseUrl('YOUR SERVER URL');
$meeting->setSecret('YOUR SALT');
?>

默认 SetClinetPage 是 BigBlueButton.html

<?php
$meetingObj->setClientPage("ccc.html");
?>

更多可用方法

$meeting->setWelcome('Welecome message for all')
    ->setModeratorOnlyMessage('Only teacher can see this messsage');
$meeting->setDuration(20);
$meeting->setRecord("true"); //Old version
$meeting->setAutoStartRecording(false);
$meeting->setAllowStartStopRecording(true);
$meeting->setLogoutUrl('https://YourDomain');