Open other modules

git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@693 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Richard Alam 2008-11-07 15:31:51 +00:00
parent c212e99c93
commit a6e46a2b51
6 changed files with 28 additions and 109 deletions

View File

@ -1,7 +1,7 @@
<modules>
<!--module name="ChatModule" url="ChatModule.swf" uri="rtmp://localhost/chatServer" /-->
<!--module name="ViewersModule" url="ViewersModule.swf" uri="rtmp://localhost/conference" /-->
<module name="ChatModule" url="ChatModule.swf" uri="rtmp://localhost/chatServer" />
<module name="ViewersModule" url="ViewersModule.swf" uri="rtmp://localhost/conference" />
<module name="ListenersModule" url="ListenersModule.swf" uri="rtmp://localhost/astmeetme" />
<!--module name="PresentationModule" url="PresentationModule.swf"
uri="rtmp://localhost/presentation" host="http://localhost" /-->
<module name="PresentationModule" url="PresentationModule.swf"
uri="rtmp://localhost/presentation" host="http://localhost" />
</modules>

View File

@ -36,8 +36,8 @@ package org.bigbluebutton.main
break;
case MainApplicationConstants.APP_MODEL_INITIALIZED:
trace(NAME + "::Received APP_MODEL_INITIALIZED");
//proxy.loadModule("ViewersModule");
proxy.loadModule("ListenersModule");
proxy.loadModule("ViewersModule");
//proxy.loadModule("ListenersModule");
break;
case MainApplicationConstants.MODULE_LOADED:
trace(NAME + "::Received MODULE_LOADED");
@ -58,6 +58,7 @@ package org.bigbluebutton.main
trace(NAME + '::Received USER_LOGGED_IN');
proxy.loadModule("ChatModule");
proxy.loadModule("PresentationModule");
//proxy.loadModule("ListenersModule");
break;
}
}

View File

@ -19,6 +19,7 @@
*/
package org.bigbluebutton.modules.listeners.model.vo
{
[Bindable]
public class Listener
{
public var room:String;

View File

@ -87,7 +87,7 @@ package org.bigbluebutton.modules.listeners.view
_listenersWindow.listeners = proxy.listeners;
_listenersWindow.width = 210;
_listenersWindow.height = 220;
_listenersWindow.title = "Viewers";
_listenersWindow.title = "Listeners";
_listenersWindow.showCloseButton = false;
_listenersWindow.xPosition = 30;
_listenersWindow.yPosition = 30;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" creationComplete="initParticipantItem()">
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" creationComplete="init()">
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.listeners.ListenersModuleConstants;
@ -18,67 +18,36 @@
private var images:Images = new Images();
[Bindable] private var muteIcon : Object = images.sound_mute;
[Bindable] private var muteIcon:Class = images.sound_mute;
[Bindable] private var talkIcon : Object = images.sound;
[Bindable] private var ejectIcon : Object = images.eject_user;
[Bindable] private var statusTooltip : String = "";
[Bindable] private var ejectTooltip : String = "Click to eject user.";
[Bindable] public var isModerator : Boolean = true;
private function initParticipantItem() : void
private function init() : void
{
displayStatusIcon();
//VoiceFacade.getInstance().registerMediator(new MeetMeUserItemMediator(this));
//trace(this.parent.toString());
//trace(this.parentApplication.toString());
//trace(this.parentDocument.userid);
//trace(this.document.toString());
displayStatusIcon();
}
public function displayStatusIcon() : void
{
/* if (data.isMuted) {
if (data.muted) {
muteIcon = images.sound_mute;
muteImg.toolTip = "Double click to unmute user.";
muteBtn.toolTip = "Click to unmute user.";
} else {
muteIcon = images.sound_none;
muteImg.toolTip = "Double click to mute user.";
muteBtn.toolTip = "Click to mute user.";
}
if (data.isTalking) {
if (data.talking) {
talkIcon = images.sound;
talkImg.toolTip = "Talking";
talkImg.visible = true;
} else {
talkImg.visible = false;
}
if (model.meetMeRoom.userRole == Role.MODERATOR) {
isModerator = true;
} else {
isModerator = false;
statusTooltip = "";
ejectTooltip = "";
}
*/ }
public function dragIt(event:MouseEvent, userid:Number):void
{
if (userRole != Role.MODERATOR) return;
var dragInitiator:Label = event.currentTarget as Label;
var dragSource:DragSource = new DragSource();
dragSource.addData(data.userid , 'userid');
var dragProxy:Image = new Image();
dragProxy.source = images.eject_user;
dragProxy.alpha = 1;
DragManager.doDrag(dragInitiator, dragSource , event, dragProxy, 0, 0, 1, true);
}
}
public function muteUser():void
{
//this.parentDocument.userid = this.data.userid;
@ -89,8 +58,7 @@
]]>
</mx:Script>
<mx:Image id="muteImg" source="{muteIcon}" doubleClick="muteUser()"/>
<mx:Label id="nameLabel" mouseDown="dragIt(event,data.userid)" useHandCursor="true"
toolTip="Drag to eject." text="{data.callerName}"/>
<mx:Image id="talkImg" source="{talkIcon}" visible="{data.isTalking}" toolTip="Talking"/>
<mx:Button id="muteBtn" icon="{muteIcon}" click="muteUser()" width="18" height="16"/>
<mx:Label id="nameLabel" text="{data.callerName}"/>
<mx:Image id="talkImg" source="{talkIcon}" visible="{data.talking}" toolTip="Talking"/>
</mx:HBox>

