From 204d7a0b05d85c1e6a937fbcccb370632f15ed1b Mon Sep 17 00:00:00 2001 From: Brullworfel Date: Fri, 18 Oct 2019 11:01:41 +0300 Subject: [PATCH] add support of meta parameters on meeting creating Add support of meta parameters on meeting creating, in README add example of meta usage and link to BBB API documentation. --- README.md | 10 ++++++++++ src/BigBlueButton/Member/Meeting.php | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4798111..e2bf0b4 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,11 @@ Add a meeting: 'logoutURL' => 'https://example.org/', 'record' => true, 'autoStartRecording' => true, + 'meta' => [ + 'bn-recording-ready-url' => urlencode(https://example.com/api/v1/recording_status), + 'presenter' => 'John Smith', + ], + //any other parameters from [BBB API Documentation](https://docs.bigbluebutton.org/dev/api.html#create) ]); Get meeting join URL for a moderator: @@ -112,6 +117,11 @@ Copy this to a file called 'index.php', adjust the '$url' and '$secret' variable 'logoutURL' => 'https://example.org/', 'record' => true, 'autoStartRecording' => true, + 'meta' => [ + 'bn-recording-ready-url' => urlencode(https://example.com/api/v1/recording_status), + 'presenter' => 'John Smith', + ], + //any other parameters from [BBB API Documentation](https://docs.bigbluebutton.org/dev/api.html#create) ]); print '
' . print_r($meeting, true) . "
\n\n"; diff --git a/src/BigBlueButton/Member/Meeting.php b/src/BigBlueButton/Member/Meeting.php index 2e9f0b1..84899e2 100644 --- a/src/BigBlueButton/Member/Meeting.php +++ b/src/BigBlueButton/Member/Meeting.php @@ -1300,7 +1300,7 @@ public function setClient(Client $client) */ public function create() { - $response = $this->client->get('create', [ + $parameters = [ 'name' => $this->getName(), 'meetingID' => $this->getMeetingID(), 'attendeePW' => $this->getAttendeePW(), @@ -1328,7 +1328,13 @@ public function create() 'lockSettingsLockedLayout' => $this->getLockSettingsLockedLayout(), 'lockSettingsLockOnJoin' => $this->getLockSettingsLockOnJoin(), 'lockSettingsLockOnJoinConfigurable' => $this->getLockSettingsLockOnJoinConfigurable(), - ]); + ]; + + foreach($this->getMetadata() as $key=>$value){ + $parameters["meta_$key"] = $value; + } + + $response = $this->client->get('create', $parameters); $this->meetingID = $response->meetingID; return $this->getInfo(); }