fixed bug 1393 and properly formatted the MIC_SETTINGS_CLOSED event throughout the client

This commit is contained in:
Chad Pilkey 2013-03-04 18:43:45 -05:00
parent f58fa128dd
commit 034a7b4b61
5 changed files with 27 additions and 14 deletions

View File

@ -39,6 +39,8 @@ package org.bigbluebutton.main.events {
public static const USER_VOICE_TALKING:String = "user voice talking event";
public static const CAMERA_SETTING:String = "camera settings event";
public static const OPEN_WEBCAM_PREVIEW:String = "open webcam preview event";
public static const MIC_SETTINGS_CLOSED:String = "MIC_SETTINGS_CLOSED";
public static const CAM_SETTINGS_CLOSED:String = "CAM_SETTINGS_CLOSED";
public var message:String;
public var payload:Object = new Object();

View File

@ -224,6 +224,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function onCancelClicked():void {
disableCamera();
var event:BBBEvent = new BBBEvent(BBBEvent.CAM_SETTINGS_CLOSED);
event.payload['clicked'] = "cancel";
dispatchEvent(event);
PopUpManager.removePopUp(this);
}

View File

@ -129,7 +129,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function onCancelClicked():void {
cleanUp();
var event:BBBEvent = new BBBEvent("MIC_SETTINGS_CLOSED");
var event:BBBEvent = new BBBEvent(BBBEvent.MIC_SETTINGS_CLOSED);
event.payload['clicked'] = "cancel";
dispatchEvent(event);
PopUpManager.removePopUp(this);

View File

@ -28,7 +28,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
implements="org.bigbluebutton.common.IBbbToolbarComponent">
<mate:Listener type="{BBBEvent.JOIN_VOICE_CONFERENCE}" method="handleBBBJoinConferenceEvent"/>
<mate:Listener type="MIC_SETTINGS_CLOSED" method="handleMicSettingsClosedEvent"/>
<mate:Listener type="{BBBEvent.MIC_SETTINGS_CLOSED}" method="handleMicSettingsClosedEvent"/>
<mate:Listener type="{ShortcutEvent.SHARE_MICROPHONE}" method="remoteClick" />

View File

@ -25,21 +25,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
click="openPublishWindow()" creationComplete="init()"
mouseOver = "mouseOverHandler(event)"
mouseOut = "mouseOutHandler(event)"
toolTip="{ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start')}"
toolTip="{this.selected ? ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.stop') : ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start')}"
visible="{isPresenter}"
implements="org.bigbluebutton.common.IBbbToolbarComponent">
<mate:Listener type="{ShortcutEvent.SHARE_WEBCAM}" method="remoteClick" />
<mate:Listener type="{BBBEvent.CAM_SETTINGS_CLOSED}" method="handleCamSettingsClosedEvent"/>
<mate:Listener type="{ShareCameraRequestEvent.SHARE_CAMERA_REQUEST}" receive="enabled=false" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.main.views.MainToolbar;
import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent;
import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.views.MainToolbar;
import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
[Bindable] public var isPresenter:Boolean;
@ -74,14 +78,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
public function publishingStatus(status:Number):void {
if(status == START_PUBLISHING) {
_currentState = ON_STATE;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.stop');
//this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.stop');
camIcon = images.webcamOn;
this.enabled = true;
this.selected = true;
}
else {
_currentState = OFF_STATE;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start');
//this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start');
camIcon = images.webcam;
this.enabled = true;
this.selected = false;
@ -92,20 +96,26 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private function openPublishWindow():void{
if(_currentState == ON_STATE) {
_currentState = OFF_STATE;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start');
//this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start');
camIcon = images.webcam;
this.selected = false;
dispatchEvent(new ClosePublishWindowEvent());
}
else {
_currentState = ON_STATE;
this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.stop');
//this.toolTip = ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.stop');
camIcon = images.webcamOn;
this.selected = true;
dispatchEvent(new ShareCameraRequestEvent());
}
}
private function handleCamSettingsClosedEvent(e:BBBEvent):void {
this.enabled = true;
this.selected = false;
_currentState = OFF_STATE;
camIcon = images.webcam;
}
private function mouseOverHandler(event:MouseEvent):void {
if(_currentState == ON_STATE)
@ -130,7 +140,5 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
return "Webcam button";
}
]]>
</mx:Script>
<mate:Listener type="{ShareCameraRequestEvent.SHARE_CAMERA_REQUEST}" receive="enabled=false" />
</mx:Script>
</mx:Button>