Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
markoscalderon committed May 25, 2013
2 parents 8867726 + 0c1af90 commit 71d4f18
Show file tree
Hide file tree
Showing 21 changed files with 358 additions and 183 deletions.
56 changes: 48 additions & 8 deletions bbb-api-demo/src/main/webapp/bbb_api.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,17 @@ public String getJoinURLwithDynamicConfigXML(String username, String meetingID,
xml_param = xml_param.replace("> <", "><");
}
String setConfigXML_parameters = "meetingID=" + urlEncode(meetingID) +
"&checksum=" + checksum(meetingID + encodeURIComponent(xml_param) + salt) +"&configXML=" + urlEncode(encodeURIComponent(xml_param));
/** Create the parameters we want to send to the server. **/
Map<String, String[]> paramsMap = new HashMap<String, String[]>();
paramsMap.put("meetingID", new String[]{urlEncode(meetingID)});
paramsMap.put("configXML", new String[]{urlEncode(xml_param)});
String baseString = createBaseString(paramsMap);
String checksumString = createChecksum("setConfigXML", baseString);
System.out.println("Base String = [" + baseString + "]");
String setConfigXML_parameters = baseString + "&checksum=" + checksumString;
url = "";
try {
Expand All @@ -322,15 +331,46 @@ public String getJoinURLwithDynamicConfigXML(String username, String meetingID,
//
// And finally return a URL to join that meeting
//
String join_parameters = "meetingID=" + urlEncode(meetingID)
+ "&fullName=" + urlEncode(username) + "&password=mp&configToken=" + configToken;
return base_url_join + join_parameters + "&checksum="
+ checksum("join" + join_parameters + salt);
String join_parameters = "meetingID=" + urlEncode(meetingID) + "&fullName=" + urlEncode(username) + "&password=mp&configToken=" + configToken;
return base_url_join + join_parameters + "&checksum=" + checksum("join" + join_parameters + salt);
}
// From the list of parameters we want to pass. Creates a base string with parameters
// sorted in alphabetical order for us to sign.
public String createBaseString(Map<String, String[]> params) {
StringBuffer csbuf = new StringBuffer();
SortedSet<String> keys = new TreeSet<String>(params.keySet());
boolean first = true;
String checksum = null;
for (String key: keys) {
for (String value: params.get(key)) {
if (first) {
first = false;
} else {
csbuf.append("&");
}
csbuf.append(key);
csbuf.append("=");
csbuf.append(value);
}
}
}
return csbuf.toString();
}
// Get a checksum for our basestring.
public String createChecksum(String apiCall, String baseString) {
StringBuffer csbuf = new StringBuffer();
csbuf.append(apiCall);
csbuf.append(baseString);
csbuf.append(salt);
//System.out.println("Calc checksum for =[" + csbuf.toString() + "]");
return DigestUtils.shaHex(csbuf.toString());
}
//
//Create a meeting and return a URL to join it as moderator
Expand Down
10 changes: 6 additions & 4 deletions bigbluebutton-client/locale/en_US/bbbResources.properties
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ bbb.shortcutkey.share.webcam = 66
bbb.shortcutkey.share.webcam.function = Open webcam sharing window

bbb.shortcutkey.shortcutWindow = 72
bbb.shortcutkey.shortcutWindow.function = Open shortcut help window
bbb.shortcutkey.shortcutWindow.function = Open/focus to shortcut help window
bbb.shortcutkey.logout = 76
bbb.shortcutkey.logout.function = Log out of this meeting
bbb.shortcutkey.raiseHand = 82
Expand All @@ -359,12 +359,14 @@ bbb.shortcutkey.users.mute = 83
bbb.shortcutkey.users.mute.function = Mute or Unmute selected person
bbb.shortcutkey.users.muteall = 65
bbb.shortcutkey.users.muteall.function = Mute or Unmute all users
bbb.shortcutkey.users.focusUsers = 70
bbb.shortcutkey.users.focusUsers = 85
bbb.shortcutkey.users.focusUsers.function = Focus to users list
bbb.shortcutkey.users.muteAllButPres = 65
bbb.shortcutkey.users.muteAllButPres.function = Mute everyone but the Presenter

