Skip to content

Commit b6d85ad

Browse files
committed
Merge pull request bigbluebutton#104 from SenecaCDOT-BigBlueButton/more-client-fixes
More client fixes
2 parents d3c3037 + af7e8c5 commit b6d85ad

File tree

12 files changed

+92
-28
lines changed

12 files changed

+92
-28
lines changed

bigbluebutton-client/locale/en_US/bbbResources.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ bbb.participants.maximizeRestoreBtn.accessibilityName = Maximize the Participant
5757
bbb.participants.settings.buttonTooltip = Settings
5858
bbb.participants.settings.audioSettings = Audio Settings
5959
bbb.participants.settings.muteAll = Mute All
60+
bbb.participants.settings.muteAllExcept = Mute All Except Presenter
6061
bbb.participants.settings.unmuteAll = Unmute All
6162
bbb.participants.settings.lowerAllHands = Lower All Hands
6263
bbb.participants.pushToTalk.toolTip = Click to talk

bigbluebutton-client/src/org/bigbluebutton/main/model/users/BBBUser.as

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ package org.bigbluebutton.main.model.users
8484
[Bindable] public var room:String = "";
8585
[Bindable] public var authToken:String = "";
8686
[Bindable] public var selected:Boolean = false;
87-
[Bindable] public var voiceUserid:Number;
87+
[Bindable] public var voiceUserid:Number = 0;
8888

8989
private var _voiceMuted:Boolean = false;
9090
[Bindable]
@@ -219,14 +219,23 @@ package org.bigbluebutton.main.model.users
219219
n.authToken = user.authToken;
220220
n.me = user.me;
221221
n.userID = user.userID;
222-
n.externUserID = user.externUserID;
222+
n.externUserID = user.externUserID;
223223
n.name = user.name;
224224
n.hasStream = user.hasStream;
225225
n.streamName = user.streamName;
226226
n.presenter = user.presenter;
227227
n.raiseHand = user.raiseHand;
228228
n.role = user.role;
229229
n.room = user.room;
230+
n.customdata = user.customdata;
231+
n.media = user.media;
232+
n.phoneUser = user.phoneUser;
233+
n.talking = user.talking;
234+
n.userStatus = user.userStatus;
235+
n.voiceJoined = user.voiceJoined;
236+
n.voiceLocked = user.voiceLocked;
237+
n.voiceMuted = user.voiceMuted;
238+
n.voiceUserid = user.voiceUserid;
230239

231240
return n;
232241
}

