Removed smiley face icon

Made sharing and viewing video easier

git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@544 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
Denis Zgonjanin 2008-10-10 21:04:22 +00:00
parent a5ade6ce14
commit 1093821c41
14 changed files with 128 additions and 53 deletions

View File

@ -24,13 +24,13 @@ var requiredRevision = ${version_revision};
//Change the return value of this function to your red5 server
function getRed5()
{
return "localhost"
return "present.carleton.ca"
}
//Change the return value of this function to your tomcat server
function getPresentationHost()
{
return "localhost:8080"
return "present.carleton.ca"
}
//This function extracts the top level domain and uses it as the server for both the red5 and the

View File

@ -21,6 +21,7 @@ package org.bigbluebutton.common
{
import flexlib.mdi.containers.MDIWindow;
import mx.controls.Button;
import mx.modules.ModuleBase;
import org.bigbluebutton.common.red5.Connection;
@ -40,7 +41,7 @@ package org.bigbluebutton.common
public var preferedY:Number;
private var MDIComponent:MDIWindow;
public var name:String;
private var _router:Router;
public var _router:Router;
public var mshell:MainApplicationShell;
private var conn:Connection;
@ -48,6 +49,7 @@ package org.bigbluebutton.common
public var startTime:String;
public var addButton:Boolean = false;
public var button:Button;
public static const START_ON_LOGIN:String = "Start on Login";
public static const START_ON_CREATION_COMPLETE:String = "Start on Creation Complete";
@ -114,5 +116,13 @@ package org.bigbluebutton.common
return _router;
}
public function set router(router:Router):void{
this._router = router;
}
public function moduleAdded():void{
}
}
}

View File

@ -64,7 +64,7 @@ package org.bigbluebutton.common
[Embed(source="assets/images/cancel.png")]
public var cancel_user:Class;
[Embed(source="assets/images/waaaht.png")]
[Embed(source="assets/images/user_red.png")]
public var eject_user:Class;
[Embed(source="assets/images/bin.png")]

View File

@ -3,5 +3,6 @@
<module id="Presentation" swfpath="org/bigbluebutton/modules/presentation/presentation_module.swf" />
<module id="Video" swfpath="org/bigbluebutton/modules/video/video_module.swf" />
<module id="Voice" swfpath="org/bigbluebutton/modules/voiceconference/voice_module.swf" />
<module id="Playback" swfpath="org/bigbluebutton/modules/playback/playback_module.swf" />
<module id="Whiteboard" swfpath="org/bigbluebutton/modules/whiteboard/whiteboard_module.swf" />
</modules>

View File

@ -204,9 +204,10 @@ package org.bigbluebutton.main.view
* @param module
*
*/
private function addButton(module:BigBlueButtonModule):void{
private function addButton(module:BigBlueButtonModule):Button{
var button:Button = mshell.toolbar.addButton(module.name);
button.addEventListener(MouseEvent.CLICK, openModule);
//button.addEventListener(MouseEvent.CLICK, openModule);
return button;
}
private function openModule(e:MouseEvent):void{
@ -278,7 +279,12 @@ package org.bigbluebutton.main.view
case MainApplicationFacade.ADD_MODULE:
var moduleNote:BigBlueButtonModule = notification.getBody() as BigBlueButtonModule;
addModule(moduleNote);
if (moduleNote.addButton) addButton(moduleNote);
if (moduleNote.addButton){
moduleNote.button = addButton(moduleNote);
moduleNote.router = this.router;
moduleNote.mshell = this.mshell;
moduleNote.moduleAdded();
}
break;
}
}

View File

@ -174,26 +174,10 @@
this.restore();
}
//this.width = Capabilities.screenResolutionX ;
//this.height = Capabilities.screenResolutionY ;
//this.x = 1;
//this.y = 1;
//this.resizable = false;
//this.thumbnailView.myLoader.height = Capabilities.screenResolutionX - 100;
//this.thumbnailView.myLoader.width = Capabilities.screenResolutionY - 200;
//if (model.presentation.isPresenter) dispatchEvent(new Event(PresentationWindowMediator.MAXIMIZE));
} else {
trace("Switching to normal screen");
/* Do something specific here if we switched to normal mode. */
this.maximizeRestoreBtn.visible = true;
//this.width = 480;
//this.height = 378;
//this.x = Capabilities.screenResolutionX/2 - 300;
//this.y = 20;
//this.resizable = true;
//this.thumbnailView.myLoader.height = 300;
//this.thumbnailView.myLoader.width = 300;
//if (model.presentation.isPresenter) dispatchEvent(new Event(PresentationWindowMediator.RESTORE));
}
}

View File

@ -60,7 +60,11 @@ 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"
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";
/**
* The constructor. Should never be called, however ActionScript does not support private

View File

@ -19,7 +19,10 @@
*/
package org.bigbluebutton.modules.video
{
import flash.system.Capabilities;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.media.Camera;
import flash.utils.Timer;
import flexlib.mdi.containers.MDIWindow;
@ -50,6 +53,8 @@ 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
*
@ -72,7 +77,6 @@ package org.bigbluebutton.modules.video
this.preferedY = 240;
this.startTime = NAME;
this.addButton = true;
}
/**
@ -95,5 +99,28 @@ 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;
}
}
}
}

View File

@ -19,8 +19,6 @@
*/
package org.bigbluebutton.modules.video
{
import mx.controls.Alert;
import org.bigbluebutton.common.InputPipe;
import org.bigbluebutton.common.OutputPipe;
import org.bigbluebutton.common.Router;
@ -32,8 +30,6 @@ 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;
@ -117,6 +113,7 @@ package org.bigbluebutton.modules.video
msg.setBody(viewComponent as VideoModule);
outpipe.write(msg);
sendNotification(VideoFacade.PLUG_AND_PLAY);
}
public function addViewWindow():void{
@ -142,6 +139,8 @@ package org.bigbluebutton.modules.video
msg.setBody(viewComponent as VideoModule);
outpipe.write(msg);
sendNotification(VideoFacade.PLAY_VIDEO);
}
/**

View File

@ -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>

View File

@ -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>

View File

@ -1,6 +1,8 @@
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;
@ -30,7 +32,8 @@ package org.bigbluebutton.modules.video.view.mediators
override public function listNotificationInterests():Array{
return [
VideoFacade.CLOSE_ALL,
VideoFacade.ENABLE_CAMERA
VideoFacade.ENABLE_CAMERA,
VideoFacade.PLUG_AND_PLAY
];
}
@ -42,6 +45,9 @@ 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;
}
}
@ -52,6 +58,7 @@ 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
@ -100,5 +107,22 @@ 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));
}
}
}

View File

@ -32,7 +32,8 @@ package org.bigbluebutton.modules.video.view.mediators
}
override public function listNotificationInterests():Array{
return [];
return [
];
}
override public function handleNotification(notification:INotification):void{

View File

@ -1,6 +1,10 @@
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;
@ -25,7 +29,8 @@ package org.bigbluebutton.modules.video.view.mediators
override public function listNotificationInterests():Array{
return [
VideoFacade.CLOSE_ALL
VideoFacade.CLOSE_ALL,
VideoFacade.PLAY_VIDEO
];
}
@ -34,6 +39,10 @@ package org.bigbluebutton.modules.video.view.mediators
case VideoFacade.CLOSE_ALL:
videoWindow.close();
break;
case VideoFacade.PLAY_VIDEO:
//Alert.show("playing...");
playStream();
break;
}
}
@ -67,5 +76,15 @@ 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));
}
}
}