Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reverted to just locking enabled

  • Loading branch information...
commit 00479ecd4b88355696a97ab325931584c9280da6 1 parent bfa8e97
Chad Pilkey capilkey authored
Showing with 113 additions and 60 deletions.
  1. +0 −11 bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceService.java
  2. +0 −21 bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/ConferenceService.java
  3. +0 −1  bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/Room.java
  4. +0 −9 bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomImp.java
  5. +0 −11 bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomManager.java
  6. +2 −0  bigbluebutton-client/locale/en_US/bbbResources.properties
  7. +3 −0  bigbluebutton-client/src/org/bigbluebutton/core/events/VoiceConfEvent.as
  8. +1 −1  bigbluebutton-client/src/org/bigbluebutton/modules/listeners/views/ListenersWindow.mxml
  9. +51 −0 bigbluebutton-client/src/org/bigbluebutton/modules/users/business/ListenersSOService.as
  10. +10 −1 bigbluebutton-client/src/org/bigbluebutton/modules/users/business/UsersProxy.as
  11. +2 −0  bigbluebutton-client/src/org/bigbluebutton/modules/users/events/UsersEvent.as
  12. +8 −0 bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersEventMap.mxml
  13. +1 −1  bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
  14. +35 −4 bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml
11 bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceService.java
View
@@ -67,17 +67,6 @@
pmap.put("name", p.getName());
pmap.put("muted", p.isMuted());
pmap.put("talking", p.isTalking());
- pmap.put("locked", p.isMuteLocked());
- log.debug("[" + p.getId() + "," + p.getName() + "," + p.isMuted() + "," + p.isTalking() + "]");
- result.put(p.getId(), pmap);
- }
-
- return result;
- }
-
- public void disableViewersMic(boolean lock) {
- String conference = getBbbSession().getVoiceBridge();
- log.debug("Disable all viewers in room[" + conference + "]");
pmap.put("locked", p.isMuteLocked());
log.debug("[" + p.getId() + "," + p.getName() + "," + p.isMuted() + "," + p.isTalking() + "]");
result.put(p.getId(), pmap);
21 bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/ConferenceService.java
View
@@ -92,27 +92,6 @@ public boolean isRoomMuted(String room){
return false;
}
- public void disable(String room, Boolean lock) {
- if (roomMgr.hasRoom(room)) {
- roomMgr.disable(room, lock);
- ArrayList<Participant> p = getParticipants(room);
- for (Participant o : p) {
- if (lock) {
- muteParticipant(o.getId(), room, true);
- }
-
- lock(o.getId(), room, lock);
- }
- }
- }
-
- public boolean isRoomViewerDisabled(String room){
- if (roomMgr.hasRoom(room)) {
- return roomMgr.isRoomViewerDisabled(room);
- }
- return false;
- }
-
private void muteParticipant(Integer participant, String room, Boolean mute) {
confProvider.mute(room, participant, mute);
}
1  bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/Room.java
View
@@ -28,7 +28,6 @@
public boolean hasParticipant(Integer id);
public ArrayList<Participant> getParticipants();
public boolean isMuted();
- public boolean isViewerDisabled();
public void record(boolean rec);
public boolean record();
public void recording(boolean rec);
9 bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomImp.java
View
@@ -36,7 +36,6 @@
private final ConcurrentMap<Integer, Participant> participants;
private boolean muted = false;
- private boolean viewerDisabled = false;
private boolean record = false;
private String meetingid;
private boolean recording = false;
@@ -81,14 +80,6 @@ public boolean isMuted() {
return muted;
}
- public void disable(boolean disable) {
- viewerDisabled = disable;
- }
-
- public boolean isViewerDisabled() {
- return viewerDisabled;
- }
-
public void record(boolean record){
this.record = record;
}
11 bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomManager.java
View
@@ -79,17 +79,6 @@ public boolean isRoomMuted(String room){
else return false;
}
- public void disable(String room, boolean lock) {
- RoomImp rm = rooms.get(room);
- if (rm != null) rm.disable(lock);
- }
-
- public boolean isRoomViewerDisabled(String room){
- RoomImp rm = rooms.get(room);
- if (rm != null) return rm.isViewerDisabled();
- else return false;
- }
-
public ArrayList<Participant> getParticipants(String room) {
log.debug("Getting participants for room: " + room);
RoomImp rm = rooms.get(room);
2  bigbluebutton-client/locale/en_US/bbbResources.properties
View
@@ -56,6 +56,8 @@ bbb.users.minimizeBtn.accessibilityName = Minimize the Users Window
bbb.users.maximizeRestoreBtn.accessibilityName = Maximize the Users Window
bbb.users.settings.buttonTooltip = Settings
bbb.users.settings.audioSettings = Audio Settings
+bbb.users.settings.disableViewers = Disable Microphone for All Viewers
+bbb.users.settings.enableViewers = Enable Microphone for All Viewers
bbb.users.settings.muteAll = Mute All
bbb.users.settings.muteAllExcept = Mute All Except Presenter
bbb.users.settings.unmuteAll = Unmute All
3  bigbluebutton-client/src/org/bigbluebutton/core/events/VoiceConfEvent.as
View
@@ -27,6 +27,9 @@ package org.bigbluebutton.core.events
public static const LOCK_MUTE_USER:String = "LOCK_MUTE_USER";
public static const MUTE_ALMOST_ALL:String = "VOICECONF_MUTE_ALMOST_ALL";
+ public static const DISABLE_VIEWERS_MIC:String = "VOICECONF_DISABLE_VIEWERS";
+ public static const ENABLE_VIEWERS_MIC:String = "VOICECONF_ENABLE_VIEWERS";
+
public static const MUTE_USER:String = "VOICECONF_MUTE_USER";
public static const UNMUTE_USER:String = "VOICECONF_UNMUTE_USER";
2  bigbluebutton-client/src/org/bigbluebutton/modules/listeners/views/ListenersWindow.mxml
View
@@ -65,7 +65,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.modules.listeners.model.ListenerOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
- private var images:Images= new Images();
+ [Bindable] private var images:Images= new Images();
private var _xPosition:int;
private var _yPosition:int;
51 bigbluebutton-client/src/org/bigbluebutton/modules/users/business/ListenersSOService.as
View
@@ -92,6 +92,7 @@ package org.bigbluebutton.modules.users.business
// Query the server if there are already listeners in the conference.
getCurrentUsers();
getRoomMuteState();
+ getRoomViewerDisabledState()
}
private function leave():void {
@@ -327,6 +328,34 @@ package org.bigbluebutton.modules.users.business
dispatcher.dispatchEvent(e);
}
+ public function disableViewersMic(lock:Boolean):void {
+ var nc:NetConnection = _module.connection;
+ nc.call(
+ "voice.disableViewersMic",// Remote function name
+ new Responder(
+ // participants - On successful result
+ function(result:Object):void {
+ LogUtil.debug("Successfully disable all viewers: ");
+ },
+ // status - On error occurred
+ function(status:Object):void {
+ LogUtil.error("Error occurred:");
+ for (var x:Object in status) {
+ LogUtil.error(x + " : " + status[x]);
+ }
+ }
+ ),//new Responder
+ lock
+ ); //_netConnection.call
+ _listenersSO.send("disableStateCallback", lock);
+ }
+
+ public function disableStateCallback(lock:Boolean):void {
+ var e:UsersEvent = new UsersEvent(UsersEvent.ROOM_DISABLE_STATE);
+ e.disable_state = lock;
+ dispatcher.dispatchEvent(e);
+ }
+
public function ejectUser(userId:Number):void {
var nc:NetConnection = _module.connection;
nc.call(
@@ -397,6 +426,28 @@ package org.bigbluebutton.modules.users.business
); //_netConnection.call
}
+ public function getRoomViewerDisabledState():void{
+ var nc:NetConnection = _module.connection;
+ nc.call(
+ "voice.isRoomViewerDisabled",// Remote function name
+ new Responder(
+ // participants - On successful result
+ function(result:Object):void {
+ var e:UsersEvent = new UsersEvent(UsersEvent.ROOM_DISABLE_STATE);
+ e.disable_state = result as Boolean;
+ dispatcher.dispatchEvent(e);
+ },
+ // status - On error occurred
+ function(status:Object):void {
+ LogUtil.error("Error occurred:");
+ for (var x:Object in status) {
+ LogUtil.error(x + " : " + status[x]);
+ }
+ }
+ )//new Responder
+ ); //_netConnection.call
+ }
+
private function notifyConnectionStatusListener(connected:Boolean, errors:Array=null):void {
if (_connectionListener != null) {
LogUtil.debug(LOGNAME + 'notifying connectionListener for Voice');
11 bigbluebutton-client/src/org/bigbluebutton/modules/users/business/UsersProxy.as
View
@@ -75,12 +75,21 @@ package org.bigbluebutton.modules.users.business
dispatcher.dispatchEvent(e);
}
}
-
+
public function muteUnmuteUser(command:VoiceConfEvent):void
{
_listenersService.muteUnmuteUser(command.userid, command.mute);
}
+ public function disableViewersMic(command:VoiceConfEvent):void
+ {
+ _listenersService.disableViewersMic(true);
+ }
+
+ public function enableViewersMic(command:VoiceConfEvent):void{
+ _listenersService.disableViewersMic(false);
+ }
+
public function muteAllUsers(command:VoiceConfEvent):void
{
_listenersService.muteAllUsers(true);
2  bigbluebutton-client/src/org/bigbluebutton/modules/users/events/UsersEvent.as
View
@@ -23,8 +23,10 @@ package org.bigbluebutton.modules.users.events
public class UsersEvent extends Event
{
public static const ROOM_MUTE_STATE:String = "USERS_ROOM_MUTE_STATE";
+ public static const ROOM_DISABLE_STATE:String = "USERS_ROOM_DISABLE_STATE";
public var mute_state:Boolean;
+ public var disable_state:Boolean;
public function UsersEvent(type:String)
{
8 bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersEventMap.mxml
View
@@ -62,6 +62,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<MethodInvoker generator="{UsersProxy}" method="muteUnmuteUser" arguments="{event}" />
</EventHandlers>
+ <EventHandlers type="{VoiceConfEvent.DISABLE_VIEWERS_MIC}" >
+ <MethodInvoker generator="{UsersProxy}" method="disableViewersMic" arguments="{event}" />
+ </EventHandlers>
+
+ <EventHandlers type="{VoiceConfEvent.ENABLE_VIEWERS_MIC}" >
+ <MethodInvoker generator="{UsersProxy}" method="enableViewersMic" arguments="{event}" />
+ </EventHandlers>
+
<EventHandlers type="{VoiceConfEvent.MUTE_ALL}" >
<MethodInvoker generator="{UsersProxy}" method="muteAllUsers" arguments="{event}" />
</EventHandlers>
2  bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml
View
@@ -123,7 +123,7 @@
public function toggleLockState():void {
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.LOCK_MUTE_USER);
- e.userid = data.userid;
+ e.userid = data.voiceUserid;
e.lock = !data.voiceLocked;
dispatchEvent(e);
}
39 bigbluebutton-client/src/org/bigbluebutton/modules/users/views/UsersWindow.mxml
View
@@ -33,6 +33,8 @@
<mate:Listener type="{ShortcutEvent.FOCUS_USERS_WINDOW}" method="focusWindow" />
<mate:Listener type="{ShortcutEvent.MUTE_ME_EVENT}" method="toggleMuteMeState" />
<mate:Listener type="{UsersEvent.ROOM_MUTE_STATE}" method="setRoomMute" />
+ <mate:Listener type="{UsersEvent.ROOM_DISABLE_STATE}" method="setRoomDisable" />
+
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
@@ -72,6 +74,7 @@
private var modifier:String;
private var roomMuted:Boolean = false;
+ private var viewersDisabled:Boolean = false;
private var myMenu:Menu;
[Bindable]
@@ -158,6 +161,8 @@
private function toggleMuteMeState(event:ShortcutEvent = null):void{
if (UserManager.getInstance().getConference().voiceJoined) {
+ if (UserManager.getInstance().getConference().voiceLocked && ! UserManager.getInstance().getConference().amIModerator()) return;
+
var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.MUTE_USER);
e.userid = UserManager.getInstance().getConference().getMyVoiceUserId();
e.mute = !UserManager.getInstance().getConference().isMyVoiceMuted();
@@ -181,12 +186,17 @@
if (amIModerator) {
myMenuData[1] = {type: "separator"};
myMenuData[2] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.lowerAllHands'), icon: images.hand_new};
+ if (!viewersDisabled) {
+ myMenuData[3] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.disableViewers'), icon: images.lock_close};
+ } else
+ myMenuData[3] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.enableViewers'), icon: images.lock_open};
+
if (!roomMuted) {
- myMenuData[3] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAll'), icon: images.audio_muted};
+ myMenuData[4] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAll'), icon: images.audio_muted};
if (UserManager.getInstance().getConference().getPresenter())
- myMenuData[4] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAllExcept') + ": " + UserManager.getInstance().getConference().getPresenter().name, icon: images.audio_muted};
+ myMenuData[5] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.muteAllExcept') + ": " + UserManager.getInstance().getConference().getPresenter().name, icon: images.audio_muted};
} else
- myMenuData[3] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.unmuteAll'), icon: images.audio};
+ myMenuData[4] = {label: ResourceUtil.getInstance().getString('bbb.users.settings.unmuteAll'), icon: images.audio};
}
// make sure the previous menu is closed before opening a new one
@@ -212,9 +222,12 @@
lowerHands();
break;
case 3:
- muteAll();
+ disableViewers();
break;
case 4:
+ muteAll();
+ break;
+ case 5:
muteAlmostAll();
}
}
@@ -227,6 +240,24 @@
roomMuted = e.mute_state;
}
+ private function setRoomDisable(e:UsersEvent):void {
+ viewersDisabled = e.disable_state;
+ }
+
+ private function disableViewers():void {
+ if (amIModerator) {
+ if (!viewersDisabled) {
+ var disableCommand:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.DISABLE_VIEWERS_MIC);
+ dispatchEvent(disableCommand);
+ viewersDisabled = true;
+ } else {
+ var enableCommand:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.ENABLE_VIEWERS_MIC);
+ dispatchEvent(enableCommand);
+ viewersDisabled = false;
+ }
+ }
+ }
+
private function muteAll():void {
if (amIModerator) {
if (!roomMuted) {
Please sign in to comment.
Something went wrong with that request. Please try again.