bbb.shortcutkey.chat.focusTabs = 89
bbb.shortcutkey.chat.focusTabs.function = Focus to chat tabs
bbb.shortcutkey.chat.focusBox = 86
bbb.shortcutkey.chat.focusBox = 66
bbb.shortcutkey.chat.focusBox.function = Focus to chat box
bbb.shortcutkey.chat.changeColour = 67
bbb.shortcutkey.chat.changeColour.function = Focus to font colour picker.
Expand All @@ -377,7 +379,7 @@ bbb.shortcutkey.chat.chatbox.advance = 32
bbb.shortcutkey.chat.chatbox.advance.function = Navigate to the next message
bbb.shortcutkey.chat.chatbox.goback = 80
bbb.shortcutkey.chat.chatbox.goback.function = Navigate to the previous message
bbb.shortcutkey.chat.chatbox.repeat = 85
bbb.shortcutkey.chat.chatbox.repeat = 82
bbb.shortcutkey.chat.chatbox.repeat.function = Repeat current message
bbb.shortcutkey.chat.chatbox.golatest = 89
bbb.shortcutkey.chat.chatbox.golatest.function = Navigate to the latest message
Expand Down
32 changes: 27 additions & 5 deletions bigbluebutton-client/resources/prod/lib/bbb_blinker.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,35 @@ function determineModifier()
modifier = "control+";
}
else if (browser == "Microsoft Internet Explorer"){
modifier = "shift+alt+";
modifier = "control+shift+";
}
/*else if (browser == "Safari"){
modifier = "control+";
}*/
//else if (browser == "Safari"){
// modifier = "control+shift+";
//}
else{
modifier = "control+shift+";
}
return modifier;
}

