From 3075040ca0e692209b12b81eaf4471ce3137858d Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Fri, 4 Jun 2010 13:33:36 -0400 Subject: [PATCH] Revert "- UI changes to Video Publish Window, for Tiago" This reverts commit eb89ca9429e4d69ef6aa8aca84506709753d7de1. --- bigbluebutton-client/src/BigBlueButton.mxml | 20 ++--- .../videoconf/views/PublishOptionsTab.mxml | 87 ------------------ .../videoconf/views/PublishWindow.mxml | 88 +++++++++---------- 3 files changed, 51 insertions(+), 144 deletions(-) delete mode 100644 bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/PublishOptionsTab.mxml diff --git a/bigbluebutton-client/src/BigBlueButton.mxml b/bigbluebutton-client/src/BigBlueButton.mxml index f71c2dc378..484b41d1b4 100644 --- a/bigbluebutton-client/src/BigBlueButton.mxml +++ b/bigbluebutton-client/src/BigBlueButton.mxml @@ -30,22 +30,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 eb8ef549dc..c06093550b 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/"> 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 - - - - + + + + + +