View File

@ -8,75 +8,27 @@
<![CDATA[
import org.bigbluebutton.modules.listeners.ListenersModuleConstants;
import mx.core.Application;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.modules.listeners.view.components.Images;
import mx.events.DragEvent;
import flash.events.MouseEvent;
import mx.core.DragSource;
import mx.managers.DragManager;
import mx.controls.Label;
import mx.collections.ArrayCollection;
import mx.controls.Image;
public static const TITLE:String = "Listeners";
private var images:Images = new Images();
private var _xPosition:int;
private var _yPosition:int;
[Bindable] public var dropTargetIcon : Object = images.door_in;
[Bindable] private var muteAllIcon : Class = images.sound_mute;
[Bindable] private var unmuteAllIcon : Class = images.sound_none;
[Bindable] private var role:String;
[Bindable]
public var listeners:ArrayCollection = new ArrayCollection();
public var userid:Number;
public var isMuted:Boolean;
//Full screen?
private var dispState:String;
private function init():void{
// var conf:Conference = ViewersFacade.getInstance().retrieveMediator(Conference.NAME) as Conference;
// role = conf.me.role;
//Initialize full screen handler
Application.application.stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenHandler);
dispState = Application.application.stage.displayState;
}
private function fullScreenHandler(evt:FullScreenEvent):void {
dispState = Application.application.stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
//Notify user that the keyboard is not working
this.maximizeRestoreBtn.visible = false;
if (this.maximized){
this.restore();
}
} else{
this.maximizeRestoreBtn.visible = true;
}
}
public function dragEnterHandler(event:DragEvent):void
{
var dropTarget : Image = event.currentTarget as Image;
if (event.dragSource.hasFormat('userid'))
DragManager.acceptDragDrop(dropTarget);
}
public function dragDropHandler(event:DragEvent):void
{
dropTargetIcon = images.door_open;
userid = Number(event.dragSource.dataForFormat('userid'));
dispatchEvent(new Event(ListenersModuleConstants.EJECT_USER));
}
}
public function get xPosition():int {
return _xPosition;
}
@ -105,14 +57,11 @@
<mx:ControlBar width="100%">
<mx:Button id="muteAllIconImg" icon="{muteAllIcon}"
toolTip="Mute All" click="dispatchEvent(new Event(ListenersModuleConstants.MUTE_ALL))"
visible="{role == Role.MODERATOR}"/>
visible="true" width="18" height="18"/>
<mx:Button id="unmuteAllIconImg" icon="{unmuteAllIcon}"
toolTip="Unmute All" click="dispatchEvent(new Event(ListenersModuleConstants.UNMUTE_ALL))"
visible="{role == Role.MODERATOR}"/>
<mx:Spacer width="100%"/>
<mx:Image id="ejectUserDropTarget" source="{dropTargetIcon}"
toolTip="Drop user here to eject." visible="{role == Role.MODERATOR}"
dragEnter="dragEnterHandler(event)" dragDrop="dragDropHandler(event)"/>
visible="true" width="18" height="18"/>
<mx:Spacer width="100%"/>
</mx:ControlBar>
</MDIWindow>