Skip to content

Commit 4e9384e

Browse files
committed
Add "create" API parameters from BigBlueButton 2.4
1 parent fa35c91 commit 4e9384e

21 files changed

+172
-43
lines changed

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<env name="BBB_SERVER_BASE_URL" value="https://test-install.blindsidenetworks.com/bigbluebutton/"/>
1414
</php>
1515
<testsuites>
16-
<testsuite name="BigBlueButton test suit">
16+
<testsuite name="BigBlueButton test suite">
1717
<directory>./tests/</directory>
1818
</testsuite>
1919
</testsuites>

src/Core/ApiMethod.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ abstract class ApiMethod
2424
{
2525
public const CREATE = 'create';
2626
public const JOIN = 'join';
27+
public const INSERT_DOCUMENT = 'insertDocument';
2728
public const ENTER = 'enter';
2829
public const END = 'end';
2930
public const IS_MEETING_RUNNING = 'isMeetingRunning';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
1919
*/
2020

21-
namespace BigBlueButton\Core;
21+
namespace BigBlueButton\Enum;
2222

23-
class MeetingLayout
23+
class MeetingLayout extends \MabeEnum\Enum
2424
{
2525
public const CUSTOM_LAYOUT = 'CUSTOM_LAYOUT';
2626
public const SMART_LAYOUT = 'SMART_LAYOUT';

src/Parameters/CreateMeetingParameters.php

Lines changed: 125 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ class CreateMeetingParameters extends MetaParameters
169169
*/
170170
private $lockSettingsLockOnJoinConfigurable;
171171

172+
/**
173+
* @var bool
174+
*/
175+
private $lockSettingsHideViewersCursor;
176+
172177
/**
173178
* @var bool
174179
*/
@@ -179,6 +184,11 @@ class CreateMeetingParameters extends MetaParameters
179184
*/
180185
private $allowModsToEjectCameras;
181186

187+
/**
188+
* @var bool
189+
*/
190+
private $allowRequestsWithoutSession;
191+
182192
/**
183193
* @var array
184194
*/
@@ -220,10 +230,19 @@ class CreateMeetingParameters extends MetaParameters
220230
private $bannerColor;
221231

222232
/**
233+
* @deprecated
234+
*
223235
* @var bool
224236
*/
225237
private $learningDashboardEnabled;
226238

239+
/**
240+
* @deprecated
241+
*
242+
* @var bool
243+
*/
244+
private $virtualBackgroundsDisabled;
245+
227246
/**
228247
* @var int
229248
*/
@@ -245,6 +264,8 @@ class CreateMeetingParameters extends MetaParameters
245264
private $meetingKeepEvents;
246265

247266
/**
267+
* @deprecated
268+
*
248269
* @var bool
249270
*/
250271
private $breakoutRoomsEnabled;
@@ -269,6 +290,12 @@ class CreateMeetingParameters extends MetaParameters
269290
*/
270291
private $meetingLayout;
271292

293+
/**
294+
* @var int
295+
*/
296+
private $userCameraCap;
297+
298+
272299
/**
273300
* CreateMeetingParameters constructor.
274301
*
@@ -334,9 +361,9 @@ public function getAttendeePassword()
334361
/**
335362
* @param string $attendeePassword
336363
*
337-
* @deprecated
338-
*
339364
* @return CreateMeetingParameters
365+
*
366+
* @deprecated
340367
*/
341368
public function setAttendeePassword($attendeePassword)
342369
{
@@ -346,9 +373,9 @@ public function setAttendeePassword($attendeePassword)
346373
}
347374

348375
/**
349-
* @deprecated
350-
*
351376
* @return string
377+
*
378+
* @deprecated
352379
*/
353380
public function getModeratorPassword()
354381
{
@@ -358,9 +385,9 @@ public function getModeratorPassword()
358385
/**
359386
* @param string $moderatorPassword
360387
*
361-
* @deprecated
362-
*
363388
* @return CreateMeetingParameters
389+
*
390+
* @deprecated
364391
*/
365392
public function setModeratorPassword($moderatorPassword)
366393
{
@@ -670,6 +697,8 @@ public function setBannerColor($bannerColor)
670697
}
671698

672699
/**
700+
* @deprecated
701+
*
673702
* @return bool
674703
*/
675704
public function isLearningDashboardEnabled()
@@ -680,6 +709,8 @@ public function isLearningDashboardEnabled()
680709
/**
681710
* @param bool $learningDashboardEnabled
682711
*
712+
* @deprecated
713+
*
683714
* @return CreateMeetingParameters
684715
*/
685716
public function setLearningDashboardEnabled($learningDashboardEnabled)
@@ -689,6 +720,26 @@ public function setLearningDashboardEnabled($learningDashboardEnabled)
689720
return $this;
690721
}
691722

723+
/**
724+
* @deprecated
725+
*/
726+
public function isVirtualBackgroundsDisabled(): bool
727+
{
728+
return $this->virtualBackgroundsDisabled;
729+
}
730+
731+
/**
732+
* @deprecated
733+
*
734+
* @param mixed $virtualBackgroundsDisabled
735+
*/
736+
public function setVirtualBackgroundsDisabled($virtualBackgroundsDisabled)
737+
{
738+
$this->virtualBackgroundsDisabled = $virtualBackgroundsDisabled;
739+
740+
return $this;
741+
}
742+
692743
/**
693744
* @return int
694745
*/
@@ -989,6 +1040,18 @@ public function setLockSettingsLockOnJoinConfigurable($lockOnJoinConfigurable)
9891040
return $this;
9901041
}
9911042

1043+
public function isLockSettingsHideViewersCursor(): bool
1044+
{
1045+
return $this->lockSettingsHideViewersCursor;
1046+
}
1047+
1048+
public function setLockSettingsHideViewersCursor(bool $lockSettingsHideViewersCursor)
1049+
{
1050+
$this->lockSettingsHideViewersCursor = $lockSettingsHideViewersCursor;
1051+
1052+
return $this;
1053+
}
1054+
9921055
/**
9931056
* @return null|bool
9941057
*/
@@ -1148,13 +1211,18 @@ public function setGuestPolicy($guestPolicy)
11481211
return $this;
11491212
}
11501213

