bbb_api.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. <?php
  2. /*
  3. Copyright 2010 Blindside Networks
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15. Versions:
  16. 1.0 -- Initial version written by DJP
  17. (email: djp [a t ] architectes DOT .org)
  18. 1.1 -- Updated by Omar Shammas and Sebastian Schneider
  19. (email : omar DOT shammas [a t ] g m ail DOT com)
  20. (email : seb DOT sschneider [ a t ] g m ail DOT com)
  21. 1.2 -- Updated by Omar Shammas
  22. (email : omar DOT shammas [a t ] g m ail DOT com)
  23. 1.3 -- Refactored by Peter Mentzer
  24. (email : peter@petermentzerdesign.com)
  25. - This update will BREAK your external existing code if
  26. you've used the previous versions <= 1.2 already so:
  27. -- update your external code to use new method names if needed
  28. -- update your external code to pass new parameters to methods
  29. - Working example of joinIfRunning.php now included
  30. - Added support for BBB 0.8b recordings
  31. - Now using Zend coding, naming and style conventions
  32. - Refactored methods to accept standardized parameters & match BBB API structure
  33. -- See included samples for usage examples
  34. */
  35. /* _______________________________________________________________________*/
  36. /* get the config values */
  37. //require_once "config.php";
  38. class BigBlueButtonBN {
  39. private $_securitySalt;
  40. private $_bbbServerBaseUrl;
  41. /* ___________ General Methods for the BigBlueButton Class __________ */
  42. function __construct() {
  43. /*
  44. Establish just our basic elements in the constructor:
  45. */
  46. // BASE CONFIGS - set these for your BBB server in config.php and they will
  47. // simply flow in here via the constants:
  48. $this->_securitySalt = CONFIG_SECURITY_SALT;
  49. $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL;
  50. }
  51. private function _processXmlResponse($url){
  52. /*
  53. A private utility method used by other public methods to process XML responses.
  54. */
  55. if (extension_loaded('curl')) {
  56. $ch = curl_init() or die ( curl_error($ch) );
  57. $timeout = 10;
  58. curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false);
  59. curl_setopt( $ch, CURLOPT_URL, $url );
  60. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
  61. curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  62. $data = curl_exec( $ch );
  63. curl_close( $ch );
  64. if($data)
  65. return (new SimpleXMLElement($data));
  66. else
  67. return false;
  68. }
  69. return (simplexml_load_file($url));
  70. }
  71. private function _requiredParam($param) {
  72. /* Process required params and throw errors if we don't get values */
  73. if ((isset($param)) && ($param != '')) {
  74. return $param;
  75. }
  76. elseif (!isset($param)) {
  77. throw new Exception('Missing parameter.');
  78. }
  79. else {
  80. throw new Exception(''.$param.' is required.');
  81. }
  82. }
  83. private function _optionalParam($param) {
  84. /* Pass most optional params through as set value, or set to '' */
  85. /* Don't know if we'll use this one, but let's build it in case. */
  86. if ((isset($param)) && ($param != '')) {
  87. return $param;
  88. }
  89. else {
  90. $param = '';
  91. return $param;
  92. }
  93. }
  94. /* __________________ BBB ADMINISTRATION METHODS _________________ */
  95. /* The methods in the following section support the following categories of the BBB API:
  96. -- create
  97. -- join
  98. -- end
  99. */
  100. public function getCreateMeetingUrl($creationParams) {
  101. /*
  102. USAGE:
  103. (see $creationParams array in createMeetingArray method.)
  104. */
  105. $this->_meetingId = $this->_requiredParam($creationParams['meetingId']);
  106. $this->_meetingName = $this->_requiredParam($creationParams['meetingName']);
  107. // Set up the basic creation URL:
  108. $creationUrl = $this->_bbbServerBaseUrl."api/create?";
  109. // Add params:
  110. $params =
  111. 'name='.urlencode($this->_meetingName).
  112. '&meetingID='.urlencode($this->_meetingId).
  113. '&attendeePW='.urlencode($creationParams['attendeePw']).
  114. '&moderatorPW='.urlencode($creationParams['moderatorPw']).
  115. '&dialNumber='.urlencode($creationParams['dialNumber']).
  116. '&voiceBridge='.urlencode($creationParams['voiceBridge']).
  117. '&webVoice='.urlencode($creationParams['webVoice']).
  118. '&logoutURL='.urlencode($creationParams['logoutUrl']).
  119. '&maxParticipants='.urlencode($creationParams['maxParticipants']).
  120. '&record='.urlencode($creationParams['record']).
  121. '&duration='.urlencode($creationParams['duration']);
  122. //'&meta_category='.urlencode($creationParams['meta_category']);
  123. $welcomeMessage = $creationParams['welcomeMsg'];
  124. if(trim($welcomeMessage))
  125. $params .= '&welcome='.urlencode($welcomeMessage);
  126. // Return the complete URL:
  127. return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) );
  128. }
  129. public function createMeetingWithXmlResponseArray($creationParams) {
  130. /*
  131. USAGE:
  132. $creationParams = array(
  133. 'name' => 'Meeting Name', -- A name for the meeting (or username)
  134. 'meetingId' => '1234', -- A unique id for the meeting
  135. 'attendeePw' => 'ap', -- Set to 'ap' and use 'ap' to join = no user pass required.
  136. 'moderatorPw' => 'mp', -- Set to 'mp' and use 'mp' to join = no user pass required.
  137. 'welcomeMsg' => '', -- ''= use default. Change to customize.
  138. 'dialNumber' => '', -- The main number to call into. Optional.
  139. 'voiceBridge' => '', -- 5 digits PIN to join voice. Required.
  140. 'webVoice' => '', -- Alphanumeric to join voice. Optional.
  141. 'logoutUrl' => '', -- Default in bigbluebutton.properties. Optional.
  142. 'maxParticipants' => '-1', -- Optional. -1 = unlimitted. Not supported in BBB. [number]
  143. 'record' => 'false', -- New. 'true' will tell BBB to record the meeting.
  144. 'duration' => '0', -- Default = 0 which means no set duration in minutes. [number]
  145. 'meta_category' => '', -- Use to pass additional info to BBB server. See API docs to enable.
  146. );
  147. */
  148. $xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams));
  149. if ($xml) {
  150. if($xml->meetingID)
  151. return array(
  152. 'returncode' => $xml->returncode->__toString(),
  153. 'message' => $xml->message->__toString(),
  154. 'messageKey' => $xml->messageKey->__toString(),
  155. 'meetingId' => $xml->meetingID->__toString(),
  156. 'attendeePw' => $xml->attendeePW->__toString(),
  157. 'moderatorPw' => $xml->moderatorPW->__toString(),
  158. 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(),
  159. 'createTime' => $xml->createTime->__toString()
  160. );
  161. else
  162. return array(
  163. 'returncode' => $xml->returncode->__toString(),
  164. 'message' => $xml->message->__toString(),
  165. 'messageKey' => $xml->messageKey->__toString()
  166. );
  167. }
  168. else {
  169. return null;
  170. }
  171. }
  172. public function getJoinMeetingURL($joinParams) {
  173. /*
  174. NOTE: At this point, we don't use a corresponding joinMeetingWithXmlResponse here because the API
  175. doesn't respond on success, but you can still code that method if you need it. Or, you can take the URL
  176. that's returned from this method and simply send your users off to that URL in your code.
  177. USAGE:
  178. $joinParams = array(
  179. 'meetingId' => '1234', -- REQUIRED - A unique id for the meeting
  180. 'username' => 'Jane Doe', -- REQUIRED - The name that will display for the user in the meeting
  181. 'password' => 'ap', -- REQUIRED - The attendee or moderator password, depending on what's passed here
  182. 'createTime' => '', -- OPTIONAL - string. Leave blank ('') unless you set this correctly.
  183. 'userID' => '', -- OPTIONAL - string
  184. 'webVoiceConf' => '' -- OPTIONAL - string
  185. );
  186. */
  187. $this->_meetingId = $this->_requiredParam($joinParams['meetingId']);
  188. $this->_username = $this->_requiredParam($joinParams['username']);
  189. $this->_password = $this->_requiredParam($joinParams['password']);
  190. // Establish the basic join URL:
  191. $joinUrl = $this->_bbbServerBaseUrl."api/join?";
  192. // Add parameters to the URL:
  193. $params =
  194. 'meetingID='.urlencode($this->_meetingId).
  195. '&fullName='.urlencode($this->_username).
  196. '&password='.urlencode($this->_password).
  197. '&userID='.urlencode($joinParams['userID']).
  198. '&webVoiceConf='.urlencode($joinParams['webVoiceConf']);
  199. // Only use createTime if we really want to use it. If it's '', then don't pass it:
  200. if (((isset($joinParams['createTime'])) && ($joinParams['createTime'] != ''))) {
  201. $params .= '&createTime='.urlencode($joinParams['createTime']);
  202. }
  203. // Return the URL:
  204. return ($joinUrl.$params.'&checksum='.sha1("join".$params.$this->_securitySalt));
  205. }
  206. public function getEndMeetingURL($endParams) {
  207. /* USAGE:
  208. $endParams = array (
  209. 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting
  210. 'password' => 'mp' -- REQUIRED - The moderator password for the meeting
  211. );
  212. */
  213. $this->_meetingId = $this->_requiredParam($endParams['meetingId']);
  214. $this->_password = $this->_requiredParam($endParams['password']);
  215. $endUrl = $this->_bbbServerBaseUrl."api/end?";
  216. $params =
  217. 'meetingID='.urlencode($this->_meetingId).
  218. '&password='.urlencode($this->_password);
  219. return ($endUrl.$params.'&checksum='.sha1("end".$params.$this->_securitySalt));
  220. }
  221. public function endMeetingWithXmlResponseArray($endParams) {
  222. /* USAGE:
  223. $endParams = array (
  224. 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting
  225. 'password' => 'mp' -- REQUIRED - The moderator password for the meeting
  226. );
  227. */
  228. $xml = $this->_processXmlResponse($this->getEndMeetingURL($endParams));
  229. if ($xml) {
  230. return array(
  231. 'returncode' => $xml->returncode->__toString(),
  232. 'message' => $xml->message->__toString(),
  233. 'messageKey' => $xml->messageKey->__toString()
  234. );
  235. }
  236. else {
  237. return null;
  238. }
  239. }
  240. /* __________________ BBB MONITORING METHODS _________________ */
  241. /* The methods in the following section support the following categories of the BBB API:
  242. -- isMeetingRunning
  243. -- getMeetings
  244. -- getMeetingInfo
  245. */
  246. public function getIsMeetingRunningUrl($meetingId) {
  247. /* USAGE:
  248. $meetingId = '1234' -- REQUIRED - The unique id for the meeting
  249. */
  250. $this->_meetingId = $this->_requiredParam($meetingId);
  251. $runningUrl = $this->_bbbServerBaseUrl."api/isMeetingRunning?";
  252. $params =
  253. 'meetingID='.urlencode($this->_meetingId);
  254. return ($runningUrl.$params.'&checksum='.sha1("isMeetingRunning".$params.$this->_securitySalt));
  255. }
  256. public function isMeetingRunningWithXmlResponseArray($meetingId) {
  257. /* USAGE:
  258. $meetingId = '1234' -- REQUIRED - The unique id for the meeting
  259. */
  260. $xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId));
  261. if($xml) {
  262. return array(
  263. 'returncode' => $xml->returncode->__toString(),
  264. 'running' => $xml->running->__toString() // -- Returns true/false.
  265. );
  266. }
  267. else {
  268. return null;
  269. }
  270. }
  271. public function getGetMeetingsUrl() {
  272. /* Simply formulate the getMeetings URL
  273. We do this in a separate function so we have the option to just get this
  274. URL and print it if we want for some reason.
  275. */
  276. $getMeetingsUrl = $this->_bbbServerBaseUrl."api/getMeetings?checksum=".sha1("getMeetings".$this->_securitySalt);
  277. return $getMeetingsUrl;
  278. }
  279. public function getMeetingsWithXmlResponseArray() {
  280. /* USAGE:
  281. We don't need to pass any parameters with this one, so we just send the query URL off to BBB
  282. and then handle the results that we get in the XML response.
  283. */
  284. $xml = $this->_processXmlResponse($this->getGetMeetingsUrl());
  285. if($xml) {
  286. // If we don't get a success code, stop processing and return just the returncode:
  287. if ($xml->returncode != 'SUCCESS') {
  288. $result = array(
  289. 'returncode' => $xml->returncode->__toString()
  290. );
  291. return $result;
  292. }
  293. elseif ($xml->messageKey == 'noMeetings') {
  294. /* No meetings on server, so return just this info: */
  295. $result = array(
  296. 'returncode' => $xml->returncode->__toString(),
  297. 'messageKey' => $xml->messageKey->__toString(),
  298. 'message' => $xml->message->__toString()
  299. );
  300. return $result;
  301. }
  302. else {
  303. // In this case, we have success and meetings. First return general response:
  304. $result = array(
  305. 'returncode' => $xml->returncode->__toString(),
  306. 'messageKey' => $xml->messageKey->__toString(),
  307. 'message' => $xml->message->__toString()
  308. );
  309. // Then interate through meeting results and return them as part of the array:
  310. foreach ($xml->meetings->meeting as $m) {
  311. $result[] = array(
  312. 'meetingId' => $m->meetingID->__toString(),
  313. 'meetingName' => $m->meetingName->__toString(),
  314. 'createTime' => $m->createTime->__toString(),
  315. 'attendeePw' => $m->attendeePW->__toString(),
  316. 'moderatorPw' => $m->moderatorPW->__toString(),
  317. 'hasBeenForciblyEnded' => $m->hasBeenForciblyEnded->__toString(),
  318. 'running' => $m->running->__toString()
  319. );
  320. }
  321. return $result;
  322. }
  323. }
  324. else {
  325. return null;
  326. }
  327. }
  328. public function getMeetingInfoUrl($infoParams) {
  329. /* USAGE:
  330. $infoParams = array(
  331. 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting
  332. 'password' => 'mp' -- REQUIRED - The moderator password for the meeting
  333. );
  334. */
  335. $this->_meetingId = $this->_requiredParam($infoParams['meetingId']);
  336. $this->_password = $this->_requiredParam($infoParams['password']);
  337. $infoUrl = $this->_bbbServerBaseUrl."api/getMeetingInfo?";
  338. $params =
  339. 'meetingID='.urlencode($this->_meetingId).
  340. '&password='.urlencode($this->_password);
  341. return ($infoUrl.$params.'&checksum='.sha1("getMeetingInfo".$params.$this->_securitySalt));
  342. }
  343. public function getMeetingInfoWithXmlResponseArray($infoParams) {
  344. /* USAGE:
  345. $infoParams = array(
  346. 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting
  347. 'password' => 'mp' -- REQUIRED - The moderator password for the meeting
  348. );
  349. */
  350. $xml = $this->_processXmlResponse($this->getMeetingInfoUrl($infoParams));
  351. if($xml) {
  352. // If we don't get a success code or messageKey, find out why:
  353. if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) {
  354. $result = array(
  355. 'returncode' => $xml->returncode->__toString(),
  356. 'messageKey' => $xml->messageKey->__toString(),
  357. 'message' => $xml->message->__toString()
  358. );
  359. return $result;
  360. }
  361. else {
  362. // In this case, we have success and meeting info:
  363. $result = array(
  364. 'returncode' => $xml->returncode->__toString(),
  365. 'meetingName' => $xml->meetingName->__toString(),
  366. 'meetingId' => $xml->meetingID->__toString(),
  367. 'createTime' => $xml->createTime->__toString(),
  368. 'voiceBridge' => $xml->voiceBridge->__toString(),
  369. 'attendeePw' => $xml->attendeePW->__toString(),
  370. 'moderatorPw' => $xml->moderatorPW->__toString(),
  371. 'running' => $xml->running->__toString(),
  372. 'recording' => $xml->recording->__toString(),
  373. 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(),
  374. 'startTime' => $xml->startTime->__toString(),
  375. 'endTime' => $xml->endTime->__toString(),
  376. 'participantCount' => $xml->participantCount->__toString(),
  377. 'maxUsers' => $xml->maxUsers->__toString(),
  378. 'moderatorCount' => $xml->moderatorCount->__toString(),
  379. );
  380. // Then interate through attendee results and return them as part of the array:
  381. foreach ($xml->attendees->attendee as $a) {
  382. $result[] = array(
  383. 'userId' => $a->userID->__toString(),
  384. 'fullName' => $a->fullName->__toString(),
  385. 'role' => $a->role->__toString()
  386. );
  387. }
  388. return $result;
  389. }
  390. }
  391. else {
  392. return null;
  393. }
  394. }
  395. /* __________________ BBB RECORDING METHODS _________________ */
  396. /* The methods in the following section support the following categories of the BBB API:
  397. -- getRecordings
  398. -- publishRecordings
  399. -- deleteRecordings
  400. */
  401. public function getRecordingsUrl($recordingParams) {
  402. /* USAGE:
  403. $recordingParams = array(
  404. 'meetingId' => '1234', -- OPTIONAL - comma separate if multiple ids
  405. );
  406. */
  407. $recordingsUrl = $this->_bbbServerBaseUrl."api/getRecordings?";
  408. $params = 'meetingID='.urlencode($recordingParams['meetingId']);
  409. return ($recordingsUrl.$params.'&checksum='.sha1("getRecordings".$params.$this->_securitySalt));
  410. }
  411. public function getRecordingsWithXmlResponseArray($recordingParams) {
  412. /* USAGE:
  413. $recordingParams = array(
  414. 'meetingId' => '1234', -- OPTIONAL - comma separate if multiple ids
  415. );
  416. NOTE: 'duration' DOES work when creating a meeting, so if you set duration
  417. when creating a meeting, it will kick users out after the duration. Should
  418. probably be required in user code when 'recording' is set to true.
  419. */
  420. $xml = $this->_processXmlResponse($this->getRecordingsUrl($recordingParams));
  421. if($xml) {
  422. // If we don't get a success code or messageKey, find out why:
  423. if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) {
  424. $result = array(
  425. 'returncode' => $xml->returncode->__toString(),
  426. 'messageKey' => $xml->messageKey->__toString(),
  427. 'message' => $xml->message->__toString()
  428. );
  429. return $result;
  430. }
  431. else {
  432. // In this case, we have success and recording info:
  433. $result = array(
  434. 'returncode' => $xml->returncode->__toString(),
  435. 'messageKey' => $xml->messageKey->__toString(),
  436. 'message' => $xml->message->__toString()
  437. );
  438. foreach ($xml->recordings->recording as $r) {
  439. $result[] = array(
  440. 'recordId' => $r->recordID->__toString(),
  441. 'meetingId' => $r->meetingID->__toString(),
  442. 'name' => $r->name->__toString(),
  443. 'published' => $r->published->__toString(),
  444. 'startTime' => $r->startTime->__toString(),
  445. 'endTime' => $r->endTime->__toString(),
  446. 'playbackFormatType' => $r->playback->format->type->__toString(),
  447. 'playbackFormatUrl' => $r->playback->format->url->__toString(),
  448. 'playbackFormatLength' => $r->playback->format->length->__toString(),
  449. 'metadataTitle' => $r->metadata->title->__toString(),
  450. 'metadataSubject' => $r->metadata->subject->__toString(),
  451. 'metadataDescription' => $r->metadata->description->__toString(),
  452. 'metadataCreator' => $r->metadata->creator->__toString(),
  453. 'metadataContributor' => $r->metadata->contributor->__toString(),
  454. 'metadataLanguage' => $r->metadata->language->__toString(),
  455. // Add more here as needed for your app depending on your
  456. // use of metadata when creating recordings.
  457. );
  458. }
  459. return $result;
  460. }
  461. }
  462. else {
  463. return null;
  464. }
  465. }
  466. public function getPublishRecordingsUrl($recordingParams) {
  467. /* USAGE:
  468. $recordingParams = array(
  469. 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids
  470. 'publish' => 'true', -- REQUIRED - boolean: true/false
  471. );
  472. */
  473. $recordingsUrl = $this->_bbbServerBaseUrl."api/publishRecordings?";
  474. $params =
  475. 'recordID='.urlencode($recordingParams['recordId']).
  476. '&publish='.urlencode($recordingParams['publish']);
  477. return ($recordingsUrl.$params.'&checksum='.sha1("publishRecordings".$params.$this->_securitySalt));
  478. }
  479. public function publishRecordingsWithXmlResponseArray($recordingParams) {
  480. /* USAGE:
  481. $recordingParams = array(
  482. 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids
  483. 'publish' => 'true', -- REQUIRED - boolean: true/false
  484. );
  485. */
  486. $xml = $this->_processXmlResponse($this->getPublishRecordingsUrl($recordingParams));
  487. if($xml) {
  488. return array(
  489. 'returncode' => $xml->returncode->__toString(),
  490. 'published' => $xml->published->__toString() // -- Returns true/false.
  491. );
  492. }
  493. else {
  494. return null;
  495. }
  496. }
  497. public function getDeleteRecordingsUrl($recordingParams) {
  498. /* USAGE:
  499. $recordingParams = array(
  500. 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids
  501. );
  502. */
  503. $recordingsUrl = $this->_bbbServerBaseUrl."api/deleteRecordings?";
  504. $params =
  505. 'recordID='.urlencode($recordingParams['recordId']);
  506. return ($recordingsUrl.$params.'&checksum='.sha1("deleteRecordings".$params.$this->_securitySalt));
  507. }
  508. public function deleteRecordingsWithXmlResponseArray($recordingParams) {
  509. /* USAGE:
  510. $recordingParams = array(
  511. 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids
  512. );
  513. */
  514. $xml = $this->_processXmlResponse($this->getDeleteRecordingsUrl($recordingParams));
  515. if($xml) {
  516. return array(
  517. 'returncode' => $xml->returncode->__toString(),
  518. 'deleted' => $xml->deleted->__toString() // -- Returns true/false.
  519. );
  520. }
  521. else {
  522. return null;
  523. }
  524. }
  525. } // END OF BIGBLUEBUTTON CLASS
  526. ?>