function determineGlobalModifier()
{
var browser = determineBrowser();
var modifier;
if (browser == "Firefox"){
modifier = "control+shift+";
}
else if (browser == "Chrome"){
modifier = "control+shift+";
}
else if (browser == "Microsoft Internet Explorer"){
modifier = "control+alt+";
}
//else if (browser == "Safari"){
// modifier = "control+alt";
//}
else{
modifier = "shift+alt+";
modifier = "control+alt+";
}
return modifier;
}
Expand Down
37 changes: 19 additions & 18 deletions bigbluebutton-client/src/BigBlueButton.mxml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.util.i18n.ResourceUtil;
private var langResources:ResourceUtil = null; //ResourceUtil.getInstance();
private var modifier:String;
private var globalModifier:String;
/**
* Thse two lines are workaround for this. (ralam - Nov 8, 2008)
* http://gregjessup.com/flex-3-advanceddatagrid-cannot-convert-mxmanagersdragmanagerimpl-to-mxmanagersidragmanager/
Expand All @@ -67,7 +67,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
setupAPI();
EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler);
BBB.initConfigManager();
modifier = ExternalInterface.call("determineModifier");
globalModifier = ExternalInterface.call("determineGlobalModifier");
}
private function configLoadedEventHandler(e:Event):void {
Expand Down Expand Up @@ -104,31 +104,32 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*/
private function localeChanged(e:Event):void{
loadKeyCombos(modifier);
loadKeyCombos(globalModifier);
}
private var keyCombos:Object;
private function loadKeyCombos(modifier:String):void {
private function loadKeyCombos(globalModifier:String):void {
keyCombos = new Object(); // always start with a fresh array
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.flash.exit') as String)] = ShortcutEvent.FOCUS_AWAY_EVENT;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.users.muteme') as String)] = ShortcutEvent.MUTE_ME_EVENT;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chatinput') as String)] = ShortcutEvent.FOCUS_CHAT_INPUT;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.flash.exit') as String)] = ShortcutEvent.FOCUS_AWAY_EVENT;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.users.muteme') as String)] = ShortcutEvent.MUTE_ME_EVENT;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chatinput') as String)] = ShortcutEvent.FOCUS_CHAT_INPUT;
// General hotKeys (usable from anywhere in the application)
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.users') as String)] = ShortcutEvent.FOCUS_USERS_WINDOW;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.video') as String)] = ShortcutEvent.FOCUS_VIDEO_WINDOW;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.presentation') as String)] = ShortcutEvent.FOCUS_PRESENTATION_WINDOW;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.chat') as String)] = ShortcutEvent.FOCUS_CHAT_WINDOW;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.users') as String)] = ShortcutEvent.FOCUS_USERS_WINDOW;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.video') as String)] = ShortcutEvent.FOCUS_VIDEO_WINDOW;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.presentation') as String)] = ShortcutEvent.FOCUS_PRESENTATION_WINDOW;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.chat') as String)] = ShortcutEvent.FOCUS_CHAT_WINDOW;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.desktop') as String)] = ShortcutEvent.SHARE_DESKTOP;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.webcam') as String)] = ShortcutEvent.SHARE_WEBCAM;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.microphone') as String)] = ShortcutEvent.SHARE_MICROPHONE;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.desktop') as String)] = ShortcutEvent.SHARE_DESKTOP;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.webcam') as String)] = ShortcutEvent.SHARE_WEBCAM;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.microphone') as String)] = ShortcutEvent.SHARE_MICROPHONE;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.shortcutWindow') as String)] = ShortcutEvent.REMOTE_OPEN_SHORTCUT_WIN;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.logout') as String)] = ShortcutEvent.LOGOUT;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.raiseHand') as String)] = ShortcutEvent.RAISE_HAND;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.shortcutWindow') as String)] = ShortcutEvent.REMOTE_OPEN_SHORTCUT_WIN;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.logout') as String)] = ShortcutEvent.LOGOUT;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.raiseHand') as String)] = ShortcutEvent.RAISE_HAND;
keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.users.muteAllButPres') as String)] = ShortcutEvent.MUTE_ALL_BUT_PRES;
}
public function hotkeyCapture():void{
Expand All @@ -140,7 +141,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
// Handle general-access hotkeys, regardless of what window the user is focused in
private function handleKeyDown(e:KeyboardEvent) :void {
if (keyCombos == null) loadKeyCombos(modifier);
if (keyCombos == null) loadKeyCombos(globalModifier);
var keyPress:String = (e.ctrlKey ? "control+" : "") + (e.shiftKey ? "shift+" : "") + (e.altKey ? "alt+" : "") + e.keyCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ package org.bigbluebutton.main.events {
public static const CHANGE_FONT_COLOUR:String = 'CHANGE_FONT_COLOUR';
public static const SEND_MESSAGE:String = 'SEND_MESSAGE';

public static const MUTE_ALL_BUT_PRES:String = 'MUTE_ALL_BUT_PRES';

// Temporary string to help fix chat message navigation for screen readers
public static const CHAT_DEBUG:String = 'CHAT_DEBUG';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ package org.bigbluebutton.main.model.modules

private function stopModule(name:String):void {
LogUtil.debug('Stopping module ' + name);
trace('Stopping module ' + name);

var m:ModuleDescriptor = getModule(name);
if (m != null) {
LogUtil.debug('Stopping ' + name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ package org.bigbluebutton.main.model.users {
* is the same then use userID which should be unique making the order the same
* across all clients.
*/
if (a.name.toLowerCase() > b.name.toLowerCase())
if (a.name.toLowerCase() < b.name.toLowerCase())
return -1;
else if (a.name.toLowerCase() < b.name.toLowerCase())
else if (a.name.toLowerCase() > b.name.toLowerCase())
return 1;
else if (a.userID.toLowerCase() > b.userID.toLowerCase())
return -1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.shortcutBtn.toolTip')}"
tabIndex="{baseIndex+numButtons+6}" />
<mx:LinkButton id="helpBtn" visible="{showHelpBtn}" label="?" click="onHelpButtonClicked()" height="22"
styleName="helpLinkButtonStyle" tabIndex="{baseIndex+numButtons+7}" />
styleName="helpLinkButtonStyle" tabIndex="{baseIndex+numButtons+7}"
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.helpBtn')}"/>
<mx:Button label="" id="btnLogout" styleName="logoutButtonStyle"
toolTip="{ResourceUtil.getInstance().getString('bbb.mainToolbar.logoutBtn.toolTip')}" right="10" click="doLogout()" height="22"
tabIndex="{baseIndex+numButtons+8}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<MDIWindow xmlns="flexlib.mdi.containers.*"
xmlns:mx="http://www.adobe.com/2006/mxml"
showCloseButton="true"
initialize="init()"
creationComplete="onCreationComplete()"
xmlns:mate="http://mate.asfusion.com/"
title="{ResourceUtil.getInstance().getString('bbb.shortcuthelp.title')}" >
Expand All @@ -33,6 +34,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<![CDATA[
import flash.events.Event;
import flexlib.controls.textClasses.StringBoundaries;
import mx.collections.ArrayCollection;
import mx.collections.ArrayList;
Expand All @@ -46,33 +49,37 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var chatKeys:ArrayList;
private var userKeys:ArrayList;
private var genResource:Array = ['bbb.shortcutkey.general.minimize', 'bbb.shortcutkey.general.maximize',
'bbb.shortcutkey.flash.exit', 'bbb.shortcutkey.focus.users', 'bbb.shortcutkey.focus.video',
'bbb.shortcutkey.focus.presentation', 'bbb.shortcutkey.focus.chat', 'bbb.shortcutkey.share.desktop',
private var genResource:Array = ['bbb.shortcutkey.general.minimize', 'bbb.shortcutkey.general.maximize', 'bbb.shortcutkey.flash.exit',
'bbb.shortcutkey.focus.users', 'bbb.shortcutkey.focus.video', 'bbb.shortcutkey.focus.presentation',
'bbb.shortcutkey.focus.chat', 'bbb.shortcutkey.chat.chatinput', 'bbb.shortcutkey.share.desktop',
'bbb.shortcutkey.share.microphone', 'bbb.shortcutkey.share.webcam', 'bbb.shortcutkey.shortcutWindow',
'bbb.shortcutkey.logout', 'bbb.shortcutkey.raiseHand', 'bbb.shortcutkey.users.muteme'];
'bbb.shortcutkey.logout', 'bbb.shortcutkey.raiseHand', 'bbb.shortcutkey.users.muteme',
'bbb.shortcutkey.users.muteAllButPres'];
private var presResource:Array = ['bbb.shortcutkey.focus.presentation', 'bbb.shortcutkey.present.focusslide', 'bbb.shortcutkey.whiteboard.undo',
'bbb.shortcutkey.present.upload', 'bbb.shortcutkey.present.previous', 'bbb.shortcutkey.present.select',
'bbb.shortcutkey.present.next', 'bbb.shortcutkey.present.fitWidth', 'bbb.shortcutkey.present.fitPage'];
private var presResource:Array = ['bbb.shortcutkey.present.focusslide', /*'bbb.shortcutkey.whiteboard.undo',*/ 'bbb.shortcutkey.present.upload',
'bbb.shortcutkey.present.previous', 'bbb.shortcutkey.present.select', 'bbb.shortcutkey.present.next',
'bbb.shortcutkey.present.fitWidth', 'bbb.shortcutkey.present.fitPage'];
private var chatResource:Array = ['bbb.shortcutkey.focus.chat', 'bbb.shortcutkey.chat.chatinput', 'bbb.shortcutkey.chat.focusTabs',
'bbb.shortcutkey.chat.focusBox', 'bbb.shortcutkey.chat.changeColour', 'bbb.shortcutkey.chat.sendMessage',
'bbb.shortcutkey.chat.explanation',
'bbb.shortcutkey.chat.chatbox.gofirst', 'bbb.shortcutkey.chat.chatbox.goback', 'bbb.shortcutkey.chat.chatbox.repeat',
'bbb.shortcutkey.chat.chatbox.advance', 'bbb.shortcutkey.chat.chatbox.golatest', 'bbb.shortcutkey.chat.chatbox.goread'];
private var chatResource:Array = ['bbb.shortcutkey.chat.focusTabs', 'bbb.shortcutkey.chat.focusBox', /*'bbb.shortcutkey.chat.changeColour',*/
'bbb.shortcutkey.chat.sendMessage', 'bbb.shortcutkey.chat.explanation', 'bbb.shortcutkey.chat.chatbox.gofirst',
'bbb.shortcutkey.chat.chatbox.goback', 'bbb.shortcutkey.chat.chatbox.repeat', 'bbb.shortcutkey.chat.chatbox.advance',
'bbb.shortcutkey.chat.chatbox.golatest', 'bbb.shortcutkey.chat.chatbox.goread'];
private var userResource:Array = ['bbb.shortcutkey.focus.users', 'bbb.shortcutkey.users.focusUsers', 'bbb.shortcutkey.users.makePresenter', 'bbb.shortcutkey.users.mute',
'bbb.shortcutkey.users.kick', 'bbb.shortcutkey.users.muteall'];
private var userResource:Array = ['bbb.shortcutkey.users.focusUsers', 'bbb.shortcutkey.users.makePresenter', 'bbb.shortcutkey.users.mute',
/*'bbb.shortcutkey.users.kick',*/ 'bbb.shortcutkey.users.muteall'];
[Bindable]
private var shownKeys:ArrayCollection;
[Bindable]
private var baseIndex:int = 100;
private var modifier:String;
private var globalModifier:String;
private function init():void {
modifier = ExternalInterface.call("determineModifier");
globalModifier = ExternalInterface.call("determineGlobalModifier");
}
private function onCreationComplete():void {
Expand All @@ -86,7 +93,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function reloadKeys():void {
genKeys = loadKeys(genResource);
genKeys = loadKeys(genResource, true);
presKeys = loadKeys(presResource);
chatKeys = loadKeys(chatResource);
userKeys = loadKeys(userResource);
Expand All @@ -112,14 +119,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
private function loadKeys(resource:Array):ArrayList {
private function loadKeys(resource:Array, global:Boolean=false):ArrayList {
var keyList:ArrayList = new ArrayList();
var keyCombo:String;
var modifier:String;
var mod:String;
if (global)
mod = globalModifier;
else
mod = modifier;
for (var i:int = 0; i < resource.length; i++) {
// Find the modifier key(s) for the user's browser
modifier = ExternalInterface.call("determineModifier");
keyCombo = ResourceUtil.getInstance().getString(resource[i]);
var key:int = int(keyCombo);
var convKey:String;
Expand All @@ -143,7 +153,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
if (keyCombo == "----"){
keyList.addItem({shortcut:(ResourceUtil.getInstance().getString(resource[i] + '.function')), func:""});
} else{
keyList.addItem({shortcut:modifier + convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});
keyList.addItem({shortcut:mod + convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});
}
}
return keyList;
Expand Down
Loading

0 comments on commit 71d4f18

Please sign in to comment.