diff --git a/bigbluebutton-client/resources/config.xml.template b/bigbluebutton-client/resources/config.xml.template index 53a65b6972657c9190790c004ef35f17bd85a1f9..8b7c4d4cb35ad33a2574239ebd9bbaa6d0a76f98 100755 --- a/bigbluebutton-client/resources/config.xml.template +++ b/bigbluebutton-client/resources/config.xml.template @@ -87,7 +87,8 @@ enableH264 = "true" h264Level = "2.1" h264Profile = "main" - displayAvatar = "false" + displayAvatar = "false" + focusTalking = "false" /> <module name="WhiteboardModule" url="http://HOST/client/WhiteboardModule.swf?v=4105" 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 bfd7c30705e794f9485d731a97f22d69d85d8da2..e602508e4a939520c07710e03cf2da978d7d5bcf 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml @@ -141,7 +141,6 @@ ]]> </mx:Script> - <mx:Image id="showLock" visible="{data.voiceLocked}" source="{images.lock_close}" width="20" height="20" /> <mx:Image id="talkingIcon" visible="{data.talking}" source="{images.sound_new}" width="20" height="20" toolTip="{ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.talking')}" /> <mx:Button id="webcamBtn" visible="{data.hasStream}" click="viewCamera()" icon="{images.webcam_new}" @@ -157,6 +156,7 @@ width="20" height="20" visible="{rolledOver}" toolTip="{ResourceUtil.getInstance().getString('bbb.users.usersGrid.mediaItemRenderer.kickUser')}" click="kickUser()"/> + <mx:Image id="showLock" visible="{data.voiceLocked}" source="{images.lock_close}" width="20" height="20" /> <!-- Helper objects because direct bindings to data break when the itemRenderer is recycled --> <mx:Image id="muteInd" includeInLayout="false" visible="{data.voiceMuted}" /> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoWindowItf.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoWindowItf.as index 6dc0969e8551c23c4545cb0b613c8ec95bbc002b..0942bcdb616c8994a290afeea813edbbff5ba287 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoWindowItf.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoWindowItf.as @@ -45,6 +45,8 @@ package org.bigbluebutton.modules.videoconf.business import org.bigbluebutton.main.model.users.events.KickUserEvent; import org.bigbluebutton.main.model.users.events.RoleChangeEvent; import org.bigbluebutton.main.views.MainCanvas; + import org.bigbluebutton.modules.videoconf.events.UserTalkingEvent; + import org.bigbluebutton.modules.videoconf.model.VideoConfOptions; import org.bigbluebutton.modules.videoconf.views.ControlButtons; import org.bigbluebutton.util.i18n.ResourceUtil; @@ -76,6 +78,8 @@ package org.bigbluebutton.modules.videoconf.business [Bindable] public var resolutions:Array; + protected var videoConfOptions:VideoConfOptions = new VideoConfOptions(); + public function getWindowType():String { return windowType; } @@ -324,5 +328,12 @@ package org.bigbluebutton.modules.videoconf.business protected function userMuted(muted:Boolean):void { _controlButtons.userMuted(muted); } + + protected function simulateClick():void { + if (videoConfOptions.focusTalking) { + var talkingEvent:UserTalkingEvent = new UserTalkingEvent(UserTalkingEvent.TALKING); + dispatchEvent(talkingEvent); + } + } } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/events/UserTalkingEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/events/UserTalkingEvent.as new file mode 100755 index 0000000000000000000000000000000000000000..0080f521fac7411b351b2561a5c29bc6817fbbfb --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/events/UserTalkingEvent.as @@ -0,0 +1,32 @@ +/* + * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ + * + * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. + * + */ +package org.bigbluebutton.modules.videoconf.events +{ + import flash.events.Event; + + public class UserTalkingEvent extends Event + { + public static const TALKING:String = "USER TALKING PRIORITIZE"; + + public function UserTalkingEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) + { + super(type, bubbles, cancelable); + } + } +} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as index 81b4f97116d902ca95330ee2e8f172cf93d220ad..8aa9401e996253fdcb921fb22ddeb27a5130fe9a 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/model/VideoConfOptions.as @@ -95,6 +95,9 @@ package org.bigbluebutton.modules.videoconf.model [Bindable] public var displayAvatar:Boolean = false; + [Bindable] + public var focusTalking:Boolean = false; + public function VideoConfOptions() { parseOptions(); } @@ -188,6 +191,10 @@ package org.bigbluebutton.modules.videoconf.model if (vxml.@displayAvatar != undefined) { displayAvatar = (vxml.@displayAvatar.toString().toUpperCase() == "TRUE") ? true : false; + } + + if (vxml.@focusTalking != undefined) { + focusTalking = (vxml.@focusTalking.toString().toUpperCase() == "TRUE") ? true : false; } } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/AvatarWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/AvatarWindow.mxml index 8733af11a8b56e1068bf0f68260bc77b30516311..92a1aa9fdfce2de84baee410e349fdda14c79a70 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/AvatarWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/AvatarWindow.mxml @@ -144,7 +144,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. if (event.message.userID == userID) { if (event.message.talking) { notTalkingEffect.end(); - talkingEffect.play([this]); + talkingEffect.play([this]); + simulateClick(); } else { talkingEffect.end(); notTalkingEffect.play([this]); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml index 7decb469920751b5e11101309cf3d64b778156ad..37c2ef37773a3117afffeca8905e54ed35080fd2 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml @@ -171,7 +171,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. if (event.message.userID == userID) { if (event.message.talking) { notTalkingEffect.end(); - talkingEffect.play([this]); + talkingEffect.play([this]); + simulateClick(); } else { talkingEffect.end(); notTalkingEffect.play([this]); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/VideoWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/VideoWindow.mxml index 1bab5263592e65482f8c5c7b7410e575244e7df8..cd7e6c15216e60ee0715b6c1e7942f1218b77219 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/VideoWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/VideoWindow.mxml @@ -136,7 +136,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. if (event.message.userID == userID) { if (event.message.talking) { notTalkingEffect.end(); - talkingEffect.play([this]); + talkingEffect.play([this]); + simulateClick(); } else { talkingEffect.end(); notTalkingEffect.play([this]); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videodock/views/VideoDock.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videodock/views/VideoDock.mxml index 410dc2424bbd3951327a1a4384d7f5be4aea8898..38344992778be21030f05b513263d835b6d0ed01 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videodock/views/VideoDock.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videodock/views/VideoDock.mxml @@ -55,6 +55,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. import org.bigbluebutton.main.views.MainCanvas; import org.bigbluebutton.modules.videoconf.business.VideoWindowItf; import org.bigbluebutton.modules.videoconf.events.OpenVideoWindowEvent; + import org.bigbluebutton.modules.videoconf.events.UserTalkingEvent; + import org.bigbluebutton.modules.videoconf.model.VideoConfOptions; import org.bigbluebutton.util.i18n.ResourceUtil; import org.bigbluebutton.common.events.LocaleChangeEvent; @@ -71,6 +73,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private var priorityWindowWeight:Number = 2/3; private var options:DockOptions = new DockOptions(); + private var confOptions:VideoConfOptions = new VideoConfOptions(); private var dispatcher:Dispatcher; private var keyCombos:Object; @@ -264,7 +267,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. window.draggable = false; window.addEventListener(MouseEvent.CLICK, onWindowClick); - + window.addEventListener(UserTalkingEvent.TALKING, onTalking); + var e:CloseWindowEvent = new CloseWindowEvent(); e.window = window; dispatchEvent(e); @@ -422,6 +426,28 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. updateChildrenDimensions(mutableChildrenArray); } + protected function onTalking(event:UserTalkingEvent):void { + prioritizeTalking(event.currentTarget); + } + + private function prioritizeTalking(window:Object):void { + if (mutableChildrenArray.length <= 1 + || options.layout == DockOptions.LAYOUT_NONE) + return; + + if (window == priorityWindow) //window already prioritized + return; + + var index:int = mutableChildrenArray.indexOf(window); + if (index != -1) { + mutableChildrenArray[index] = mutableChildrenArray[0]; + mutableChildrenArray[0] = window; + _prioritizeWindow = true; + } + + updateChildrenDimensions(mutableChildrenArray); + } + private function prioritizeAnyWindow():void { if (mutableChildrenArray.length > 0) prioritizeWindow(mutableChildrenArray[0]);