Skip to content

Commit

Permalink
Merge pull request bigbluebutton#125 from tdjac0bs/php-join-custom-pa…
Browse files Browse the repository at this point in the history
…rameters

Add support to custom parameters on join
  • Loading branch information
GhaziTriki authored Aug 20, 2020
2 parents 48aa353 + e6bf205 commit 3256e88
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Parameters/JoinMeetingParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ class JoinMeetingParameters extends UserDataParameters
*/
private $joinViaHtml5;

/**
* @var array
*/
private $customParameters;

/**
* JoinMeetingParametersTest constructor.
*
Expand All @@ -90,6 +95,7 @@ public function __construct($meetingId, $username, $password)
$this->meetingId = $meetingId;
$this->username = $username;
$this->password = $password;
$this->customParameters = array();
}

/**
Expand Down Expand Up @@ -307,6 +313,18 @@ public function setJoinViaHtml5($joinViaHtml5)
return $this;
}

/**
* @param string $paramName
* @param string $paramValue
* @return JoinMeetingParameters
*/
public function setCustomParameter($paramName, $paramValue)
{
$this->customParameters[$paramName] = $paramValue;

return $this;
}

/**
* @return string
*/
Expand All @@ -325,6 +343,11 @@ public function getHTTPQuery()
'joinViaHtml5' => $this->joinViaHtml5 ? 'true' : 'false',
'clientURL' => $this->clientURL
];

foreach( $this->customParameters as $key => $value ) {
$queries[$key] = $value;
}

$this->buildUserData($queries);

return $this->buildHTTPQuery($queries);
Expand Down

0 comments on commit 3256e88

Please sign in to comment.