1214+
/**
1215+
* @deprecated
1216+
*/
11511217
public function isBreakoutRoomsEnabled(): bool
11521218
{
11531219
return $this->breakoutRoomsEnabled;
11541220
}
11551221

11561222
/**
11571223
* @return CreateMeetingParameters
1224+
*
1225+
* @deprecated
11581226
*/
11591227
public function setBreakoutRoomsEnabled(bool $breakoutRoomsEnabled): self
11601228
{
@@ -1223,6 +1291,36 @@ public function setMeetingLayout(string $meetingLayout): self
12231291
return $this;
12241292
}
12251293

1294+
public function isAllowRequestsWithoutSession(): bool
1295+
{
1296+
return $this->allowRequestsWithoutSession;
1297+
}
1298+
1299+
public function setAllowRequestsWithoutSession($allowRequestsWithoutSession)
1300+
{
1301+
$this->allowRequestsWithoutSession = $allowRequestsWithoutSession;
1302+
1303+
return $this;
1304+
}
1305+
1306+
/**
1307+
* @return int
1308+
*/
1309+
public function getUserCameraCap(): int
1310+
{
1311+
return $this->userCameraCap;
1312+
}
1313+
1314+
/**
1315+
* @param int $userCameraCap
1316+
* @return CreateMeetingParameters
1317+
*/
1318+
public function setUserCameraCap($userCameraCap)
1319+
{
1320+
$this->userCameraCap = $userCameraCap;
1321+
return $this;
1322+
}
1323+
12261324
/**
12271325
* @return array
12281326
*/
@@ -1306,29 +1404,32 @@ public function getHTTPQuery()
13061404
'copyright' => $this->copyright,
13071405
'muteOnStart' => $this->muteOnStart ? 'true' : 'false',
13081406
'guestPolicy' => $this->guestPolicy,
1309-
'lockSettingsDisableCam' => $this->isLockSettingsDisableCam() ? 'true' : 'false',
1310-
'lockSettingsDisableMic' => $this->isLockSettingsDisableMic() ? 'true' : 'false',
1311-
'lockSettingsDisablePrivateChat' => $this->isLockSettingsDisablePrivateChat() ? 'true' : 'false',
1312-
'lockSettingsDisablePublicChat' => $this->isLockSettingsDisablePublicChat() ? 'true' : 'false',
1313-
'lockSettingsDisableNote' => $this->isLockSettingsDisableNote() ? 'true' : 'false',
1314-
'lockSettingsHideUserList' => $this->isLockSettingsHideUserList() ? 'true' : 'false',
1315-
'lockSettingsLockedLayout' => $this->isLockSettingsLockedLayout() ? 'true' : 'false',
1316-
'lockSettingsLockOnJoin' => $this->isLockSettingsLockOnJoin() ? 'true' : 'false',
1317-
'lockSettingsLockOnJoinConfigurable' => $this->isLockSettingsLockOnJoinConfigurable() ? 'true' : 'false',
1318-
'allowModsToUnmuteUsers' => $this->isAllowModsToUnmuteUsers() ? 'true' : 'false',
1319-
'allowModsToEjectCameras' => $this->isAllowModsToEjectCameras() ? 'true' : 'false',
1407+
'lockSettingsDisableCam' => $this->lockSettingsDisableCam ? 'true' : 'false',
1408+
'lockSettingsDisableMic' => $this->lockSettingsDisableMic ? 'true' : 'false',
1409+
'lockSettingsDisablePrivateChat' => $this->lockSettingsDisablePrivateChat ? 'true' : 'false',
1410+
'lockSettingsDisablePublicChat' => $this->lockSettingsDisablePublicChat ? 'true' : 'false',
1411+
'lockSettingsDisableNote' => $this->lockSettingsDisableNote ? 'true' : 'false',
1412+
'lockSettingsHideUserList' => $this->lockSettingsHideUserList ? 'true' : 'false',
1413+
'lockSettingsLockedLayout' => $this->lockSettingsLockedLayout ? 'true' : 'false',
1414+
'lockSettingsLockOnJoin' => $this->lockSettingsLockOnJoin ? 'true' : 'false',
1415+
'lockSettingsLockOnJoinConfigurable' => $this->lockSettingsLockOnJoinConfigurable ? 'true' : 'false',
1416+
'lockSettingsHideViewersCursor' => $this->lockSettingsHideViewersCursor ? 'true' : 'false',
1417+
'allowModsToUnmuteUsers' => $this->allowModsToUnmuteUsers ? 'true' : 'false',
1418+
'allowModsToEjectCameras' => $this->allowModsToEjectCameras ? 'true' : 'false',
13201419
'bannerText' => trim($this->bannerText),
13211420
'bannerColor' => trim($this->bannerColor),
1322-
'learningDashboardEnabled' => $this->isLearningDashboardEnabled() ? 'true' : 'false',
1421+
'learningDashboardEnabled' => $this->learningDashboardEnabled ? 'true' : 'false',
1422+
'virtualBackgroundsDisabled' => $this->virtualBackgroundsDisabled ? 'true' : 'false',
13231423
'learningDashboardCleanupDelayInMinutes' => $this->learningDashboardCleanupDelayInMinutes,
13241424
'endWhenNoModeratorDelayInMinutes' => $this->endWhenNoModeratorDelayInMinutes,
1425+
'allowRequestsWithoutSession' => $this->allowRequestsWithoutSession ? 'true' : 'false',
13251426
'meetingEndedURL' => $this->meetingEndedURL,
1326-
'breakoutRoomsEnabled' => $this->isBreakoutRoomsEnabled() ? 'true' : 'false',
1327-
'breakoutRoomsRecord' => $this->isBreakoutRoomsRecord() ? 'true' : 'false',
1328-
'breakoutRoomsPrivateChatEnabled' => $this->isBreakoutRoomsPrivateChatEnabled() ? 'true' : 'false',
1329-
'endWhenNoModerator' => $this->isEndWhenNoModerator() ? 'true' : 'false',
1330-
'meetingKeepEvents' => $this->isMeetingKeepEvents() ? 'true' : 'false',
1331-
'meetingLayout' => $this->getMeetingLayout(),
1427+
'breakoutRoomsEnabled' => $this->breakoutRoomsEnabled ? 'true' : 'false',
1428+
'breakoutRoomsRecord' => $this->breakoutRoomsRecord ? 'true' : 'false',
1429+
'breakoutRoomsPrivateChatEnabled' => $this->breakoutRoomsPrivateChatEnabled ? 'true' : 'false',
1430+
'endWhenNoModerator' => $this->endWhenNoModerator ? 'true' : 'false',
1431+
'meetingKeepEvents' => $this->meetingKeepEvents ? 'true' : 'false',
1432+
'meetingLayout' => $this->meetingLayout,
13321433
];
13331434

