diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceService.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceService.java index e8a349a073..8f692477a2 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceService.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceService.java @@ -67,6 +67,17 @@ public class VoiceService { return result; } + public void disableViewersMic(boolean lock) { + String conference = getBbbSession().getVoiceBridge(); + log.debug("Disable all viewers in room[" + conference + "]"); + conferenceService.disable(conference, lock); + } + + public boolean isRoomViewerDisabled(){ + String conference = getBbbSession().getVoiceBridge(); + return conferenceService.isRoomViewerDisabled(conference); + } + public void muteAllUsers(boolean mute) { String conference = getBbbSession().getVoiceBridge(); log.debug("Mute all users in room[" + conference + "]"); diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/ConferenceService.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/ConferenceService.java index c71d41e72a..dc4427c81b 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/ConferenceService.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/ConferenceService.java @@ -92,6 +92,27 @@ public class ConferenceService implements ConferenceEventListener { return false; } + public void disable(String room, Boolean lock) { + if (roomMgr.hasRoom(room)) { + roomMgr.disable(room, lock); + ArrayList 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); } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/Room.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/Room.java index 4812aee874..b3a0f800d1 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/Room.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/Room.java @@ -28,6 +28,7 @@ public interface Room { public boolean hasParticipant(Integer id); public ArrayList getParticipants(); public boolean isMuted(); + public boolean isViewerDisabled(); public void record(boolean rec); public boolean record(); public void recording(boolean rec); diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomImp.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomImp.java index 15bb3b5b1d..7fda03a212 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomImp.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomImp.java @@ -36,6 +36,7 @@ public class RoomImp implements Room { private final ConcurrentMap participants; private boolean muted = false; + private boolean viewerDisabled = false; private boolean record = false; private String meetingid; private boolean recording = false; @@ -80,6 +81,14 @@ public class RoomImp implements Room { return muted; } + public void disable(boolean disable) { + viewerDisabled = disable; + } + + public boolean isViewerDisabled() { + return viewerDisabled; + } + public void record(boolean record){ this.record = record; } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomManager.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomManager.java index ea12a828db..86de4a6d37 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomManager.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/webconference/voice/internal/RoomManager.java @@ -79,6 +79,17 @@ public class RoomManager { 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 getParticipants(String room) { log.debug("Getting participants for room: " + room); RoomImp rm = rooms.get(room); diff --git a/bigbluebutton-client/.actionScriptProperties b/bigbluebutton-client/.actionScriptProperties index 30928e75a0..caada6e057 100755 --- a/bigbluebutton-client/.actionScriptProperties +++ b/bigbluebutton-client/.actionScriptProperties @@ -1,6 +1,6 @@ - + @@ -14,13 +14,13 @@ + - @@ -61,4 +61,3 @@ - diff --git a/bigbluebutton-client/.flexProperties b/bigbluebutton-client/.flexProperties index a86bbec4db..afb930671b 100755 --- a/bigbluebutton-client/.flexProperties +++ b/bigbluebutton-client/.flexProperties @@ -1,3 +1,2 @@ - diff --git a/bigbluebutton-client/.project b/bigbluebutton-client/.project index b2a58a23c7..983e716571 100755 --- a/bigbluebutton-client/.project +++ b/bigbluebutton-client/.project @@ -5,6 +5,11 @@ + + org.eclipse.jdt.core.javabuilder + + + com.adobe.flexbuilder.project.flexbuilder @@ -20,6 +25,7 @@ com.adobe.flexbuilder.project.flexnature com.adobe.flexbuilder.project.actionscriptnature com.powerflasher.fdt.core.FlashNature + org.eclipse.jdt.core.javanature diff --git a/bigbluebutton-client/.settings/org.eclipse.core.resources.prefs b/bigbluebutton-client/.settings/org.eclipse.core.resources.prefs index 283eab5210..3c18556542 100755 --- a/bigbluebutton-client/.settings/org.eclipse.core.resources.prefs +++ b/bigbluebutton-client/.settings/org.eclipse.core.resources.prefs @@ -1,4 +1,3 @@ -#Mon Dec 13 14:02:21 EST 2010 eclipse.preferences.version=1 encoding//locale/el_GR/bbbResources.properties=UTF-8 encoding/=UTF-8 diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as index 0326ce266a..e3809bc402 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/classyaudio/managers/ClassyAudioManager.as @@ -119,7 +119,7 @@ package org.bigbluebutton.modules.classyaudio.managers private function enablePushToTalkButton():void{ var e:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD); e.button = new PushToTalkButton(); - event.module="Microphone"; + e.module="Microphone"; //e.tabIndex = 2; dispatcher.dispatchEvent(e); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/business/UsersProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/business/UsersProxy.as index 001abed7a8..50f50cc660 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/business/UsersProxy.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/business/UsersProxy.as @@ -94,6 +94,8 @@ package org.bigbluebutton.modules.users.business { //find the presenter and lock them var pres:BBBUser = UserManager.getInstance().getConference().getPresenter(); + if (pres && pres.voiceLocked) pres = null; + if (pres) _listenersService.lockMuteUser(int(pres.voiceUserid), true); @@ -103,6 +105,11 @@ package org.bigbluebutton.modules.users.business if (pres) _listenersService.lockMuteUser(int(pres.voiceUserid), false); } + + public function lockMuteUser(command:VoiceConfEvent):void + { + _listenersService.lockMuteUser(command.userid, command.lock); + } public function kickUser(event:KickUserEvent):void { var user:BBBUser = UsersUtil.getUser(event.userid); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersEventMap.mxml index ccdc4f683e..765add61b1 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/maps/UsersEventMap.mxml @@ -74,4 +74,8 @@ with BigBlueButton; if not, see . + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml index dd20794b3a..07c901324f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml @@ -60,20 +60,26 @@ private var rolledOver:Boolean = false; private var muteRolled:Boolean = false; + private var lockRolled:Boolean = false; private function onCreationComplete():void{ - muteBtn.enabled = kickUserBtn.enabled = moderator = UserManager.getInstance().getConference().amIModerator(); + lockBtn.enabled = muteBtn.enabled = kickUserBtn.enabled = moderator = UserManager.getInstance().getConference().amIModerator(); if (moderator) { BindingUtils.bindProperty(muteBtn, "visible", voiceJoinedInd, "visible"); muteBtn.includeInLayout = true; + BindingUtils.bindProperty(lockBtn, "visible", voiceJoinedInd, "visible"); + lockBtn.includeInLayout = true; } else { BindingUtils.bindProperty(muteImg, "visible", voiceJoinedInd, "visible"); muteImg.includeInLayout = true; + BindingUtils.bindProperty(lockImg, "visible", voiceJoinedInd, "visible"); + lockImg.includeInLayout = true; } this.addEventListener(FlexEvent.DATA_CHANGE, dataChangeHandler); BindingUtils.bindSetter(updateMuteBtn, muteInd, "visible"); + BindingUtils.bindSetter(updateLockBtn, voiceLockedInd, "visible"); } private function dataChangeHandler(e:Event):void { @@ -115,6 +121,13 @@ dispatchEvent(e); } + public function toggleLockState():void { + var e:VoiceConfEvent = new VoiceConfEvent(VoiceConfEvent.LOCK_MUTE_USER); + e.userid = data.userid; + e.lock = !data.voiceLocked; + dispatchEvent(e); + } + private function updateMuteBtn(voiceMuted:Boolean = false):void { if (data != null) { if (moderator) { @@ -131,16 +144,42 @@ } } - private function mouseOverHandler():void { + private function updateLockBtn(voiceLocked:Boolean = false):void { + if (data != null) { + if (moderator) { + if (data.voiceLocked == lockRolled) + lockBtn.setStyle("icon", images.unlocked); + else + lockBtn.setStyle("icon", images.locked); + } else { + if (data.voiceLocked == lockRolled) + lockImg.source = images.unlocked; + else + lockImg.source = images.locked; + } + } + } + + private function mouseOverMuteHandler():void { muteRolled = true; updateMuteBtn(); } - private function mouseOutHandler():void { + private function mouseOutMuteHandler():void { muteRolled = false; updateMuteBtn(); } + private function mouseOverLockHandler():void { + lockRolled = true; + updateLockBtn(); + } + + private function mouseOutLockHandler():void { + lockRolled = false; + updateLockBtn(); + } + ]]> - - + + + diff --git a/bigbluebutton-client/src/org/red5/flash/bwcheck/app/BandwidthDetectionApp.as b/bigbluebutton-client/src/org/red5/flash/bwcheck/app/BandwidthDetectionApp.as old mode 100644 new mode 100755 index 77b3e2f4b7..afe00865f8 --- a/bigbluebutton-client/src/org/red5/flash/bwcheck/app/BandwidthDetectionApp.as +++ b/bigbluebutton-client/src/org/red5/flash/bwcheck/app/BandwidthDetectionApp.as @@ -116,7 +116,7 @@ package org.red5.flash.bwcheck.app { LogUtil.debug("kbit Down: " + event.info.kbitDown + " Delta Down: " + event.info.deltaDown + " Delta Time: " + event.info.deltaTime + " Latency: " + event.info.latency); LogUtil.debug("Server Client Bandwidth Detect Complete"); - LogUtil.debug("Detecting Client Server Bandwidth)"; + LogUtil.debug("Detecting Client Server Bandwidth"); ClientServer(); }