- add JS API to query for presenter user id
This commit is contained in:
parent
b5141883f1
commit
37db82c67a
@ -70,6 +70,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BBB.getPresenterUserID = function(callback) {
|
||||
var swfObj = getSwfObj();
|
||||
if (swfObj) {
|
||||
if (typeof callback === 'function') {
|
||||
callback(swfObj.getPresenterUserID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the Flash client for the user's role.
|
||||
|
@ -28,6 +28,15 @@ package org.bigbluebutton.core
|
||||
public class UsersUtil
|
||||
{
|
||||
|
||||
public static function getPresenterUserID():String {
|
||||
var presenter:BBBUser = UserManager.getInstance().getConference().getPresenter();
|
||||
if (presenter != null) {
|
||||
return presenter.userID;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public static function amIPublishing():CameraSettingsVO {
|
||||
return UserManager.getInstance().getConference().amIPublishing();
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ package org.bigbluebutton.main.api
|
||||
ExternalInterface.addCallback("switchPresenterRequest", handleSwitchPresenterRequest);
|
||||
ExternalInterface.addCallback("getMyUserInfoSync", handleGetMyUserInfoSynch);
|
||||
ExternalInterface.addCallback("getMyUserInfoAsync", handleGetMyUserInfoAsynch);
|
||||
ExternalInterface.addCallback("getPresenterUserID", handleGetPresenterUserID);
|
||||
ExternalInterface.addCallback("getMyUserID", handleGetMyUserID);
|
||||
ExternalInterface.addCallback("getExternalMeetingID", handleGetExternalMeetingID);
|
||||
ExternalInterface.addCallback("joinVoiceRequest", handleJoinVoiceRequest);
|
||||
@ -179,6 +180,15 @@ package org.bigbluebutton.main.api
|
||||
return UsersUtil.internalUserIDToExternalUserID(UsersUtil.getMyUserID());
|
||||
}
|
||||
|
||||
private function handleGetPresenterUserID():String {
|
||||
var presUserID:String = UsersUtil.getPresenterUserID();
|
||||
if (presUserID != "") {
|
||||
return UsersUtil.internalUserIDToExternalUserID(presUserID);
|
||||
}
|
||||
// return an empty string. Meeting has no presenter.
|
||||
return "";
|
||||
}
|
||||
|
||||
private function handleGetExternalMeetingID():String {
|
||||
return UserManager.getInstance().getConference().externalMeetingID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user