Revert back video module to old version as I can't get it to work.
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@548 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
parent
1093821c41
commit
fdc92d4183
@ -97,7 +97,7 @@ package org.bigbluebutton.main.view
|
||||
|
||||
logModule = new LogModule();
|
||||
runModule(logModule);
|
||||
logModule.mediator.logWindow.visible = false;
|
||||
// logModule.mediator.logWindow.visible = false;
|
||||
|
||||
log.debug("red5:" + Constants.red5Host);
|
||||
log.debug("present:" + Constants.presentationHost);
|
||||
@ -119,10 +119,10 @@ package org.bigbluebutton.main.view
|
||||
public function showLogWindow(event:Event) : void
|
||||
{
|
||||
//logModule.openLogWindow();
|
||||
if (logModule.mediator.logWindow.visible == true)
|
||||
logModule.mediator.logWindow.visible = false;
|
||||
else
|
||||
logModule.mediator.logWindow.visible = true;
|
||||
// if (logModule.mediator.logWindow.visible == true)
|
||||
// logModule.mediator.logWindow.visible = false;
|
||||
// else
|
||||
// logModule.mediator.logWindow.visible = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -204,10 +204,9 @@ package org.bigbluebutton.main.view
|
||||
* @param module
|
||||
*
|
||||
*/
|
||||
private function addButton(module:BigBlueButtonModule):Button{
|
||||
private function addButton(module:BigBlueButtonModule):void{
|
||||
var button:Button = mshell.toolbar.addButton(module.name);
|
||||
//button.addEventListener(MouseEvent.CLICK, openModule);
|
||||
return button;
|
||||
button.addEventListener(MouseEvent.CLICK, openModule);
|
||||
}
|
||||
|
||||
private function openModule(e:MouseEvent):void{
|
||||
@ -279,12 +278,7 @@ package org.bigbluebutton.main.view
|
||||
case MainApplicationFacade.ADD_MODULE:
|
||||
var moduleNote:BigBlueButtonModule = notification.getBody() as BigBlueButtonModule;
|
||||
addModule(moduleNote);
|
||||
if (moduleNote.addButton){
|
||||
moduleNote.button = addButton(moduleNote);
|
||||
moduleNote.router = this.router;
|
||||
moduleNote.mshell = this.mshell;
|
||||
moduleNote.moduleAdded();
|
||||
}
|
||||
if (moduleNote.addButton) addButton(moduleNote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -60,11 +60,7 @@ package org.bigbluebutton.modules.video
|
||||
public static const PUBLISH_STREAM_COMMAND : String = "PUBLISHER_PUBLISH_STREAM_COMMAND";
|
||||
public static const UNPUBLISH_STREAM_COMMAND : String = "PUBLISHER_UNPUBLISH_STREAM_COMMAND";
|
||||
|
||||
public static const OPEN_VIEW_CAMERA:String = "Open View Camera";
|
||||
//The camera will start, video will be published immediately
|
||||
public static const PLUG_AND_PLAY:String = "Plug_and_Play";
|
||||
//Play video as soon as user clicks on an available stream icon
|
||||
public static const PLAY_VIDEO:String = "Play_Immediately";
|
||||
public static const OPEN_VIEW_CAMERA:String = "Open View Camera"
|
||||
|
||||
/**
|
||||
* The constructor. Should never be called, however ActionScript does not support private
|
||||
|
@ -19,10 +19,7 @@
|
||||
*/
|
||||
package org.bigbluebutton.modules.video
|
||||
{
|
||||
import flash.events.MouseEvent;
|
||||
import flash.events.TimerEvent;
|
||||
import flash.media.Camera;
|
||||
import flash.utils.Timer;
|
||||
import flash.system.Capabilities;
|
||||
|
||||
import flexlib.mdi.containers.MDIWindow;
|
||||
|
||||
@ -53,8 +50,6 @@ package org.bigbluebutton.modules.video
|
||||
public var type:String;
|
||||
public var user:User;
|
||||
|
||||
private var cameraLocatorTimer:Timer;
|
||||
|
||||
/**
|
||||
* Creates a new instance of the Video Module
|
||||
*
|
||||
@ -77,6 +72,7 @@ package org.bigbluebutton.modules.video
|
||||
this.preferedY = 240;
|
||||
this.startTime = NAME;
|
||||
this.addButton = true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,28 +95,5 @@ package org.bigbluebutton.modules.video
|
||||
facade.removeCore(this.streamName);
|
||||
}
|
||||
|
||||
override public function moduleAdded():void{
|
||||
this.button.addEventListener(MouseEvent.CLICK, buttonClicked);
|
||||
listenToCameras();
|
||||
}
|
||||
|
||||
private function buttonClicked(e:MouseEvent):void{
|
||||
this.acceptRouter(this.router, this.mshell);
|
||||
}
|
||||
|
||||
private function listenToCameras():void{
|
||||
this.cameraLocatorTimer = new Timer(5000);
|
||||
this.cameraLocatorTimer.addEventListener(TimerEvent.TIMER, onTimer);
|
||||
this.cameraLocatorTimer.start();
|
||||
}
|
||||
|
||||
private function onTimer(e:TimerEvent):void{
|
||||
if (Camera.getCamera() == null){
|
||||
this.button.enabled = false;
|
||||
} else if (Camera.getCamera() != null){
|
||||
this.button.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -19,6 +19,8 @@
|
||||
*/
|
||||
package org.bigbluebutton.modules.video
|
||||
{
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.common.InputPipe;
|
||||
import org.bigbluebutton.common.OutputPipe;
|
||||
import org.bigbluebutton.common.Router;
|
||||
@ -30,6 +32,8 @@ package org.bigbluebutton.modules.video
|
||||
import org.bigbluebutton.modules.video.view.ViewCameraWindow;
|
||||
import org.bigbluebutton.modules.video.view.mediators.MyCameraWindowMediator;
|
||||
import org.bigbluebutton.modules.video.view.mediators.ViewCameraWindowMediator;
|
||||
import org.bigbluebutton.modules.viewers.ViewersConstants;
|
||||
import org.bigbluebutton.modules.viewers.model.vo.User;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
@ -113,7 +117,6 @@ package org.bigbluebutton.modules.video
|
||||
msg.setBody(viewComponent as VideoModule);
|
||||
outpipe.write(msg);
|
||||
|
||||
sendNotification(VideoFacade.PLUG_AND_PLAY);
|
||||
}
|
||||
|
||||
public function addViewWindow():void{
|
||||
@ -139,8 +142,6 @@ package org.bigbluebutton.modules.video
|
||||
|
||||
msg.setBody(viewComponent as VideoModule);
|
||||
outpipe.write(msg);
|
||||
|
||||
sendNotification(VideoFacade.PLAY_VIDEO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,11 +72,11 @@
|
||||
var delegate:SharedObjectConferenceDelegate =
|
||||
ViewersFacade.getInstance().retrieveProxy(SharedObjectConferenceDelegate.NAME) as SharedObjectConferenceDelegate;
|
||||
delegate.sendBroadcastStream(broadcasting, media.streamName);
|
||||
//if (broadcasting) {
|
||||
// transmitBtn.toolTip = "Stop broadcasting";
|
||||
//} else {
|
||||
// transmitBtn.toolTip = "Start broadcasting";
|
||||
//}
|
||||
if (broadcasting) {
|
||||
transmitBtn.toolTip = "Stop broadcasting";
|
||||
} else {
|
||||
transmitBtn.toolTip = "Start broadcasting";
|
||||
}
|
||||
}
|
||||
|
||||
public function callThis() : void
|
||||
@ -95,7 +95,7 @@
|
||||
width="20" height="20" click="openSettingsWindow()"
|
||||
toolTip="Settings"/>
|
||||
<mx:Spacer width="100%"/>
|
||||
<!--<mx:Button id="startDevBtn" icon="{media.deviceStarted ? stopIcon : startIcon}"
|
||||
<mx:Button id="startDevBtn" icon="{media.deviceStarted ? stopIcon : startIcon}"
|
||||
visible = "{(media.video.settings.cameraIndex > 0) || (media.audio.settings.micIndex > 0)}"
|
||||
enabled = "{! media.broadcasting}"
|
||||
click="dispatchEvent(new Event(MyCameraWindowMediator.START_STOP_DEVICES))"
|
||||
@ -105,6 +105,6 @@
|
||||
click="dispatchEvent(new Event(MyCameraWindowMediator.RECORD_STREAM))"
|
||||
visible="{ media.deviceStarted }"
|
||||
width="20" height="20"
|
||||
toolTip="Start broadcasting"/> -->
|
||||
toolTip="Start broadcasting"/>
|
||||
</mx:ControlBar>
|
||||
</cam:MDIWindow>
|
||||
|
@ -36,11 +36,11 @@
|
||||
|
||||
private function handlePlaybackState(playState:PlaybackState) : void
|
||||
{
|
||||
//if (playState == PlaybackState.PLAYING) {
|
||||
// playButton.toolTip = "Pause";
|
||||
//} else {
|
||||
// playButton.toolTip = "Play";
|
||||
//}
|
||||
if (playState == PlaybackState.PLAYING) {
|
||||
playButton.toolTip = "Pause";
|
||||
} else {
|
||||
playButton.toolTip = "Play";
|
||||
}
|
||||
}
|
||||
|
||||
]]>
|
||||
@ -52,18 +52,18 @@
|
||||
<util:VideoContainer video="{ media.remoteVideo }" height="100%" width="100%"/>
|
||||
</mx:Canvas>
|
||||
|
||||
<!-- <mx:ControlBar width="100%">
|
||||
<mx:Label text="Enable:"/>
|
||||
<mx:ControlBar width="100%">
|
||||
<!--mx:Label text="Enable:"/>
|
||||
<mx:Spacer width="2"/>
|
||||
<mx:CheckBox label="Audio" id="enableAudioCb"
|
||||
click="this.toggleAudio()" selected="true"/>
|
||||
<mx:CheckBox id="enableVideoCb" label="Video"
|
||||
click="this.toggleVideo()" width="60" selected="true"/
|
||||
click="this.toggleVideo()" width="60" selected="true"/-->
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button id="stopButton" icon="{stopIcon}"
|
||||
click="dispatchEvent(new Event(ViewCameraWindowMediator.STOP_STREAM))" toolTip="Stop"/>
|
||||
<mx:Button id="playButton" click="dispatchEvent(new Event(ViewCameraWindowMediator.VIEW_STREAM))"
|
||||
icon="{media.playState == PlaybackState.PLAYING ? pauseIcon : playIcon}"/>
|
||||
</mx:ControlBar> -->
|
||||
</mx:ControlBar>
|
||||
</mx:VBox>
|
||||
</cam:MDIWindow>
|
||||
|
@ -1,8 +1,6 @@
|
||||
package org.bigbluebutton.modules.video.view.mediators
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.events.TimerEvent;
|
||||
import flash.utils.Timer;
|
||||
|
||||
import org.bigbluebutton.modules.video.VideoFacade;
|
||||
import org.bigbluebutton.modules.video.control.notifiers.PublishNotifier;
|
||||
@ -32,8 +30,7 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
override public function listNotificationInterests():Array{
|
||||
return [
|
||||
VideoFacade.CLOSE_ALL,
|
||||
VideoFacade.ENABLE_CAMERA,
|
||||
VideoFacade.PLUG_AND_PLAY
|
||||
VideoFacade.ENABLE_CAMERA
|
||||
];
|
||||
}
|
||||
|
||||
@ -45,9 +42,6 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
case VideoFacade.ENABLE_CAMERA:
|
||||
startOrStopDevices(new Event(VideoFacade.ENABLE_CAMERA));
|
||||
break;
|
||||
case VideoFacade.PLUG_AND_PLAY:
|
||||
broadcastVideo();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +52,6 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
private function recordStream(e:Event):void{
|
||||
if ( ! cameraWindow.media.broadcasting )
|
||||
{
|
||||
//Alert.show(cameraWindow.media.streamName);
|
||||
sendNotification(VideoFacade.PUBLISH_STREAM_COMMAND, new PublishNotifier("live", cameraWindow.media.streamName));
|
||||
}
|
||||
else
|
||||
@ -107,22 +100,5 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
facade.registerMediator(new SettingsWindowMediator(cameraWindow.settingsWindow));
|
||||
}
|
||||
|
||||
private function broadcastVideo():void{
|
||||
cameraWindow.media.video.settings.cameraIndex = 1;
|
||||
sendNotification(VideoFacade.ENABLE_CAMERA);
|
||||
|
||||
var timer:Timer = new Timer(100, 1);
|
||||
timer.addEventListener(TimerEvent.TIMER, onTimer);
|
||||
timer.start();
|
||||
}
|
||||
|
||||
private function onTimer(e:TimerEvent):void{
|
||||
recordStream(new Event("broadcast"));
|
||||
cameraWindow.handleBroadcasting(true);
|
||||
//cameraWindow.dispatchEvent(new Event(RECORD_STREAM));
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -32,8 +32,7 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
}
|
||||
|
||||
override public function listNotificationInterests():Array{
|
||||
return [
|
||||
];
|
||||
return [];
|
||||
}
|
||||
|
||||
override public function handleNotification(notification:INotification):void{
|
||||
|
@ -1,10 +1,6 @@
|
||||
package org.bigbluebutton.modules.video.view.mediators
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.events.TimerEvent;
|
||||
import flash.utils.Timer;
|
||||
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.modules.video.VideoFacade;
|
||||
import org.bigbluebutton.modules.video.control.notifiers.PlayStreamNotifier;
|
||||
@ -29,8 +25,7 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
|
||||
override public function listNotificationInterests():Array{
|
||||
return [
|
||||
VideoFacade.CLOSE_ALL,
|
||||
VideoFacade.PLAY_VIDEO
|
||||
VideoFacade.CLOSE_ALL
|
||||
];
|
||||
}
|
||||
|
||||
@ -39,10 +34,6 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
case VideoFacade.CLOSE_ALL:
|
||||
videoWindow.close();
|
||||
break;
|
||||
case VideoFacade.PLAY_VIDEO:
|
||||
//Alert.show("playing...");
|
||||
playStream();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,15 +67,5 @@ package org.bigbluebutton.modules.video.view.mediators
|
||||
sendNotification(VideoFacade.STOP_STREAM_COMMAND, videoWindow.media.streamName);
|
||||
}
|
||||
|
||||
private function playStream():void{
|
||||
var timer:Timer = new Timer(100, 1);
|
||||
timer.addEventListener(TimerEvent.TIMER, onTimer);
|
||||
timer.start();
|
||||
}
|
||||
|
||||
private function onTimer(e:TimerEvent):void{
|
||||
viewStream(new Event(VideoFacade.PLAY_VIDEO));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user