bigbluebutton-client/src/org/bigbluebutton/main/model/users/Conference.as

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ package org.bigbluebutton.main.model.users {
5353

5454
// Custom sort function for the users ArrayCollection. Need to put dial-in users at the very bottom.
5555
private function sortFunction(a:Object, b:Object, array:Array = null):int {
56-
if (a.presenter)
56+
/*if (a.presenter)
5757
return -1;
5858
else if (b.presenter)
59-
return 1;
60-
else if (a.role == Role.MODERATOR && b.role == Role.MODERATOR) {
59+
return 1;*/
60+
if (a.role == Role.MODERATOR && b.role == Role.MODERATOR) {
6161
// do nothing go to the end and check names
6262
} else if (a.role == Role.MODERATOR)
6363
return -1;

bigbluebutton-client/src/org/bigbluebutton/modules/chat/services/ChatMessageService.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ package org.bigbluebutton.modules.chat.services
9393
msg.chatType = ChatConstants.PUBLIC_CHAT;
9494
msg.fromUserID = SPACE;
9595
msg.fromUsername = SPACE;
96-
msg.fromColor = "0";
96+
msg.fromColor = "86187";
9797
msg.fromLang = "en";
9898
msg.fromTime = new Date().getTime();
9999
msg.fromTimezoneOffset = new Date().getTimezoneOffset();

bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatBox.mxml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
5858
<mate:Listener type="{ShortcutEvent.FOCUS_CHAT_INPUT}" method="focusChatInput" />
5959
<mate:Listener type="{UserLeftEvent.LEFT}" method="handleUserLeftEvent"/>
6060
<mate:Listener type="{ShortcutEvent.FOCUS_CHAT_BOX}" method="focusChatBox" />
61-
<mate:Listener type="{ShortcutEvent.CHANGE_FONT_COLOUR}" method="focusColourPicker" />
61+
<!--mate:Listener type="{ShortcutEvent.CHANGE_FONT_COLOUR}" method="focusColourPicker" /-->
6262
<mate:Listener type="{ShortcutEvent.SEND_MESSAGE}" method="remoteSendMessage" />
6363

6464
<mate:Listener type="{ShortcutEvent.CHAT_DEBUG}" method="chatDebugInfo" />
@@ -182,9 +182,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
182182
focusManager.setFocus(chatMessagesList);
183183
}
184184
185-
private function focusColourPicker(e:ShortcutEvent):void{
185+
/*private function focusColourPicker(e:ShortcutEvent):void{
186186
focusManager.setFocus(cmpColorPicker);
187-
}
187+
}*/
188188
189189
private function remoteSendMessage(e:ShortcutEvent):void{
190190
sendMessages();
@@ -522,9 +522,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
522522
cm.chatType = ChatConstants.PUBLIC_CHAT;
523523
cm.fromUserID = UsersUtil.getMyUserID();
524524
cm.fromUsername = UsersUtil.getMyUsername();
525-
cm.fromColor = cmpColorPicker.selectedColor.toString();
525+
cm.fromColor = "0" //default the message colour to black now cmpColorPicker.selectedColor.toString();
526526
cm.fromLang = ChatUtil.getUserLang();
527-
528527
// Get the current UTC time and the timezone for this sender.
529528
// The receiver will have to convert this to local time.
530529
var now:Date = new Date();
@@ -543,7 +542,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
543542
cm.chatType = ChatConstants.PRIVATE_CHAT;
544543
cm.fromUserID = UsersUtil.getMyUserID();
545544
cm.fromUsername = UsersUtil.getMyUsername();
546-
cm.fromColor = cmpColorPicker.selectedColor.toString();
545+
cm.fromColor = "0" //default the message colour to black now cmpColorPicker.selectedColor.toString();
547546
cm.fromLang = ChatUtil.getUserLang();
548547
549548
// Get the current UTC time and the timezone for this sender.
@@ -598,7 +597,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
598597

599598
<mx:HBox id="chatCtrlBar" width="100%" height="50" styleName="chatControlBarStyle" verticalScrollPolicy="off"
600599
paddingLeft="5" paddingRight="5">
601-
<mx:TextArea id="txtMsgArea" width="100%" color="{cmpColorPicker.selectedColor}"
600+
<mx:TextArea id="txtMsgArea" width="100%"
602601
styleName="chatControlBarTextMsgStyle"
603602
toolTip="{ResourceUtil.getInstance().getString('bbb.accessibility.chat.chatwindow.input')}"
604603
tabIndex="{baseIndex+1}"/>
@@ -609,10 +608,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
609608
click="sendMessages()"
610609
tabIndex="{baseIndex+2}"
611610
accessibilityName="{ResourceUtil.getInstance().getString('bbb.chat.sendBtn.name')}"/>
612-
<mx:ColorPicker id="cmpColorPicker" showTextField="false"
611+
<!--mx:ColorPicker id="cmpColorPicker" showTextField="false"
613612
toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmpColorPicker.toolTip')}"
614613
selectedColor="0x000000" dataProvider="{colorPickerColours}" swatchPanelStyleName="chatColorPickerStyle"
615-
tabIndex="{baseIndex+3}"/>
614+
tabIndex="{baseIndex+3}"/-->
616615
</mx:VBox>
617616
</mx:HBox>
618617
</mx:VBox>

bigbluebutton-client/src/org/bigbluebutton/modules/participants/business/ListenersSOService.as

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,28 @@ package org.bigbluebutton.modules.participants.business
255255
}
256256
}
257257

258+
public function lockMuteUser(userid:Number, lock:Boolean):void {
259+
var nc:NetConnection = _module.connection;
260+
nc.call(
261+
"voice.lockMuteUser",// Remote function name
262+
new Responder(
263+
// participants - On successful result
264+
function(result:Object):void {
265+
LogUtil.debug("Successfully lock mute/unmute: " + userid);
266+
},
267+
// status - On error occurred
268+
function(status:Object):void {
269+
LogUtil.error("Error occurred:");
270+
for (var x:Object in status) {
271+
LogUtil.error(x + " : " + status[x]);
272+
}
273+
}
274+
),//new Responder
275+
userid,
276+
lock
277+
); //_netConnection.call
278+
}
279+
258280
public function muteUnmuteUser(userid:Number, mute:Boolean):void {
259281
var nc:NetConnection = _module.connection;
260282
nc.call(

bigbluebutton-client/src/org/bigbluebutton/modules/participants/business/ParticipantsProxy.as

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package org.bigbluebutton.modules.participants.business
2222

2323
import mx.collections.ArrayCollection;
2424

25+
import org.bigbluebutton.common.Role;
2526
import org.bigbluebutton.core.UsersUtil;
2627
import org.bigbluebutton.core.managers.UserManager;
2728
import org.bigbluebutton.main.model.users.BBBUser;
@@ -88,6 +89,20 @@ package org.bigbluebutton.modules.participants.business
8889
public function unmuteAllUsers(command:VoiceConfEvent):void{
8990
_listenersService.muteAllUsers(false);
9091
}
92+
93+
public function muteAlmostAllUsers(command:VoiceConfEvent):void
94+
{
95+
//find the presenter and lock them
96+
var pres:BBBUser = UserManager.getInstance().getConference().getPresenter();
97+
if (pres)
98+
_listenersService.lockMuteUser(int(pres.voiceUserid), true);
99+
100+
_listenersService.muteAllUsers(true);
101+
102+
//unlock the presenter
103+
if (pres)
104+
_listenersService.lockMuteUser(int(pres.voiceUserid), false);
105+
}
91106

92107
public function kickUser(event:KickUserEvent):void {
93108
var user:BBBUser = UsersUtil.getUser(event.userid);

bigbluebutton-client/src/org/bigbluebutton/modules/participants/events/VoiceConfEvent.as

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ package org.bigbluebutton.modules.participants.events
2525
public static const MUTE_ALL:String = "VOICECONF_MUTE_ALL";
2626
public static const UNMUTE_ALL:String = "VOICECONF_UNMUTE_ALL";
2727

28+
public static const MUTE_ALMOST_ALL:String = "VOICECONF_MUTE_ALMOST_ALL";
29+
2830
public static const MUTE_USER:String = "VOICECONF_MUTE_USER";
2931
public static const UNMUTE_USER:String = "VOICECONF_UNMUTE_USER";
3032

bigbluebutton-client/src/org/bigbluebutton/modules/participants/maps/ParticipantsEventMap.mxml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
7070
<MethodInvoker generator="{ParticipantsProxy}" method="unmuteAllUsers" arguments="{event}" />
7171
</EventHandlers>
7272

73+
<EventHandlers type="{VoiceConfEvent.MUTE_ALMOST_ALL}" >
74+
<MethodInvoker generator="{ParticipantsProxy}" method="muteAlmostAllUsers" arguments="{event}" />
75+
</EventHandlers>
76+
7377
</EventMap>

bigbluebutton-client/src/org/bigbluebutton/modules/participants/views/MediaItemRenderer.mxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
}
105105
]]>
106106
</mx:Script>
107-
107+
<mx:Image id="showLock" visible="{data.voiceLocked}" source="{images.lock_close}" width="20" height="20" />
108108
<mx:Image id="talkingIcon" visible="{data.talking}" source="{images.sound_new}" width="20" height="20"
109109
toolTip="{ResourceUtil.getInstance().getString('bbb.participants.participantsGrid.mediaItemRenderer.talking')}" />
110110
<mx:Button id="webcamBtn" visible="{data.hasStream}" click="viewCamera()" icon="{images.webcam_new}"

0 commit comments

Comments
 (0)