Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
266 lines (218 sloc) 12.8 KB
<!DOCTYPE html>
<html lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="jquery.sha1.js"></script>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css" type="text/css" />
<title>BBB API Buddy</title>
</head>
<body>
<a href="https://github.com/omarshammas/bigbluebutton-API-Buddy" target="_blank">
<img alt="Fork me on GitHub" src="forkme_right_red.png" style="position: absolute; top: 0; right: 0; border: 0;">
</a>
<div id="wrapper">
<div id="header">
<div id="logo">
<a href="http://www.bigbluebutton.org" target="_blank"> <img src="bbb_logo.png" width="364" height="89" border="0" /></a>
<div id="slogan"><h3>API Buddy</h3></div>
</div>
<div id="header_right">
</div>
</div>
</div>
<div id="header_bottom">
<img src="banner_bottom.png" width="1000" height="21" border="0" />
</div>
<div id="content">
<form id="bbb" action="#">
<table id="basic_form" >
<tr>
<td id="field">Server</td>
<td><input type="text" size="60" id="server" value="http://test-install.blindsidenetworks.com/bigbluebutton/api/"/></td>
</tr>
<tr>
<td id="field">Salt</td>
<td><input type="text" size="60" id="salt" value="8cd8ef52e8e101574e400365b55e11a6"/></td>
</tr>
<tr>
<td id="field">Meeting ID</td>
<td><input type="text" size="60" id="meetingID" value="1234567890"/></td>
</tr>
<tr>
<td id="field">Meeting Name</td>
<td><input type="text" size="60" id="meetingName" value="Test"/></td>
</tr>
<tr>
<td id="field">Moderator Password</td>
<td><input type="text" size="60" id="moderatorPW" value="mp"/></td>
</tr>
<tr>
<td id="field">Attendee Password</td>
<td><input type="text" size="60" id="attendeePW" value="ap"/></td>
</tr>
</table>
<div id="advanced_div" >
</div>
<table id="user_form">
<tr>
<td id="field">User Name</td>
<td><input type="text" size="60" id="userName" value="John Doe"/></td>
</tr>
<tr>
<td id="field">User ID</td>
<td><input type="text" size="60" id="userID" value=""/></td>
</tr>
</table>
<div id="buttons">
<button type="button" id="submit">Submit</button> &nbsp;
<button type="button" id="clear">Clear</button> &nbsp;
<button type="button" id="reload">Reload</button> &nbsp;
<button type="button" id="advanced">Advanced Options</button> &nbsp;
<button type="button" id="hide">Hide Options</button>
</div>
</form>
<br />
<div id="links">
</div>
</div>
<br />
<div id="footer">
<p id="legal"><strong>Written by <a href="http://omarshammas.com" target="_blank">Omar Shammas</a>, &nbsp; and images &copy; <a href="http://bigbluebutton.org" target="_blank">BigBlueButton Inc</a> 2011</strong></p>
</div>
<script>
$('#reload').click(function () {
$('#bbb')[0].reset();
});
$('#clear').click(function () {
$("#links_table").remove(); //if the tables already exists it removes it
$('#bbb :input').val("");
});
$('#advanced').click(function () {
//$("#advanced").remove();
//$("#buttons").append('<button type="button" id="hide">Hide Options</button>');
$("#advanced_form").remove(); //if the tables already exists it removes it
$("#advanced_div").append('<table id="advanced_form"></table>');
$("#advanced_form").append('<tr><td id="field">Welcome Message </td><td><input type="text" size="60" id="welcomeMessage" value=""/></td><td>( %%CONFNAME%%, %%DIALNUM%%, %%CONFNUM%% ) </td></tr>');
$("#advanced_form").append('<tr><td id="field">Logout URL</td><td><input type="text" size="60" id="logoutURL" value=""/></td></tr>');
$("#advanced_form").append('<tr><td id="field">Maximum Participants</td><td><input type="text" size="60" id="maxParticipants" value=""/></td></tr>');
$("#advanced_form").append('<tr><td id="field">Voice Bridge</td><td><input type="text" size="60" id="voiceBridge" value=""/></td><td>( Usually a 5 digit number, and begins with 7 if using FreeSwitch ) </td></tr>');
$("#advanced_form").append('<tr><td id="field">Dial in Number</td><td><input type="text" size="60" id="dialNumber" value=""/></td></tr>');
$("#advanced_form").append('<tr><td id="field">Meta Description</td><td><input type="text" size="60" id="meta_description" value=""/></td></tr>');
$("#advanced_form").append('<tr><td id="field">Meta Test</td><td><input type="text" size="60" id="meta_test" value=""/></td></tr>');
$("#advanced_form").append('<tr><td id="field">RecordID</td><td><input type="text" size="60" id="recordID" value=""/></td></tr>');
});
$('#hide').click(function () {
//$("#hide").remove();
//$("#buttons").append('<button type="button" id="advanced">Advanced Options</button>');
$("#advanced_form").remove(); //if the tables already exists it removes it
});
$('#submit').click(function () {
//Gets the variables
var $server = $("#server").val();
var $salt = $("#salt").val();
var $meetingID = $.URLEncode( $("#meetingID").val() );
var $meetingName = $.URLEncode( $("#meetingName").val() );
var $moderatorPW = $.URLEncode( $("#moderatorPW").val() );
var $attendeePW = $.URLEncode( $("#attendeePW").val() );
var $userName = $.URLEncode( $("#userName").val() );
var $userID = $.URLEncode( $("#userID").val() );
if ($("#advanced_form").length){
var $welcome = $.URLEncode( $("#welcomeMessage").val() );
var $logoutURL = $.URLEncode( $("#logoutURL").val() );
var $maxParticipants = $.URLEncode( $("#maxParticipants").val() );
var $voiceBridge = $.URLEncode( $("#voiceBridge").val() );
var $dialNumber = $.URLEncode( $("#dialNumber").val() );
var $meta_test = $.URLEncode( $("#meta_test").val() );
var $meta_description = $.URLEncode( $("#meta_description").val() );
var $recordID = $.URLEncode( $("#recordID").val() );
//Creates the URLs
var $params = "name=" + $meetingName + "&meetingID=" + $meetingID + "&moderatorPW=" + $moderatorPW + "&attendeePW=" + $attendeePW + "&welcome=" + $welcome;
$params += "&logoutURL=" + $logoutURL + "&maxParticipants=" + $maxParticipants + "&voiceBridge=" + $voiceBridge + "&dialNumber=" + $dialNumber;
var $createURL = $server + "create?" + $params + "&checksum=" + $.sha1("create" + $params + $salt);
var $params = "name=" + $meetingName + "&meetingID=" + $meetingID + "&moderatorPW=" + $moderatorPW + "&attendeePW=" + $attendeePW + "&welcome=" + $welcome;
$params += "&logoutURL=" + $logoutURL + "&maxParticipants=" + $maxParticipants + "&voiceBridge=" + $voiceBridge + "&dialNumber=" + $dialNumber + "&meta_test=" + $meta_test + "&meta_description=" + $meta_description + "&record=true";
var $createURLwithRecording = $server + "create?" + $params + "&checksum=" + $.sha1("create" + $params + $salt);
$params = "meetingID=" + $meetingID;
var $getRecordingsURL = $server + "getRecordings?" + $params + "&checksum=" + $.sha1("getRecordings" + $params + $salt);
$params = "recordID=" + $recordID + "&publish=true";
var $publishRecordingsURL = $server + "publishRecordings?" + $params + "&checksum=" + $.sha1("publishRecordings" + $params + $salt);
$params = "recordID=" + $recordID + "&publish=false";
var $unpublishRecordingsURL = $server + "publishRecordings?" + $params + "&checksum=" + $.sha1("publishRecordings" + $params + $salt);
$params = "recordID=" + $recordID;
var $deleteRecordingsURL = $server + "deleteRecordings?" + $params + "&checksum=" + $.sha1("deleteRecordings" + $params + $salt);
}
else {
var $params = "name=" + $meetingName + "&meetingID=" + $meetingID + "&moderatorPW=" + $moderatorPW + "&attendeePW=" + $attendeePW;
var $createURL = $server + "create?" + $params + "&checksum=" + $.sha1("create" + $params + $salt);
var $params = "name=" + $meetingName + "&meetingID=" + $meetingID + "&moderatorPW=" + $moderatorPW + "&attendeePW=" + $attendeePW + "&record=true";
var $createURLwithRecording = $server + "create?" + $params + "&checksum=" + $.sha1("create" + $params + $salt);
}
//Creates the URLs
$params = "meetingID=" + $meetingID + "&password=" + $moderatorPW + "&fullName=" + $userName + "&userID=" + $userID;
var $joinModeratorURL = $server + "join?" + $params + "&checksum=" + $.sha1("join" + $params + $salt);
$params = "meetingID=" + $meetingID + "&password=" + $attendeePW + "&fullName=" + $userName + "&userID=" + $userID;
var $joinAttendeeURL = $server + "join?" + $params + "&checksum=" + $.sha1("join" + $params + $salt);
$params = "meetingID=" + $meetingID;
var $isMeetingRunningURL = $server + "isMeetingRunning?" + $params + "&checksum=" + $.sha1("isMeetingRunning" + $params + $salt);
$params = "meetingID=" + $meetingID + "&password=" + $moderatorPW;
var $getMeetingInfoURL = $server + "getMeetingInfo?" + $params + "&checksum=" + $.sha1("getMeetingInfo" + $params + $salt);
$params = "random=" + $meetingID;
var $getMeetingsURL = $server + "getMeetings?" + $params + "&checksum=" + $.sha1("getMeetings" + $params + $salt);
$params = "meetingID=" + $meetingID + "&password=" + $moderatorPW;
var $endURL = $server + "end?" + $params + "&checksum=" + $.sha1("end" + $params + $salt);
//Displays the links in a table
$("#links_table").remove(); //if the tables already exists it removes it
$("#links").append('<table id="links_table"></table>');
$("#links_table").append('<tr><td>Create</td> <td><a href="' + $createURL + '" target="_blank">' + $createURL + '</a></td>');
$("#links_table").append('<tr><td>Create with recording</td> <td><a href="' + $createURLwithRecording + '" target="_blank">' + $createURLwithRecording + '</a></td>');
$("#links_table").append('<tr><td>Join as Moderator</td> <td><a href="' + $joinModeratorURL + '" target="_blank">' + $joinModeratorURL + '</a></td>');
$("#links_table").append('<tr><td>Join as Attendee</td> <td><a href="' + $joinAttendeeURL + '" target="_blank">' + $joinAttendeeURL + '</a></td>');
$("#links_table").append('<tr><td>isMeetingRunning</td> <td><a href="' + $isMeetingRunningURL + '" target="_blank">' + $isMeetingRunningURL + '</a></td>');
$("#links_table").append('<tr><td>getMeetingInfo</td> <td><a href="' + $getMeetingInfoURL + '" target="_blank">' + $getMeetingInfoURL + '</a></td>');
$("#links_table").append('<tr><td>getMeetings</td> <td><a href="' + $getMeetingsURL + '" target="_blank">' + $getMeetingsURL + '</a></td>');
$("#links_table").append('<tr><td>end</td> <td><a href="' + $endURL + '" target="_blank">' + $endURL + '</a></td>');
if ($("#advanced_form").length){
$("#links_table").append('<tr><td>getRecordings</td> <td><a href="' + $getRecordingsURL + '" target="_blank">' + $getRecordingsURL + '</a></td>');
if ( $recordID ){
$("#links_table").append('<tr><td>setPublishRecordings[publish]</td> <td><a href="' + $publishRecordingsURL + '" target="_blank">' + $publishRecordingsURL + '</a></td>');
$("#links_table").append('<tr><td>setPublishRecordings[unpublish]</td> <td><a href="' + $unpublishRecordingsURL + '" target="_blank">' + $unpublishRecordingsURL + '</a></td>');
$("#links_table").append('<tr><td>deleteRecordings</td> <td><a href="' + $deleteRecordingsURL + '" target="_blank">' + $deleteRecordingsURL + '</a></td>');
}
}
//alert('Handler for .submit() called.' + $server);
//return false;
});
$.extend({
URLEncode:function(c){
var o='';var x=0;c=c.toString();
var r=/(^[a-zA-Z0-9_.]*)/;
while(x<c.length){
var m=r.exec(c.substr(x));
if(m!=null && m.length>1 && m[1]!=''){
o+=m[1];x+=m[1].length;
}else{
if(c[x]==' ')o+='+';
else{
var d=c.charCodeAt(x);
var h=d.toString(16);
o+='%'+(h.length<2?'0':'')+h.toUpperCase();
}
x++;
}
}
return o;
},
URLDecode:function(s){
var o=s;var binVal,t;
var r=/(%[^%]{2})/;
while((m=r.exec(o))!=null && m.length>1 && m[1]!=''){
b=parseInt(m[1].substr(1),16);
t=String.fromCharCode(b);o=o.replace(m[1],t);
}
return o;
}
});
</script>
</body>
</html>
Something went wrong with that request. Please try again.