-
Notifications
You must be signed in to change notification settings - Fork 44
/
urls - bbb.html
265 lines (218 loc) · 12.8 KB
/
urls - bbb.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!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>
<button type="button" id="clear">Clear</button>
<button type="button" id="reload">Reload</button>
<button type="button" id="advanced">Advanced Options</button>
<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>, and images © <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>