Skip to content

Commit d45a0cb

Browse files
authored
Merge pull request #140 from littleredbutton/sync-upstream
Sync upstream again
2 parents 7f97a9e + 20784a4 commit d45a0cb

13 files changed

+296
-196
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"authors": [
1313
{
1414
"name": "Ghazi Triki",
15-
"email": "ghazi.[email protected]",
15+
"email": "ghazi.[email protected]",
1616
"role": "Developer"
1717
},
1818
{

src/BigBlueButton.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,9 @@ private function requestUrl(string $url, string $payload = '', string $contentTy
587587

588588
return $response->getBody();
589589
}
590+
591+
public function buildUrl(string $method = '', string $params = '', bool $append = true): string
592+
{
593+
return $this->urlBuilder->buildUrl($method, $params, $append);
594+
}
590595
}

src/Core/GuestPolicy.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
7+
*
8+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
9+
*
10+
* This program is free software; you can redistribute it and/or modify it under the
11+
* terms of the GNU Lesser General Public License as published by the Free Software
12+
* Foundation; either version 3.0 of the License, or (at your option) any later
13+
* version.
14+
*
15+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
16+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
17+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License along
20+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
namespace BigBlueButton\Core;
23+
24+
final class GuestPolicy
25+
{
26+
public const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
27+
public const ALWAYS_DENY = 'ALWAYS_DENY';
28+
public const ASK_MODERATOR = 'ASK_MODERATOR';
29+
public const ALWAYS_ACCEPT_AUTH = 'ALWAYS_ACCEPT_AUTH';
30+
}

src/Core/MeetingLayout.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
7+
*
8+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
9+
*
10+
* This program is free software; you can redistribute it and/or modify it under the
11+
* terms of the GNU Lesser General Public License as published by the Free Software
12+
* Foundation; either version 3.0 of the License, or (at your option) any later
13+
* version.
14+
*
15+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
16+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
17+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License along
20+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
namespace BigBlueButton\Core;
23+
24+
final class MeetingLayout
25+
{
26+
public const CUSTOM_LAYOUT = 'CUSTOM_LAYOUT';
27+
public const SMART_LAYOUT = 'SMART_LAYOUT';
28+
public const PRESENTATION_FOCUS = 'PRESENTATION_FOCUS';
29+
public const VIDEO_FOCUS = 'VIDEO_FOCUS';
30+
}

src/Parameters/CreateMeetingParameters.php

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
*/
1919
namespace BigBlueButton\Parameters;
2020

21+
use BigBlueButton\Core\GuestPolicy;
22+
use BigBlueButton\Core\MeetingLayout;
23+
2124
/**
2225
* @method string getName()
2326
* @method $this setName(string $name)
@@ -33,6 +36,8 @@
3336
* @method $this setDialNumber(string $dialNumber)
3437
* @method string getVoiceBridge()
3538
* @method $this setVoiceBridge(string $voiceBridge)
39+
* @method string getWebVoice()
40+
* @method $this setWebVoice(string $webVoice)
3641
* @method int getMaxParticipants()
3742
* @method $this setMaxParticipants(int $maxParticipants)
3843
* @method string getLogoutURL()
@@ -101,6 +106,8 @@
101106
* @method $this setEndWhenNoModeratorDelayInMinutes(int $endWhenNoModeratorDelayInMinutes)
102107
* @method string getMeetingLayout()
103108
* @method $this setMeetingLayout(string $meetingLayout)
109+
* @method string getMeetingEndedURL()
110+
* @method $this setMeetingEndedURL(string $meetingEndedURL)
104111
* @method bool|null isLearningDashboardEnabled()
105112
* @method $this setLearningDashboardEnabled(bool $isLearningDashboardEnabled)
106113
* @method int getLearningDashboardCleanupDelayInMinutes()
@@ -117,15 +124,39 @@
117124
*/
118125
class CreateMeetingParameters extends MetaParameters
119126
{
120-
public const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
121-
public const ALWAYS_DENY = 'ALWAYS_DENY';
122-
public const ASK_MODERATOR = 'ASK_MODERATOR';
123-
public const ALWAYS_ACCEPT_AUTH = 'ALWAYS_ACCEPT_AUTH';
127+
/**
128+
* @deprecated Use GuestPolicy::ALWAYS_ACCEPT instead.
129+
*/
130+
public const ALWAYS_ACCEPT = GuestPolicy::ALWAYS_ACCEPT;
131+
/**
132+
* @deprecated Use GuestPolicy::ALWAYS_DENY instead.
133+
*/
134+
public const ALWAYS_DENY = GuestPolicy::ALWAYS_DENY;
135+
/**
136+
* @deprecated Use GuestPolicy::ASK_MODERATOR instead.
137+
*/
138+
public const ASK_MODERATOR = GuestPolicy::ASK_MODERATOR;
139+
/**
140+
* @deprecated Use GuestPolicy::ALWAYS_ACCEPT_AUTH instead.
141+
*/
142+
public const ALWAYS_ACCEPT_AUTH = GuestPolicy::ALWAYS_ACCEPT_AUTH;
124143

125-
const CUSTOM_LAYOUT = 'CUSTOM_LAYOUT';
126-
const SMART_LAYOUT = 'SMART_LAYOUT';
127-
const PRESENTATION_FOCUS = 'PRESENTATION_FOCUS';
128-
const VIDEO_FOCUS = 'VIDEO_FOCUS';
144+
/**
145+
* @deprecated Use MeetingLayout::CUSTOM_LAYOUT instead.
146+
*/
147+
public const CUSTOM_LAYOUT = MeetingLayout::CUSTOM_LAYOUT;
148+
/**
149+
* @deprecated Use MeetingLayout::SMART_LAYOUT instead.
150+
*/
151+
public const SMART_LAYOUT = MeetingLayout::SMART_LAYOUT;
152+
/**
153+
* @deprecated Use MeetingLayout::PRESENTATION_FOCUS instead.
154+
*/
155+
public const PRESENTATION_FOCUS = MeetingLayout::PRESENTATION_FOCUS;
156+
/**
157+
* @deprecated Use MeetingLayout::VIDEO_FOCUS instead.
158+
*/
159+
public const VIDEO_FOCUS = MeetingLayout::VIDEO_FOCUS;
129160

130161
/**
131162
* @var string
@@ -162,6 +193,11 @@ class CreateMeetingParameters extends MetaParameters
162193
*/
163194
protected $voiceBridge;
164195

196+
/**
197+
* @var string
198+
*/
199+
protected $webVoice;
200+
165201
/**
166202
* @var int
167203
*/
@@ -315,7 +351,7 @@ class CreateMeetingParameters extends MetaParameters
315351
/**
316352
* @var string
317353
*/
318-
protected $guestPolicy = self::ALWAYS_ACCEPT;
354+
protected $guestPolicy = GuestPolicy::ALWAYS_ACCEPT;
319355

320356
/**
321357
* @var bool
@@ -337,6 +373,11 @@ class CreateMeetingParameters extends MetaParameters
337373
*/
338374
protected $meetingLayout;
339375

376+
/**
377+
* @var string
378+
*/
379+
protected $meetingEndedURL;
380+
340381
/**
341382
* @var bool
342383
*/
@@ -589,15 +630,15 @@ public function setParentMeetingId(string $parentMeetingID)
589630
*/
590631
public function isGuestPolicyAlwaysDeny()
591632
{
592-
return $this->guestPolicy === self::ALWAYS_DENY;
633+
return $this->guestPolicy === GuestPolicy::ALWAYS_DENY;
593634
}
594635

595636
/**
596637
* @return CreateMeetingParameters
597638
*/
598639
public function setGuestPolicyAlwaysDeny()
599640
{
600-
$this->guestPolicy = self::ALWAYS_DENY;
641+
$this->guestPolicy = GuestPolicy::ALWAYS_DENY;
601642

602643
return $this;
603644
}
@@ -607,7 +648,7 @@ public function setGuestPolicyAlwaysDeny()
607648
*/
608649
public function isGuestPolicyAskModerator()
609650
{
610-
return $this->guestPolicy === self::ASK_MODERATOR;
651+
return $this->guestPolicy === GuestPolicy::ASK_MODERATOR;
611652
}
612653

613654
/**
@@ -616,7 +657,7 @@ public function isGuestPolicyAskModerator()
616657
*/
617658
public function setGuestPolicyAskModerator()
618659
{
619-
$this->guestPolicy = self::ASK_MODERATOR;
660+
$this->guestPolicy = GuestPolicy::ASK_MODERATOR;
620661

621662
return $this;
622663
}
@@ -626,7 +667,7 @@ public function setGuestPolicyAskModerator()
626667
*/
627668
public function isGuestPolicyAlwaysAcceptAuth()
628669
{
629-
return $this->guestPolicy === self::ALWAYS_ACCEPT_AUTH;
670+
return $this->guestPolicy === GuestPolicy::ALWAYS_ACCEPT_AUTH;
630671
}
631672

632673
/**
@@ -635,7 +676,7 @@ public function isGuestPolicyAlwaysAcceptAuth()
635676
*/
636677
public function setGuestPolicyAlwaysAcceptAuth()
637678
{
638-
$this->guestPolicy = self::ALWAYS_ACCEPT_AUTH;
679+
$this->guestPolicy = GuestPolicy::ALWAYS_ACCEPT_AUTH;
639680

640681
return $this;
641682
}

src/Responses/GetRecordingTextTracksResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
44
*
5-
* Copyright (c) 2016-2018 BigBlueButton Inc. and by respective authors (see below).
5+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
66
*
77
* This program is free software; you can redistribute it and/or modify it under the
88
* terms of the GNU Lesser General Public License as published by the Free Software

tests/TestCase.php

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
namespace BigBlueButton;
2020

21+
use BigBlueButton\Core\GuestPolicy;
22+
use BigBlueButton\Core\MeetingLayout;
2123
use BigBlueButton\Parameters\CreateMeetingParameters as CreateMeetingParameters;
2224
use BigBlueButton\Parameters\EndMeetingParameters;
2325
use BigBlueButton\Parameters\JoinMeetingParameters as JoinMeetingParameters;
@@ -73,6 +75,7 @@ protected function generateCreateParams()
7375
'autoStartRecording' => $this->faker->boolean(50),
7476
'dialNumber' => $this->faker->phoneNumber,
7577
'voiceBridge' => $this->faker->randomNumber(5),
78+
'webVoice' => $this->faker->word,
7679
'logoutURL' => $this->faker->url,
7780
'maxParticipants' => $this->faker->numberBetween(2, 100),
7881
'record' => $this->faker->boolean(50),
@@ -83,7 +86,7 @@ protected function generateCreateParams()
8386
'webcamsOnlyForModerator' => $this->faker->boolean(50),
8487
'logo' => $this->faker->imageUrl(330, 70),
8588
'copyright' => $this->faker->text,
86-
'guestPolicy' => CreateMeetingParameters::ALWAYS_ACCEPT,
89+
'guestPolicy' => $this->faker->randomElement([GuestPolicy::ALWAYS_ACCEPT, GuestPolicy::ALWAYS_DENY, GuestPolicy::ASK_MODERATOR]),
8790
'muteOnStart' => $this->faker->boolean(50),
8891
'lockSettingsDisableCam' => $this->faker->boolean(50),
8992
'lockSettingsDisableMic' => $this->faker->boolean(50),
@@ -95,6 +98,7 @@ protected function generateCreateParams()
9598
'lockSettingsLockOnJoin' => $this->faker->boolean(50),
9699
'lockSettingsLockOnJoinConfigurable' => $this->faker->boolean(50),
97100
'allowModsToUnmuteUsers' => $this->faker->boolean(50),
101+
'allowModsToEjectCameras' => $this->faker->boolean(50),
98102
'meta_presenter' => $this->faker->name,
99103
'meta_endCallbackUrl' => $this->faker->url,
100104
'meta_bbb-recording-ready-url' => $this->faker->url,
@@ -104,16 +108,16 @@ protected function generateCreateParams()
104108
'endWhenNoModerator' => $this->faker->boolean(50),
105109
'endWhenNoModeratorDelayInMinutes' => $this->faker->numberBetween(1, 100),
106110
'meetingLayout' => $this->faker->randomElement([
107-
CreateMeetingParameters::CUSTOM_LAYOUT,
108-
CreateMeetingParameters::SMART_LAYOUT,
109-
CreateMeetingParameters::PRESENTATION_FOCUS,
110-
CreateMeetingParameters::VIDEO_FOCUS
111+
MeetingLayout::CUSTOM_LAYOUT,
112+
MeetingLayout::SMART_LAYOUT,
113+
MeetingLayout::PRESENTATION_FOCUS,
114+
MeetingLayout::VIDEO_FOCUS
111115
]),
112116
'learningDashboardEnabled' => $this->faker->boolean(50),
113117
'learningDashboardCleanupDelayInMinutes' => $this->faker->numberBetween(1, 100),
114-
'allowModsToEjectCameras' => $this->faker->boolean(50),
115118
'breakoutRoomsEnabled' => $this->faker->boolean(50),
116119
'breakoutRoomsPrivateChatEnabled' => $this->faker->boolean(50),
120+
'meetingEndedURL' => $this->faker->url,
117121
'breakoutRoomsRecord' => $this->faker->boolean(50),
118122
'allowRequestsWithoutSession' => $this->faker->boolean(50),
119123
'virtualBackgroundsDisabled' => $this->faker->boolean(50),
@@ -148,11 +152,12 @@ protected function getCreateMock($params)
148152
->setModeratorPassword($params['moderatorPW'])
149153
->setDialNumber($params['dialNumber'])
150154
->setVoiceBridge($params['voiceBridge'])
151-
->setLogoutUrl($params['logoutURL'])
155+
->setWebVoice($params['webVoice'])
156+
->setLogoutURL($params['logoutURL'])
152157
->setMaxParticipants($params['maxParticipants'])
153158
->setRecord($params['record'])
154159
->setDuration($params['duration'])
155-
->setWelcomeMessage($params['welcome'])
160+
->setWelcome($params['welcome'])
156161
->setAutoStartRecording($params['autoStartRecording'])
157162
->setAllowStartStopRecording($params['allowStartStopRecording'])
158163
->setModeratorOnlyMessage($params['moderatorOnlyMessage'])
@@ -172,14 +177,17 @@ protected function getCreateMock($params)
172177
->setLockSettingsLockOnJoin($params['lockSettingsLockOnJoin'])
173178
->setLockSettingsLockOnJoinConfigurable($params['lockSettingsLockOnJoinConfigurable'])
174179
->setAllowModsToUnmuteUsers($params['allowModsToUnmuteUsers'])
175-
->setGuestPolicyAlwaysAccept()
180+
->setGuestPolicy($params['guestPolicy'])
176181
->addMeta('presenter', $params['meta_presenter'])
177182
->setBannerText($params['bannerText'])
178183
->setBannerColor($params['bannerColor'])
179184
->setMeetingKeepEvents($params['meetingKeepEvents'])
180185
->setEndWhenNoModerator($params['endWhenNoModerator'])
181186
->setEndWhenNoModeratorDelayInMinutes($params['endWhenNoModeratorDelayInMinutes'])
187+
->setAllowModsToEjectCameras($params['allowModsToEjectCameras'])
188+
->setMeetingEndedURL($params['meetingEndedURL'])
182189
->setMeetingLayout($params['meetingLayout'])
190+
->setMeetingKeepEvents($params['meetingKeepEvents'])
183191
->setLearningDashboardEnabled($params['learningDashboardEnabled'])
184192
->setLearningDashboardCleanupDelayInMinutes($params['learningDashboardCleanupDelayInMinutes'])
185193
->setAllowModsToEjectCameras($params['allowModsToEjectCameras'])

0 commit comments

Comments
 (0)