hi my freind
more than a week
i use new php api for recording
everything work great but not about recording
this is inside php file
i send all parameter for recording but nothing happend
<?php
session_start();
if(@$_SESSION['username'])
{
?>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="../css/main.css">
<script type="text/javascript" charset="utf-8">
</script>
</head>
<body id="joinifrunning" onLoad="">
<div id="main">
<?php
/* _____ PHP Big Blue Button API Usage ______
* by Peter Mentzer
pe...@petermentzerdesign.com
* Use, modify and distribute however you like.
*/
// Require the bbb-api file:
require('bbb_api.php');
require('bbb_api_conf.php');
include_once('./inc/public_class_inc.php');
$con = @connect_database($HOST_NAME,$MYSQL_USERNAME,$MYSQL_PASSWORD,$DATABASE_NAME);
$bbb = new BigBlueButton();
$room = $_GET['room'];
$mp1 ="123456".$room; $ap1 = "567890".$room;
$rname = $_GET['rname'];
$user = $_GET['user'];
$isadmin = $_GET['isadmin'];
if($isadmin == "moderate")
$mp = $user;
else
$ap = $user;
$record = $_GET['record'];
if(intval($record) == 1)
$record = "true";
else
$record = "false";
//$meetings[$joinData[0]] = array('meetingID' => "$room", 'moderatorPW' => "$mp", 'attendeePW' =>"$ap");
try {$result = $bbb->isMeetingRunningWithXmlResponseArray("$room");}
catch (Exception $e) {
//echo 'Caught exception1: ', $e->getMessage(), "\n";
$itsAllGood = false;
}
if($result['running']=="false")
{
$creationParams = array(
'meetingId' => $room, // REQUIRED
'meetingName' => "$rname", // REQUIRED
'attendeePw' => "$ap1", // Match this value in getJoinMeetingURL() to join as attendee.
'moderatorPw' => "$mp1", // Match this value in getJoinMeetingURL() to join as moderator.
'welcomeMsg' => '', // ''= use default. Change to customize.
'dialNumber' => '', // The main number to call into. Optional.
'voiceBridge' => '', // PIN to join voice. Optional.
'webVoice' => '', // Alphanumeric to join voice. Optional.
'logoutUrl' => '', // Default in bigbluebutton.properties. Optional.
'maxParticipants' => '-1', // Optional. -1 = unlimitted. Not supported in BBB. [number]
'record' => "$record", // New. 'true' will tell BBB to record the meeting.
'duration' => '0' // Default = 0 which means no set duration in minutes. [number]
//'meta_category' => '', // Use to pass additional info to BBB server. See API docs.
);
// Create the meeting and get back a response:
$itsAllGood = true;
try {$result = $bbb->createMeetingWithXmlResponseArray($creationParams);}
catch (Exception $e) {
//echo 'Caught exception2: ', $e->getMessage(), "\n";
$itsAllGood = false;
}
if ($itsAllGood == true) {
// If it's all good, then we've interfaced with our BBB php api OK:
if ($result == null) {
// If we get a null response, then we're not getting any XML back from BBB.
//echo "Failed to get any response. Maybe we can't contact the BBB server.";
}
else {
// We got an XML response, so let's see what it says:
//print_r($result);
if ($result['returncode'] == 'SUCCESS') {
// Then do stuff ...
//echo "<p>Meeting succesfullly created.</p>";
//////////////////////////////////////////////////////////////
$creationParams = array(
'meetingId' => "$room", // REQUIRED
'meetingName' => "$rname", // REQUIRED
'attendeePw' => "$ap1", // Match this value in getJoinMeetingURL() to join as attendee.
'moderatorPw' => "$mp1",
'welcomeMsg' => '', // ''= use default. Change to customize.
'dialNumber' => '', // The main number to call into. Optional.
'voiceBridge' => '', // PIN to join voice. Optional.
'webVoice' => '', // Alphanumeric to join voice. Optional.
'logoutUrl' => '', // Default in bigbluebutton.properties. Optional.
'maxParticipants' => '-1', // Optional. -1 = unlimitted. Not supported in BBB. [number]
'record' => "$record", // New. 'true' will tell BBB to record the meeting.
'duration' => '0',
);
// Create the meeting and get back a response:
$itsAllGood = true;
try {$result = $bbb->createMeetingWithXmlResponseArray($creationParams);}
catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
$itsAllGood = false;
}
if ($itsAllGood == true) {
// If it's all good, then we've interfaced with our BBB php api OK:
if ($result == null) {
// If we get a null response, then we're not getting any XML back from BBB.
echo "Failed to get any response. Maybe we can't contact the BBB server.";
}
else {
// We got an XML response, so let's see what it says:
print_r($result);
if ($result['returncode'] == 'SUCCESS') {
// Then do stuff ...
echo "<p>Meeting succesfullly created.fesfes</p>";
}
else {
echo "<p>Meeting creation failed.</p>";
}
}
}
//////////////////////////////////////////////////////////////
}
else {
//echo "<p>Meeting creation failed.</p>";
}
}
}
}
if($isadmin == "moderate")
$joinParams = array(
'meetingId' => "$room", // REQUIRED - We have to know which meeting to join.
'username' => "$user", // REQUIRED - The user display name that will show in the BBB meeting.
'password' => "123456".$room, // REQUIRED - Must match either attendee or moderator pass for meeting.
'createTime' => '', // OPTIONAL - string
'userId' => '', // OPTIONAL - string
'webVoiceConf' => '' // OPTIONAL - string
);
else
$joinParams = array(
'meetingId' => "$room", // REQUIRED - We have to know which meeting to join.
'username' => "$user", // REQUIRED - The user display name that will show in the BBB meeting.
'password' => "567890".$room, // REQUIRED - Must match either attendee or moderator pass for meeting.
'createTime' => '', // OPTIONAL - string
'userId' => '', // OPTIONAL - string
'webVoiceConf' => '' // OPTIONAL - string
);
//echo json_encode($joinParams);
//exit;
// Get the URL to join meeting:
$itsAllGood = true;
try {$result = $bbb->getJoinMeetingURL($joinParams);}
catch (Exception $e) {
//echo 'Caught exception3: ', $e->getMessage(), "\n";
$itsAllGood = false;
}
if ($itsAllGood == true) {
//Output results to see what we're getting:
//print_r($result);
}
?>
</div>
</body>
<?php
echo "<script>location.href='$result';</script>";
}
?>