diff --git a/bigbluebutton-client/src/BigBlueButton.mxml b/bigbluebutton-client/src/BigBlueButton.mxml index f71c2dc3782158a461d31a911e9b62385e0045d8..484b41d1b49013e4fdef887a35a34284ba00ec75 100644 --- a/bigbluebutton-client/src/BigBlueButton.mxml +++ b/bigbluebutton-client/src/BigBlueButton.mxml @@ -30,22 +30,18 @@ <mx:Script> <![CDATA[ - import mx.managers.HistoryManager; - import mx.managers.IDragManager; - - import org.bigbluebutton.main.events.ConfigEvent; - import org.bigbluebutton.main.view.components.MainApplicationShell; - import org.bigbluebutton.util.i18n.ResourceUtil; - + import org.bigbluebutton.util.i18n.ResourceUtil; + import org.bigbluebutton.main.view.components.MainApplicationShell; + + import org.bigbluebutton.main.events.ConfigEvent; + /** - * workaround for this. (ralam - Nov 8, 2008) + * Thse two lines are workaround for this. (ralam - Nov 8, 2008) * http://gregjessup.com/flex-3-advanceddatagrid-cannot-convert-mxmanagersdragmanagerimpl-to-mxmanagersidragmanager/ * http://butterfliesandbugs.wordpress.com/2007/10/25/workaround-for-error-when-loading-popups-from-modules/ */ - private var iDragManager:IDragManager; - - /** another workaround - for this issue: https://bugs.adobe.com/jira/browse/SDK-13121*/ - private var hist:HistoryManager + import mx.managers.IDragManager; + private var iDragManager:IDragManager; private function handleConfigLoadedEvent(e:Event):void { trace('Got CONFIG_LOADED_EVENT'); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishOptionsTab.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishOptionsTab.mxml deleted file mode 100644 index 34e15d56b975d123b0dba0bb5b745afa1c750ec5..0000000000000000000000000000000000000000 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishOptionsTab.mxml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" label="Options"> - - <mx:Script> - <![CDATA[ - import org.bigbluebutton.common.Images; - - public static const START_PUBLISH:String = "Start Publish"; - public static const RESOLUTION_320x240:String = "320x240"; - public static const RESOLUTION_640x480:String = "640x480"; - public static const CODEC_H264:String = "H264"; - public static const CODEC_FLV1:String = "FLV1"; - public static const QUALITY_LOW:String = "Low"; - public static const QUALITY_MEDIUM:String = "Medium"; - public static const QUALITY_HIGH:String = "High"; - public static const QUALITY_VERY_HIGH:String = "Very High"; - - [Bindable] private var resolutions:Array = new Array(RESOLUTION_320x240, RESOLUTION_640x480); - [Bindable] private var codecs:Array = new Array(CODEC_H264, CODEC_FLV1); - [Bindable] private var qualities:Array = new Array(QUALITY_LOW, QUALITY_MEDIUM, QUALITY_HIGH, QUALITY_VERY_HIGH); - - private var images:Images = new Images(); - [Bindable] public var camIcon:Class = images.control_play; - [Bindable] public var selectedCamera:int = 0; - [Bindable] public var selectedResolution:String = RESOLUTION_320x240; - [Bindable] public var selectedCodec:String = CODEC_H264; - [Bindable] public var selectedQuality:String = QUALITY_LOW; - - private function startPublishing():void{ - showControls(false); - - dispatchEvent(new Event(START_PUBLISH)) - } - - public function showControls(show:Boolean):void{ - this.enabled = show; - } - - public function showVideoControls(show:Boolean):void{ - //cameraAvailable = show; - } - - private function changeCamera():void{ - selectedCamera = cmbCameraSelector.selectedIndex; - } - - private function changeResolution():void{ - selectedResolution = cmbResolution.selectedLabel; - } - - private function changeCodec():void{ - selectedCodec = cmbCodec.selectedLabel; - } - - private function changeQuality():void{ - selectedQuality = cmbQuality.selectedLabel; - } - ]]> - </mx:Script> - - <mx:HBox id="cameraBox" width="100%"> - <mx:Spacer width="20" /> - <mx:Label text="Camera : " width="100" /> - <mx:ComboBox id="cmbCameraSelector" dataProvider="{Camera.names}" width="150" close="changeCamera()" /> - </mx:HBox> - <mx:HBox id="resolutionBox" width="100%" > - <mx:Spacer width="20" /> - <mx:Label text="Resolution : " width="100" /> - <mx:ComboBox id="cmbResolution" dataProvider="{resolutions}" width="150" close="changeResolution()" /> - </mx:HBox> - <mx:HBox> - <mx:Spacer width="20" /> - <mx:Label text="Codec : " width="100" /> - <mx:ComboBox id="cmbCodec" dataProvider="{codecs}" width="150" close="changeCodec()" /> - </mx:HBox> - <mx:HBox> - <mx:Spacer width="20" /> - <mx:Label text="Quality : " width="100" /> - <mx:ComboBox id="cmbQuality" dataProvider="{qualities}" width="150" close="changeQuality()" /> - </mx:HBox> - <mx:Spacer height="40" /> - <mx:HBox> - <mx:Spacer width="90" /> - <mx:Button id="btnStartPublish" label="Start Streaming" toolTip="Start Streaming" click="startPublishing()" /> - </mx:HBox> - -</mx:VBox> 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 eb8ef549dcbe3141fdee44b59443e067f4aabfc3..c06093550be64b42d9d51e8c342de46b9cfbc525 100644 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishWindow.mxml @@ -24,23 +24,22 @@ xmlns:mx="http://www.adobe.com/2006/mxml" implements="org.bigbluebutton.common.IBbbModuleWindow" creationComplete="init()" - width="{camWidth + 6}" height="{camHeight + 63}" - title="Stream webcam" + width="{camWidth + 6}" height="{camHeight + 73}" + title="Stream webcam" + backgroundImage="{bbbLogo}" resizable="false" - xmlns:mate="http://mate.asfusion.com/" xmlns:views="org.bigbluebutton.modules.videoconf.views.*" xmlns:containers="flexlib.containers.*"> + xmlns:mate="http://mate.asfusion.com/"> <mx:Script> <![CDATA[ import flexlib.mdi.events.MDIWindowEvent; - - import mx.controls.Alert; - import mx.core.UIComponent; import mx.events.ResizeEvent; - - import org.bigbluebutton.common.Images; import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent; - import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent; + import org.bigbluebutton.common.Images; import org.bigbluebutton.modules.videoconf.events.StopBroadcastEvent; + import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent; + import mx.core.UIComponent; + import mx.controls.Alert; private var _xPosition:int = 200; private var _yPosition:int = 200; @@ -48,6 +47,7 @@ private var images:Images = new Images(); [Bindable] public var camIcon:Class = images.control_play; [Bindable] public var bbbLogo:Class = images.bbb_logo; + [Bindable] private var resolutions:Array = new Array("320x240", "640x480"); private var video:Video; public var streamName:String; @@ -57,27 +57,10 @@ private function init():void{ checkIfMacCamera(); - if (isPresenter() || (Camera.names.length > 1)) { - optionsTab.showControls(true); - drawTip(); - } - + if (isPresenter()) showResControls(true); + if (Camera.names.length > 1) showVideoControls(true); if (!isPresenter() && Camera.names.length == 1) startPublishing(); maximizeRestoreBtn.visible = false; - - optionsTab.addEventListener(PublishOptionsTab.START_PUBLISH, startPublishing); - } - - private function drawTip():void{ - var t:TextField = new TextField(); - t.text = "Click to start sharing"; - t.selectable = false; - var textFormat:TextFormat = new TextFormat("Verdana", 18, 0x000000, true); - t.setTextFormat(textFormat); - videoHolder.rawChildren.addChild(t); - t.x = 50; - t.width = videoHolder.width; - t.y = videoHolder.height - 50; } public function get xPosition():int { @@ -117,8 +100,8 @@ public function resetWidthAndHeight():void{} - private function startPublishing(event:Event = null):void{ - var camera:Camera = Camera.getCamera(optionsTab.selectedCamera.toString()); + private function startPublishing():void{ + var camera:Camera = Camera.getCamera(cmbCameraSelector.selectedIndex.toString()); if (camera == null) return; setResolution(); @@ -132,7 +115,7 @@ video.width = camWidth; video.height = camHeight; video.attachCamera(camera); - videoHolder.rawChildren.addChild(video); + videoHolder.addChild(video); // addChild(videoHolder); var e:StartBroadcastEvent = new StartBroadcastEvent(); @@ -140,8 +123,8 @@ e.camera = camera; dispatchEvent(e); - optionsTab.showVideoControls(false); - optionsTab.showControls(false); + showVideoControls(false); + showResControls(false); } override public function close(event:MouseEvent=null):void{ @@ -161,14 +144,14 @@ } private function setResolution():void{ - if (optionsTab.selectedResolution == PublishOptionsTab.RESOLUTION_320x240){ + if (cmbResolution.selectedLabel == "320x240"){ camHeight = 240; camWidth = 320; - } else if (optionsTab.selectedResolution == PublishOptionsTab.RESOLUTION_640x480){ + } else if (cmbResolution.selectedLabel == "640x480"){ camHeight = 480; camWidth = 640; } - this.streamName = optionsTab.selectedResolution.concat(this.streamName); + this.streamName = cmbResolution.selectedLabel.concat(this.streamName); } public function set userrole(role:String):void{ @@ -180,6 +163,23 @@ else return false; } + private function showVideoControls(show:Boolean):void{ + if (show){ + bottomBar.visible = true; + btnStartPublish.visible = true; + cmbCameraSelector.visible = true; + } else{ + bottomBar.visible = false; + btnStartPublish.visible = false; + cmbCameraSelector.visible = false; + } + } + + private function showResControls(show:Boolean):void{ + if (show) cmbResolution.visible = true; + else cmbResolution.visible = false; + } + private function closeWindow(e:CloseAllWindowsEvent):void{ this.close(); } @@ -187,22 +187,20 @@ private function checkIfMacCamera():void{ for (var i:int = 0; i<Camera.names.length; i++){ if (Camera.names[i] == "USB Video Class Video") { - optionsTab.cmbCameraSelector.selectedIndex = i; + cmbCameraSelector.selectedIndex = i; } } } - private function rolloverVideoHolder():void{ - //Do something fancy here to show the image is clickable, similar to when you rollover a button - } - ]]> </mx:Script> - <mx:TabNavigator id="tabNav" width="100%" height="100%" > - <mx:Canvas id="videoHolder" width="{camWidth}" height="{camHeight}" label="Stream" backgroundImage="{bbbLogo}" click="startPublishing()" rollOver="rolloverVideoHolder()" /> - <views:PublishOptionsTab id="optionsTab" width="100%" height="100%" visible="false" /> - </mx:TabNavigator> + <mx:UIComponent id="videoHolder" width="{camWidth}" height="{camHeight}" /> + <mx:ControlBar id="bottomBar"> + <mx:Button id="btnStartPublish" toolTip="start streaming" icon="{camIcon}" click="startPublishing()" /> + <mx:ComboBox id="cmbCameraSelector" dataProvider="{Camera.names}" width="150" visible="false" /> + <mx:ComboBox id="cmbResolution" dataProvider="{resolutions}" width="20%" visible="false" /> + </mx:ControlBar> <mate:Listener type="{CloseAllWindowsEvent.CLOSE_ALL_WINDOWS}" method="closeWindow" /> </MDIWindow>