Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- provide JS api to eject user

  • Loading branch information...
commit 753a79546dc766a0f371e7f4f89a7c7c1b5d5ba7 1 parent fa791b0
Richard Alam authored April 11, 2013
13  bigbluebutton-client/resources/prod/lib/bbb_api_bridge.js
@@ -112,6 +112,19 @@
112 112
     }
113 113
 
114 114
     /**
  115
+     * Eject a user.
  116
+     *
  117
+     * Params:
  118
+     *    userID - userID of the user you want to eject.
  119
+     */    
  120
+    BBB.ejectUser = function(userID) {
  121
+      var swfObj = getSwfObj();
  122
+      if (swfObj) {
  123
+        swfObj.ejectUserRequest(userID);
  124
+      }
  125
+    }
  126
+    
  127
+    /**
115 128
      * Query who is presenter.
116 129
      *
117 130
      * Params:
7  bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as
@@ -36,6 +36,7 @@ package org.bigbluebutton.main.api
36 36
   import org.bigbluebutton.core.managers.UserManager;
37 37
   import org.bigbluebutton.core.vo.CameraSettingsVO;
38 38
   import org.bigbluebutton.main.events.BBBEvent;
  39
+  import org.bigbluebutton.main.model.users.events.KickUserEvent;
39 40
   import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
40 41
   import org.bigbluebutton.modules.listeners.events.ListenersCommand;
41 42
   import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
@@ -54,6 +55,7 @@ package org.bigbluebutton.main.api
54 55
     
55 56
     private function init():void {
56 57
       if (ExternalInterface.available) {
  58
+        ExternalInterface.addCallback("ejectUserRequest", handleEjectUserRequest);
57 59
         ExternalInterface.addCallback("switchPresenterRequest", handleSwitchPresenterRequest);
58 60
         ExternalInterface.addCallback("getMyUserInfoSync", handleGetMyUserInfoSynch);
59 61
         ExternalInterface.addCallback("getMyUserInfoAsync", handleGetMyUserInfoAsynch);
@@ -99,6 +101,11 @@ package org.bigbluebutton.main.api
99 101
       }
100 102
     }
101 103
  
  104
+    private function handleEjectUserRequest(userID:String):void {
  105
+        var intUserID:String = UsersUtil.externalUserIDToInternalUserID(userID);
  106
+        _dispatcher.dispatchEvent(new KickUserEvent(intUserID));
  107
+    }
  108
+    
102 109
     private function handleIsUserPublishingCamRequestSync(userID:String):Object {
103 110
       var obj:Object = new Object();
104 111
       var isUserPublishing:Boolean = false;

0 notes on commit 753a795

Please sign in to comment.
Something went wrong with that request. Please try again.