Skip to content

Commit b3caa76

Browse files
committed
Updated INSTALL.md to give a better explanation about joining a meeting.
1 parent 19be050 commit b3caa76

1 file changed

Lines changed: 54 additions & 3 deletions

File tree

INSTALL.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,25 @@ $bbb->createMeeting($createParams);
197197

198198
## Joining the meeting
199199

200+
A meeting can be joined by two different ways. The first way is to let the BigBlueButton server do the redirection for
201+
you. The second way is to ask for an XML response then construct the URL using `getSessionToken`. Both of the methods
202+
are detailed below.
203+
200204
Joining the meeting is done in two steps. In the first step we create an instance of `CreateMeetingParameters` and fill
201-
the previously saved `$meetingId`, then `username` and `role` values from POST values. Don’t forget to set `redirect`
202-
to `true` if you want an immediate redirection to the meeting. We also pass `true` to `setJoinViaHtml5` to join the
203-
meeting using the HTML5 client.
205+
the previously saved `$meetingId`, then `username` and `role` values from POST values.
204206

205207
```php
206208
// Send a join meeting request
207209
$joinParams = new JoinMeetingParameters($meetingId, $HTTP_POST_VARS['username'], $passwords[$HTTP_POST_VARS['role']]);
210+
```
211+
212+
### Following the server redirection
213+
214+
We set `redirect` to `true` if we want an immediate redirection to the meeting. We also pass `true` to
215+
`setJoinViaHtml5` to join the meeting using the HTML5 client.
216+
217+
```php
218+
// Ask for immediate redirection
208219
$joinParams->setRedirect(true)
209220
```
210221

@@ -217,6 +228,46 @@ header('Status: 301 Moved Permanently', false, 301);
217228
header('Location:' . $bbb->getJoinMeetingURL($joinParams));
218229
```
219230

231+
### Storing join response to join manually
232+
233+
There is also a different way to join a meeting. To achieve it, we set `redirect` to `false`.
234+
235+
```php
236+
// Let the prorgrammer do the redirection later
237+
$joinParams->setRedirect(false)
238+
```
239+
240+
In this particular case the server will return an XML response. To handle it you need to call the `joinMeeting` method.
241+
242+
```php
243+
$joinResponse = $bbb->joinMeeting($joinParams);
244+
```
245+
246+
Then we prepare the server URL for joining the meeting.
247+
248+
```php
249+
// Prepare the server URL
250+
$bbbServerUrl = "https://my-bbb-server.com";
251+
```
252+
253+
Depending on the client you want to use the join URL construction will be different.
254+
255+
If you want to join the Flash client, the default URL will look like the lines below.
256+
257+
```php
258+
// Join the Flash client
259+
header('Status: 301 Moved Permanently', false, 301);
260+
header('Location:' . $bbbServerUrl . "/client/BigBlueButton.html?sessionToken=" . $joinResponse->getSessionToken());
261+
```
262+
263+
If you want to join the meeting using the HTML5 client, the default URL is different.
264+
265+
```php
266+
// Join the HTML5 client
267+
header('Status: 301 Moved Permanently', false, 301);
268+
header('Location:' . $bbbServerUrl . "/html5client/join?sessionToken=" . $joinResponse->getSessionToken());
269+
```
270+
220271
## Conclusion
221272
You have discovered how to setup a BigBlueButton meeting then join it using the PHP API client library. Go ahead and
222273
explore the library features to implement your own meeting management system for BigBlueButton.

0 commit comments

Comments
 (0)