Send View Camera to Video Module
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@740 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
parent
305798dc36
commit
cb91b0e193
@ -46,5 +46,6 @@ package org.bigbluebutton.common.messaging
|
||||
|
||||
public static const STARTED_BROADCAST:String = 'STARTED_BROADCAST';
|
||||
public static const STOPPED_BROADCAST:String = 'STOPPED_BROADCAST';
|
||||
public static const VIEW_CAMERA:String = 'VIEW_CAMERA';
|
||||
}
|
||||
}
|
@ -45,6 +45,8 @@ package org.bigbluebutton.modules.video
|
||||
|
||||
public static const STARTED_BROADCAST:String = 'STARTED_BROADCAST';
|
||||
public static const STOPPED_BROADCAST:String = 'STOPPED_BROADCAST';
|
||||
public static const VIEW_CAMERA:String = 'VIEW_CAMERA';
|
||||
|
||||
|
||||
public static const OPEN_WINDOW:String = 'OPEN_WINDOW';
|
||||
public static const CLOSE_WINDOW:String = 'CLOSE_WINDOW';
|
||||
|
@ -100,6 +100,10 @@ package org.bigbluebutton.modules.video
|
||||
//trace('Received OPEN_WINDOW message from ' + message.getHeader().SRC);
|
||||
//facade.sendNotification(ChatModuleConstants.OPEN_WINDOW);
|
||||
break;
|
||||
case EndpointMessageConstants.VIEW_CAMERA:
|
||||
trace('Received VIEW_CAMERA message from ' + message.getHeader().SRC);
|
||||
//facade.sendNotification(ChatModuleConstants.OPEN_WINDOW);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,8 @@ package org.bigbluebutton.modules.viewers
|
||||
ViewersModuleConstants.ADD_WINDOW,
|
||||
ViewersModuleConstants.REMOVE_WINDOW,
|
||||
ViewersModuleConstants.ASSIGN_PRESENTER,
|
||||
ViewersModuleConstants.BECOME_VIEWER
|
||||
ViewersModuleConstants.BECOME_VIEWER,
|
||||
ViewersModuleConstants.VIEW_CAMERA
|
||||
];
|
||||
}
|
||||
|
||||
@ -96,6 +97,12 @@ package org.bigbluebutton.modules.viewers
|
||||
_endpoint.sendMessage(EndpointMessageConstants.BECOME_VIEWER,
|
||||
EndpointMessageConstants.TO_MAIN_APP, notification.getBody());
|
||||
break;
|
||||
case ViewersModuleConstants.VIEW_CAMERA:
|
||||
trace('Sending VIEW_CAMERA to VIDEO MODULE');
|
||||
_endpoint.sendMessage(EndpointMessageConstants.VIEW_CAMERA,
|
||||
EndpointMessageConstants.TO_VIDEO_MODULE,
|
||||
{userid:_module.userid, streamName:notification.getBody()});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ package org.bigbluebutton.modules.viewers
|
||||
|
||||
public static const MODULE_STARTED:String = 'MODULE_STARTED';
|
||||
|
||||
public static const OPEN_VIEW_CAMERA:String = "Open View Camera";
|
||||
public static const VIEW_CAMERA:String = 'VIEW_CAMERA';
|
||||
|
||||
public static const ASSIGN_PRESENTER:String = "ASSIGN_PRESENTER";
|
||||
public static const BECOME_VIEWER:String = "BECOME_VIEWER";
|
||||
|
@ -27,6 +27,7 @@ package org.bigbluebutton.modules.viewers.view
|
||||
import org.bigbluebutton.modules.viewers.model.ViewersProxy;
|
||||
import org.bigbluebutton.modules.viewers.view.components.ViewersWindow;
|
||||
import org.bigbluebutton.modules.viewers.view.events.AssignPresenterEvent;
|
||||
import org.bigbluebutton.modules.viewers.view.events.ViewCameraEvent;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
@ -57,11 +58,12 @@ package org.bigbluebutton.modules.viewers.view
|
||||
_viewersWindow.addEventListener(CHANGE_STATUS, changeStatus);
|
||||
_viewersWindow.addEventListener(ASSIGN_PRESENTER_EVENT, onAssignPresenter);
|
||||
_viewersWindow.addEventListener(ViewersModuleConstants.VIEWER_SELECTED_EVENT, onViewerSelectedEvent);
|
||||
_viewersWindow.addEventListener(ViewersModuleConstants.QUERY_PRESENTER_EVENT, onQueryPresenterEvent);
|
||||
_viewersWindow.addEventListener(ViewCameraEvent.VIEW_CAMERA_EVENT, onViewCameraEvent);
|
||||
}
|
||||
|
||||
private function onQueryPresenterEvent(e:Event):void {
|
||||
proxy.queryPresenter();
|
||||
private function onViewCameraEvent(e:ViewCameraEvent):void {
|
||||
trace('Got VIEW_CAMERA_EVENT------------------------------');
|
||||
sendNotification(ViewersModuleConstants.VIEW_CAMERA, e.stream);
|
||||
}
|
||||
|
||||
private function onViewerSelectedEvent(e:Event):void {
|
||||
|
@ -4,16 +4,18 @@
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.modules.viewers.view.events.ViewCameraEvent;
|
||||
import org.bigbluebutton.modules.viewers.model.vo.Status;
|
||||
import mx.collections.ArrayCollection;
|
||||
import org.bigbluebutton.modules.viewers.view.events.ChangeStatusEvent;
|
||||
import org.bigbluebutton.modules.viewers.ViewersModuleConstants;
|
||||
import org.bigbluebutton.modules.viewers.view.components.Images;
|
||||
|
||||
private var images:Images = new Images();
|
||||
private var images:Images = new Images();
|
||||
|
||||
private function viewCamera() : void
|
||||
{
|
||||
|
||||
dispatchEvent(new ViewCameraEvent(data.streamName));
|
||||
}
|
||||
|
||||
[Bindable] private var webcamIcon : Object = images.webcam;
|
||||
@ -42,7 +44,7 @@
|
||||
|
||||
if (data.hasStream) {
|
||||
streamIcon.source = webcamIcon;
|
||||
streamIcon.toolTip = "Stream " + data.streamName;
|
||||
streamIcon.toolTip = "Double-Click to view";
|
||||
streamIcon.visible = true;
|
||||
} else {
|
||||
streamIcon.visible = false;
|
||||
|
@ -0,0 +1,18 @@
|
||||
package org.bigbluebutton.modules.viewers.view.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class ViewCameraEvent extends Event
|
||||
{
|
||||
public static const VIEW_CAMERA_EVENT:String = "VIEW_CAMERA_EVENT";
|
||||
|
||||
public var stream:String;
|
||||
|
||||
public function ViewCameraEvent(stream:String)
|
||||
{
|
||||
super(VIEW_CAMERA_EVENT,true);
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user