Merge branch 'master' into unify-users-and-listeners

This commit is contained in:
Richard Alam 2013-02-20 19:46:11 +00:00
commit 79ed1bdbe9
10 changed files with 45 additions and 8 deletions

View File

@ -125,9 +125,12 @@ var amIPresenterSync = function() {
var getMyUserInfoAsynch = function() {
BBB.listen("GetMyUserInfoResponse", function(bbbEvent) {
console.log("User info response [myUserID=" + bbbEvent.myUserID
+ ",myUsername=" + bbbEvent.myUsername + ",myAvatarURL=" + bbbEvent.myAvatarURL
+ ",myRole=" + bbbEvent.myRole + ",amIPresenter=" + bbbEvent.amIPresenter + "].");
console.log("User info response [myUserID=" + bbbEvent.myUserID
+ ",myUsername=" + bbbEvent.myUsername + ",myAvatarURL=" + bbbEvent.myAvatarURL
+ ",myRole=" + bbbEvent.myRole + ",amIPresenter=" + bbbEvent.amIPresenter + "].");
for(var key in bbbEvent.customdata){
console.log(key + " " + bbbEvent.customdata[key]);
}
});
BBB.getMyUserInfo();
@ -135,12 +138,16 @@ var getMyUserInfoAsynch = function() {
var getMyUserInfoSynch = function() {
BBB.getMyUserInfo(function(userInfo) {
console.log("User info callback [myUserID=" + userInfo.myUserID
+ ",myUsername=" + userInfo.myUsername + ",myAvatarURL=" + userInfo.myAvatarURL
+ ",myRole=" + userInfo.myRole + ",amIPresenter=" + userInfo.amIPresenter + "].");
console.log("User info callback [myUserID=" + userInfo.myUserID
+ ",myUsername=" + userInfo.myUsername + ",myAvatarURL=" + userInfo.myAvatarURL
+ ",myRole=" + userInfo.myRole + ",amIPresenter=" + "].");
for(var key in userInfo.customdata){
console.log(key + " " + userInfo.customdata[key]);
}
});
}
var getMyRoleAsynch = function() {
BBB.listen("GetMyRoleResponse", function(bbbEvent) {
console.log("Received GetMyRoleResponse event [" + bbbEvent.myRole + "]");

View File

@ -78,6 +78,10 @@ package org.bigbluebutton.core
public static function getAvatarURL():String {
return UserManager.getInstance().getConference().avatarURL;
}
public static function getCustomData():Object {
return UserManager.getInstance().getConference().getMyCustomData();
}
public static function getExternalMeetingID():String {
return UserManager.getInstance().getConference().externalMeetingID;

View File

@ -127,6 +127,7 @@ package org.bigbluebutton.main.api
obj.myAvatarURL = UsersUtil.getAvatarURL();
obj.myRole = UsersUtil.getMyRole();
obj.amIPresenter = UsersUtil.amIPresenter();
obj.customdata = UsersUtil.getCustomData();
return obj;
}

View File

@ -73,6 +73,7 @@ package org.bigbluebutton.main.api
payload.myAvatarURL = UsersUtil.getAvatarURL();
payload.myRole = UsersUtil.getMyRole();
payload.amIPresenter = UsersUtil.amIPresenter();
payload.customdata = UsersUtil.getCustomData();
broadcastEvent(payload);
}

View File

@ -108,6 +108,7 @@ package org.bigbluebutton.main.model.users
[Bindable] public var voiceLocked:Boolean = false;
[Bindable] public var status:String = "";
[Bindable] public var customdata:Object = {};
/*
* This variable is for accessibility for the Participants Window. It can't be manually set

View File

@ -344,6 +344,14 @@ package org.bigbluebutton.main.model.users {
return me.name;
}
public function setMyCustomData(customdata:Object):void{
me.customdata = customdata;
}
public function getMyCustomData():Object{
return me.customdata;
}
public function setMyRole(role:String):void {
me.role = role;
}

View File

@ -73,6 +73,14 @@ package org.bigbluebutton.main.model.users
webvoiceconf:xml.webvoiceconf,
voicebridge:xml.voicebridge, mode:xml.mode, welcome:xml.welcome, logoutUrl:xml.logoutUrl,
defaultLayout:xml.defaultLayout, avatarURL:xml.avatarURL};
user.customdata = new Object();
if(xml.customdata)
{
for each(var cdnode:XML in xml.customdata.elements()){
LogUtil.debug("checking user customdata: "+cdnode.name() + " = " + cdnode);
user.customdata[cdnode.name()] = cdnode.toString();
}
}
if (_resultListener != null) _resultListener(true, user);
}

View File

@ -66,6 +66,7 @@ package org.bigbluebutton.main.model.users
UserManager.getInstance().getConference().setMyRole(result.role);
UserManager.getInstance().getConference().setMyRoom(result.room);
UserManager.getInstance().getConference().setMyAuthToken(result.authToken);
UserManager.getInstance().getConference().setMyCustomData(result.customdata);
UserManager.getInstance().getConference().setDefaultLayout(result.defaultLayout);
UserManager.getInstance().getConference().externalMeetingID = result.externMeetingID;

View File

@ -320,7 +320,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Image source="{thick_icon}" horizontalAlign="center" width="30" visible="{showWhiteboardToolbar}"/>
<mx:VSlider height="50" id="sld" change="changeThickness(event)" visible="{showWhiteboardToolbar}"
toolTip="{ResourceUtil.getInstance().getString('bbb.highlighter.toolbar.thickness')}"
minimum="2" maximum="30"
minimum="1" maximum="30"
useHandCursor="true" value="2" showDataTip="true" snapInterval="1" dataTipOffset="0" labelOffset="0" />
<mx:Image source="{thin_icon}" horizontalAlign="center" width="30" visible="{showWhiteboardToolbar}"/>

View File

@ -765,7 +765,8 @@ class ApiController {
}
} else {
UserSession us = meetingService.getUserSession(session['user-token']);
UserSession us = meetingService.getUserSession(session['user-token']);
Meeting meeting = meetingService.getMeeting(us.meetingID);
log.info("Found conference for " + us.fullname)
response.addHeader("Cache-Control", "no-cache")
withFormat {
@ -790,6 +791,11 @@ class ApiController {
logoutUrl(us.logoutUrl)
defaultLayout(us.defaultLayout)
avatarURL(us.avatarURL)
customdata(){
meeting.getUserCustomData(us.externUserID).each{ k,v ->
"$k"("$v")
}
}
}
}
}