Permalink
Browse files

- provide JS api to eject user

  • Loading branch information...
1 parent fa791b0 commit 753a79546dc766a0f371e7f4f89a7c7c1b5d5ba7 @ritzalam ritzalam committed Apr 11, 2013
@@ -111,6 +111,19 @@
}
}
+ /**
+ * Eject a user.
+ *
+ * Params:
+ * userID - userID of the user you want to eject.
+ */
+ BBB.ejectUser = function(userID) {
+ var swfObj = getSwfObj();
+ if (swfObj) {
+ swfObj.ejectUserRequest(userID);
+ }
+ }
+
/**
* Query who is presenter.
*
@@ -36,6 +36,7 @@ package org.bigbluebutton.main.api
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.vo.CameraSettingsVO;
import org.bigbluebutton.main.events.BBBEvent;
+ import org.bigbluebutton.main.model.users.events.KickUserEvent;
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
import org.bigbluebutton.modules.listeners.events.ListenersCommand;
import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
@@ -54,6 +55,7 @@ package org.bigbluebutton.main.api
private function init():void {
if (ExternalInterface.available) {
+ ExternalInterface.addCallback("ejectUserRequest", handleEjectUserRequest);
ExternalInterface.addCallback("switchPresenterRequest", handleSwitchPresenterRequest);
ExternalInterface.addCallback("getMyUserInfoSync", handleGetMyUserInfoSynch);
ExternalInterface.addCallback("getMyUserInfoAsync", handleGetMyUserInfoAsynch);
@@ -99,6 +101,11 @@ package org.bigbluebutton.main.api
}
}
+ private function handleEjectUserRequest(userID:String):void {
+ var intUserID:String = UsersUtil.externalUserIDToInternalUserID(userID);
+ _dispatcher.dispatchEvent(new KickUserEvent(intUserID));
+ }
+
private function handleIsUserPublishingCamRequestSync(userID:String):Object {
var obj:Object = new Object();
var isUserPublishing:Boolean = false;

0 comments on commit 753a795

Please sign in to comment.