13341435
// Add breakout rooms parameters only if the meeting is a breakout room

src/Parameters/EndMeetingParameters.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,19 @@ class EndMeetingParameters extends BaseParameters
3131
private $meetingId;
3232

3333
/**
34+
* @deprecated
35+
*
3436
* @var string
3537
*/
3638
private $password;
3739

3840
/**
3941
* EndMeetingParameters constructor.
4042
*
41-
* @param $meetingId
42-
* @param $password
43+
* @param string $meetingId
44+
* @param string $password
4345
*/
44-
public function __construct($meetingId, $password)
46+
public function __construct($meetingId, $password = '')
4547
{
4648
$this->password = $password;
4749
$this->meetingId = $meetingId;
@@ -68,6 +70,8 @@ public function setMeetingId($meetingId)
6870
}
6971

7072
/**
73+
* @deprecated
74+
*
7175
* @return string
7276
*/
7377
public function getPassword()
@@ -78,6 +82,8 @@ public function getPassword()
7882
/**
7983
* @param string $password
8084
*
85+
* @deprecated
86+
*
8187
* @return EndMeetingParameters
8288
*/
8389
public function setPassword($password)

tests/Parameters/CreateMeetingParametersTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,25 @@ public function testCreateMeetingParameters()
6363
$this->assertEquals($params['lockSettingsLockedLayout'], $createMeetingParams->isLockSettingsLockedLayout());
6464
$this->assertEquals($params['lockSettingsLockOnJoin'], $createMeetingParams->isLockSettingsLockOnJoin());
6565
$this->assertEquals($params['lockSettingsLockOnJoinConfigurable'], $createMeetingParams->isLockSettingsLockOnJoinConfigurable());
66+
$this->assertEquals($params['lockSettingsHideViewersCursor'], $createMeetingParams->isLockSettingsHideViewersCursor());
6667
$this->assertEquals($params['allowModsToUnmuteUsers'], $createMeetingParams->isAllowModsToUnmuteUsers());
6768
$this->assertEquals($params['allowModsToEjectCameras'], $createMeetingParams->isAllowModsToEjectCameras());
6869
$this->assertEquals($params['guestPolicy'], $createMeetingParams->getGuestPolicy());
70+
$this->assertEquals($params['allowRequestsWithoutSession'], $createMeetingParams->isAllowRequestsWithoutSession());
71+
$this->assertEquals($params['bannerColor'], $createMeetingParams->getBannerColor());
72+
$this->assertEquals($params['bannerText'], $createMeetingParams->getBannerText());
73+
$this->assertEquals($params['meetingKeepEvents'], $createMeetingParams->isMeetingKeepEvents());
6974
$this->assertEquals($params['endWhenNoModerator'], $createMeetingParams->isEndWhenNoModerator());
7075
$this->assertEquals($params['endWhenNoModeratorDelayInMinutes'], $createMeetingParams->getEndWhenNoModeratorDelayInMinutes());
7176
$this->assertEquals($params['learningDashboardEnabled'], $createMeetingParams->isLearningDashboardEnabled());
77+
$this->assertEquals($params['virtualBackgroundsDisabled'], $createMeetingParams->isVirtualBackgroundsDisabled());
7278
$this->assertEquals($params['learningDashboardCleanupDelayInMinutes'], $createMeetingParams->getLearningDashboardCleanupDelayInMinutes());
7379
$this->assertEquals($params['breakoutRoomsEnabled'], $createMeetingParams->isBreakoutRoomsEnabled());
7480
$this->assertEquals($params['breakoutRoomsRecord'], $createMeetingParams->isBreakoutRoomsRecord());
7581
$this->assertEquals($params['breakoutRoomsPrivateChatEnabled'], $createMeetingParams->isBreakoutRoomsPrivateChatEnabled());
7682
$this->assertEquals($params['meetingEndedURL'], $createMeetingParams->getMeetingEndedURL());
7783
$this->assertEquals($params['meetingLayout'], $createMeetingParams->getMeetingLayout());
84+
$this->assertEquals($params['userCameraCap'], $createMeetingParams->getUserCameraCap());
7885
$this->assertEquals($params['meta_presenter'], $createMeetingParams->getMeta('presenter'));
7986
$this->assertEquals($params['meta_endCallbackUrl'], $createMeetingParams->getMeta('endCallbackUrl'));
8087
$this->assertEquals($params['meta_bbb-recording-ready-url'], $createMeetingParams->getMeta('bbb-recording-ready-url'));

tests/Responses/ApiVersionResponseTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
namespace BigBlueButton\Responses;
2222

23-
use BigBlueButton\Responses\ApiVersionResponse;
2423
use BigBlueButton\TestCase;
2524

2625
/**

tests/Responses/CreateMeetingResponseTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
namespace BigBlueButton\Responses;
2222

23-
use BigBlueButton\Responses\CreateMeetingResponse;
2423
use BigBlueButton\TestCase;
2524

2625
/**

tests/Responses/DeleteRecordingsResponseTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
namespace BigBlueButton\Responses;
2222

23-
use BigBlueButton\Responses\DeleteRecordingsResponse;
2423
use BigBlueButton\TestCase;
2524

2625
/**

0 commit comments

Comments
 (0)