Merge branch 'master' of git://github.com/bigbluebutton/bigbluebutton

This commit is contained in:
Richard Alam 2013-01-14 19:04:19 +00:00
commit 9bcac978e5
27 changed files with 282 additions and 149 deletions

View File

@ -19,6 +19,12 @@
<script src="lib/bbb_blinker.js" language="javascript"></script>
<script src="lib/bbb_deskshare.js" language="javascript"></script>
<script src="lib/bbb_api_bridge.js" language="javascript"></script>
<script>
window.chatLinkClicked = function(url) {
window.open(url, '_blank');
window.focus();
}
</script>
</head>
<body>
<div id="content">

View File

@ -59,7 +59,7 @@
}
/**
* Get external meetingID.
* Get external userID.
*/
BBB.getMyUserID = function(callback) {
var swfObj = getSwfObj();
@ -70,7 +70,23 @@
}
}
}
/**
* Get my user info.
*/
BBB.getMyUserInfo = function(callback) {
var swfObj = getSwfObj();
if (swfObj) {
if (arguments.length == 0) {
swfObj.getMyUserInfoAsync();
} else {
if (typeof callback === 'function') {
callback(swfObj.getMyUserInfoSync());
}
}
}
}
/**
* Get external meetingID.
*/
@ -263,27 +279,27 @@
* See https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/src/org/bigbluebutton/core/EventConstants.as
*
************************************************/
var GET_MY_ROLE_RESP:String = 'GetMyRoleResponse';
var AM_I_PRESENTER_RESP:String = 'AmIPresenterQueryResponse';
var AM_I_SHARING_CAM_RESP:String = 'AmISharingCamQueryResponse';
var BROADCASTING_CAM_STARTED:String = 'BroadcastingCameraStartedEvent';
var BROADCASTING_CAM_STOPPED:String = 'BroadcastingCameraStoppedEvent';
var I_AM_SHARING_CAM:String = 'IAmSharingCamEvent';
var CAM_STREAM_SHARED:String = 'CamStreamSharedEvent';
var USER_JOINED:String = 'UserJoinedEvent';
var USER_LEFT:String = 'UserLeftEvent';
var SWITCHED_PRESENTER:String = 'SwitchedPresenterEvent';
var NEW_PRIVATE_CHAT:String = 'NewPrivateChatEvent';
var NEW_PUBLIC_CHAT:String = 'NewPublicChatEvent';
var SWITCHED_LAYOUT:String = 'SwitchedLayoutEvent';
var REMOTE_LOCKED_LAYOUT:String = 'RemoteLockedLayoutEvent';
var REMOTE_UNLOCKED_LAYOUT:String = 'RemoteUnlockedLayoutEvent';
var USER_JOINED_VOICE:String = 'UserJoinedVoiceEvent';
var USER_LEFT_VOICE:String = 'UserLeftVoiceEvent';
var USER_MUTED_VOICE:String = 'UserVoiceMutedEvent';
var USER_TALKING:String = 'UserTalkingEvent';
var USER_LOCKED_VOICE:String = 'UserLockedVoiceEvent';
var START_PRIVATE_CHAT:String = "StartPrivateChatEvent";
var GET_MY_ROLE_RESP = 'GetMyRoleResponse';
var AM_I_PRESENTER_RESP = 'AmIPresenterQueryResponse';
var AM_I_SHARING_CAM_RESP = 'AmISharingCamQueryResponse';
var BROADCASTING_CAM_STARTED = 'BroadcastingCameraStartedEvent';
var BROADCASTING_CAM_STOPPED = 'BroadcastingCameraStoppedEvent';
var I_AM_SHARING_CAM = 'IAmSharingCamEvent';
var CAM_STREAM_SHARED = 'CamStreamSharedEvent';
var USER_JOINED = 'UserJoinedEvent';
var USER_LEFT = 'UserLeftEvent';
var SWITCHED_PRESENTER = 'SwitchedPresenterEvent';
var NEW_PRIVATE_CHAT = 'NewPrivateChatEvent';
var NEW_PUBLIC_CHAT = 'NewPublicChatEvent';
var SWITCHED_LAYOUT = 'SwitchedLayoutEvent';
var REMOTE_LOCKED_LAYOUT = 'RemoteLockedLayoutEvent';
var REMOTE_UNLOCKED_LAYOUT = 'RemoteUnlockedLayoutEvent';
var USER_JOINED_VOICE = 'UserJoinedVoiceEvent';
var USER_LEFT_VOICE = 'UserLeftVoiceEvent';
var USER_MUTED_VOICE = 'UserVoiceMutedEvent';
var USER_TALKING = 'UserTalkingEvent';
var USER_LOCKED_VOICE = 'UserLockedVoiceEvent';
var START_PRIVATE_CHAT = 'StartPrivateChatEvent';
window.BBB = BBB;
})(this);

View File

@ -94,7 +94,9 @@
stopCamera();
}
public function displayCamera(camIndex:String, camWidth:int, camHeight:int, camKeyFrameInterval:int, camModeFps:Number, camQualityBandwidth:int, camQualityPicture:int):void {
public function displayCamera(camIndex:String, camWidth:int, camHeight:int, camKeyFrameInterval:int,
camModeFps:Number, camQualityBandwidth:int,
camQualityPicture:int):void {
trace('WebcamPreviewSA::displayCamera');
stopCamera();

View File

@ -28,6 +28,7 @@ package org.bigbluebutton.core
public static const USER_JOINED:String = 'UserJoinedEvent';
public static const USER_LEFT:String = 'UserLeftEvent';
public static const SWITCHED_PRESENTER:String = 'SwitchedPresenterEvent';
public static const NEW_ROLE:String = 'NewRoleEvent';
public static const NEW_PRIVATE_CHAT:String = 'NewPrivateChatEvent';
public static const NEW_PUBLIC_CHAT:String = 'NewPublicChatEvent';
public static const SWITCHED_LAYOUT:String = 'SwitchedLayoutEvent';
@ -39,5 +40,6 @@ package org.bigbluebutton.core
public static const USER_TALKING:String = 'UserTalkingEvent';
public static const USER_LOCKED_VOICE:String = 'UserLockedVoiceEvent';
public static const START_PRIVATE_CHAT:String = "StartPrivateChatEvent";
public static const GET_MY_USER_INFO_REP:String = "GetMyUserInfoResponse";
}
}

View File

@ -84,6 +84,10 @@ package org.bigbluebutton.core
return UserManager.getInstance().getConference().getMyUserId();
}
public static function getMyRole():String {
return UserManager.getInstance().getConference().getMyRole();
}
public static function getMyUsername():String {
return UserManager.getInstance().getConference().getMyName();
}

View File

@ -0,0 +1,14 @@
package org.bigbluebutton.core.events
{
import flash.events.Event;
public class GetMyUserInfoRequestEvent extends Event
{
public static const GET_MY_USER_INFO_REQUEST:String = "get my user info request event";
public function GetMyUserInfoRequestEvent(bubbles:Boolean=true, cancelable:Boolean=false)
{
super(GET_MY_USER_INFO_REQUEST, bubbles, cancelable);
}
}
}

View File

@ -12,6 +12,7 @@ package org.bigbluebutton.main.api
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
import org.bigbluebutton.core.events.AmISharingWebcamQueryEvent;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.core.events.GetMyUserInfoRequestEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.vo.CameraSettingsVO;
import org.bigbluebutton.main.events.BBBEvent;
@ -33,6 +34,8 @@ package org.bigbluebutton.main.api
private function init():void {
if (ExternalInterface.available) {
ExternalInterface.addCallback("switchPresenterRequest", handleSwitchPresenterRequest);
ExternalInterface.addCallback("getMyUserInfoSync", handleGetMyUserInfoSynch);
ExternalInterface.addCallback("getMyUserInfoAsync", handleGetMyUserInfoAsynch);
ExternalInterface.addCallback("getMyUserID", handleGetMyUserID);
ExternalInterface.addCallback("getExternalMeetingID", handleGetExternalMeetingID);
ExternalInterface.addCallback("joinVoiceRequest", handleJoinVoiceRequest);
@ -55,8 +58,22 @@ package org.bigbluebutton.main.api
ExternalInterface.addCallback("lockLayout", handleSendLockLayoutRequest);
}
}
private function handleGetMyUserInfoAsynch():void {
_dispatcher.dispatchEvent(new GetMyUserInfoRequestEvent());
}
private function handleGetMyUserInfoSynch():Object {
var obj:Object = new Object();
obj.myUserID = UsersUtil.internalUserIDToExternalUserID(UsersUtil.getMyUserID());
obj.myUserID = UsersUtil.getMyUsername();
obj.myAvatarURL = UsersUtil.getAvatarURL();
obj.myRole = UsersUtil.getMyRole();
obj.amIPresenter = UsersUtil.amIPresenter();
return obj;
}
private function handleAmISharingCameraRequestSync():Object {
var obj:Object = new Object();
var camSettings:CameraSettingsVO = UsersUtil.amIPublishing();

View File

@ -3,15 +3,18 @@ package org.bigbluebutton.main.api
import flash.external.ExternalInterface;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
import org.bigbluebutton.core.events.AmISharingWebcamQueryEvent;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.core.events.GetMyUserInfoRequestEvent;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.vo.CameraSettingsVO;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.events.UserJoinedEvent;
import org.bigbluebutton.main.events.UserLeftEvent;
import org.bigbluebutton.main.model.users.BBBUser;
@ -22,7 +25,19 @@ package org.bigbluebutton.main.api
public class ExternalApiCalls {
public function handleGetMyUserInfoRequest(event:GetMyUserInfoRequestEvent):void {
var payload:Object = new Object();
payload.eventName = EventConstants.GET_MY_USER_INFO_REP;
payload.myUserID = UsersUtil.internalUserIDToExternalUserID(UsersUtil.getMyUserID());
payload.myUsername = UsersUtil.getMyUsername();
payload.myAvatarURL = UsersUtil.getAvatarURL();
payload.myRole = UsersUtil.getMyRole();
payload.amIPresenter = UsersUtil.amIPresenter();
broadcastEvent(payload);
}
public function handleSwitchedLayoutEvent(event:SwitchedLayoutEvent):void {
var payload:Object = new Object();
payload.eventName = EventConstants.SWITCHED_LAYOUT;
@ -89,12 +104,20 @@ package org.bigbluebutton.main.api
broadcastEvent(payload);
}
public function handleSwitchToNewRoleEvent(event:CoreEvent):void {
trace("Got NEW ROLE EVENT role = [" + event.message.role + "]");
public function handleSwitchToNewRoleEvent(event:SwitchedPresenterEvent):void {
trace("ExternalApiCalls:: Got NEW ROLE EVENT presenter = [" + event.amIPresenter + "]");
var payload:Object = new Object();
payload.eventName = EventConstants.SWITCHED_PRESENTER;
payload.role = event.message.role;
broadcastEvent(payload);
payload.amIPresenter = event.amIPresenter;
payload.role = event.amIPresenter ? Role.PRESENTER : Role.VIEWER;
payload.newPresenterUserID = event.newPresenterUserID;
broadcastEvent(payload);
payload.eventName = EventConstants.NEW_ROLE;
payload.amIPresenter = event.amIPresenter;
payload.newPresenterUserID = event.newPresenterUserID;
payload.role = event.amIPresenter ? Role.PRESENTER : Role.VIEWER;
broadcastEvent(payload);
}
public function handleStartPrivateChatEvent(event:CoreEvent):void {
@ -116,7 +139,7 @@ package org.bigbluebutton.main.api
payload.eventName = EventConstants.USER_JOINED_VOICE;
payload.userID = UsersUtil.internalUserIDToExternalUserID(event.payload.userID);
trace("Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] has joined the voice conference.");
trace("ExternalApiCalls:: Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] has joined the voice conference.");
broadcastEvent(payload);
}
@ -127,7 +150,7 @@ package org.bigbluebutton.main.api
payload.userID = UsersUtil.internalUserIDToExternalUserID(event.payload.userID);
payload.muted = event.payload.muted;
trace("Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] is now muted=[" + payload.muted + "]");
trace("ExternalApiCalls:: Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] is now muted=[" + payload.muted + "]");
broadcastEvent(payload);
}
@ -137,7 +160,7 @@ package org.bigbluebutton.main.api
payload.userID = UsersUtil.internalUserIDToExternalUserID(event.payload.userID);
payload.locked = event.payload.locked;
trace("Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] is now locked=[" + payload.locked + "]");
trace("ExternalApiCalls:: Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] is now locked=[" + payload.locked + "]");
broadcastEvent(payload);
}
@ -146,7 +169,7 @@ package org.bigbluebutton.main.api
payload.eventName = EventConstants.USER_LEFT_VOICE;
payload.userID = UsersUtil.internalUserIDToExternalUserID(event.payload.userID);
trace("Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] has left the voice conference.");
trace("ExternalApiCalls:: Notifying external API that [" + UsersUtil.getUserName(event.payload.userID) + "] has left the voice conference.");
broadcastEvent(payload);
}

View File

@ -26,10 +26,11 @@
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
import org.bigbluebutton.core.events.AmISharingWebcamQueryEvent;
import org.bigbluebutton.core.events.GetMyUserInfoRequestEvent;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
import org.bigbluebutton.main.api.ExternalApiCalls;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.events.UserJoinedEvent;
import org.bigbluebutton.main.events.UserLeftEvent;
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
@ -82,6 +83,10 @@
<MethodInvoker generator="{ExternalApiCalls}" method="handleGetMyRoleResponse" arguments="{event}"/>
</EventHandlers>
<EventHandlers type="{GetMyUserInfoRequestEvent.GET_MY_USER_INFO_REQUEST}" >
<MethodInvoker generator="{ExternalApiCalls}" method="handleGetMyUserInfoRequest" arguments="{event}"/>
</EventHandlers>
<EventHandlers type="{SwitchedLayoutEvent.SWITCHED_LAYOUT_EVENT}" >
<MethodInvoker generator="{ExternalApiCalls}" method="handleSwitchedLayoutEvent" arguments="{event}"/>
</EventHandlers>
@ -98,7 +103,7 @@
<MethodInvoker generator="{ExternalApiCalls}" method="handleUserLeftEvent" arguments="{event}"/>
</EventHandlers>
<EventHandlers type="{EventConstants.SWITCHED_PRESENTER}" >
<EventHandlers type="{SwitchedPresenterEvent.SWITCHED_PRESENTER}" >
<MethodInvoker generator="{ExternalApiCalls}" method="handleSwitchToNewRoleEvent" arguments="{event}"/>
</EventHandlers>

View File

@ -0,0 +1,17 @@
package org.bigbluebutton.main.events
{
import flash.events.Event;
public class SwitchedPresenterEvent extends Event
{
public static const SWITCHED_PRESENTER:String = "switched presenter event";
public var amIPresenter:Boolean;
public var newPresenterUserID:String;
public function SwitchedPresenterEvent(bubbles:Boolean=true, cancelable:Boolean=false)
{
super(SWITCHED_PRESENTER, bubbles, cancelable);
}
}
}

View File

@ -33,15 +33,14 @@ package org.bigbluebutton.main.model
public function BigBlueButtonPreloader()
{
super();
downloadingLabel = "Downloading BigBlueButton...";
initializingLabel = "BigBlueButton starting...";
downloadingLabel = "Downloading ...";
initializingLabel = "Starting...";
MINIMUM_DISPLAY_TIME = 0;
}
override public function set preloader(value:Sprite):void{
super.preloader = value;
value.addEventListener(RSLEvent.RSL_ERROR, sharedLibraryLoadingFailed);
// ResourceUtil.getInstance();
}
override protected function get labelRect():Rectangle{

View File

@ -208,7 +208,11 @@ package org.bigbluebutton.main.model.users {
public function amIThisUser(userID:String):Boolean {
return me.userID == userID;
}
public function getMyRole():String {
return me.role;
}
public function amIModerator():Boolean {
return me.role == Role.MODERATOR;
}

View File

@ -17,14 +17,12 @@
*
*/
package org.bigbluebutton.main.model.users {
import com.asfusion.mate.events.Dispatcher;
import com.asfusion.mate.events.Dispatcher;
import flash.events.AsyncErrorEvent;
import flash.events.NetStatusEvent;
import flash.net.NetConnection;
import flash.net.Responder;
import flash.net.SharedObject;
import flash.net.SharedObject;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.BBB;
@ -36,6 +34,7 @@ package org.bigbluebutton.main.model.users {
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.events.PresenterStatusEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.events.UserJoinedEvent;
import org.bigbluebutton.main.events.UserLeftEvent;
import org.bigbluebutton.main.model.ConferenceParameters;
@ -165,23 +164,26 @@ package org.bigbluebutton.main.model.users {
* Called by the server to assign a presenter
*/
public function assignPresenterCallback(userid:String, name:String, assignedBy:String):void {
trace("assignPresenterCallback " + userid + "," + name + "," + assignedBy);
var dispatcher:Dispatcher = new Dispatcher();
trace("**** assignPresenterCallback [" + userid + "," + name + "," + assignedBy + "]");
var meeting:Conference = UserManager.getInstance().getConference();
if (meeting.amIThisUser(userid)) {
trace("**** Switching [" + name + "] to presenter");
sendSwitchedPresenterEvent(true, userid);
meeting.setMePresenter(true);
var e:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_PRESENTER_MODE);
e.userid = userid;
e.presenterName = name;
e.assignerBy = assignedBy;
dispatcher.dispatchEvent(e);
trace("Switching to [" + e.presenterName + "] to presenter");
var roleEvent:CoreEvent = new CoreEvent(EventConstants.SWITCHED_PRESENTER);
roleEvent.message.role = Role.PRESENTER;
dispatcher.dispatchEvent(roleEvent);
dispatcher.dispatchEvent(e);
} else {
trace("**** Switching [" + name + "] to presenter. I am viewer.");
sendSwitchedPresenterEvent(false, userid);
} else {
meeting.setMePresenter(false);
var viewerEvent:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_VIEWER_MODE);
viewerEvent.userid = userid;
@ -189,14 +191,17 @@ package org.bigbluebutton.main.model.users {
viewerEvent.assignerBy = assignedBy;
dispatcher.dispatchEvent(viewerEvent);
trace("Switching to [" + e.presenterName + "] to presenter. I am viewer.");
var newRoleEvent:CoreEvent = new CoreEvent(EventConstants.SWITCHED_PRESENTER);
newRoleEvent.message.role = Role.VIEWER;
dispatcher.dispatchEvent(newRoleEvent);
}
}
private function sendSwitchedPresenterEvent(amIPresenter:Boolean, newPresenterUserID:String):void {
var roleEvent:SwitchedPresenterEvent = new SwitchedPresenterEvent();
roleEvent.amIPresenter = amIPresenter;
roleEvent.newPresenterUserID = newPresenterUserID;
dispatcher.dispatchEvent(roleEvent);
}
public function kickUser(userid:String):void{
_participantsSO.send("kickUserCallback", userid);
}
@ -212,7 +217,7 @@ package org.bigbluebutton.main.model.users {
UserManager.getInstance().getConference().removeUser(userID);
var dispatcher:Dispatcher = new Dispatcher();
var joinEvent:UserLeftEvent = new UserLeftEvent(UserLeftEvent.LEFT);
joinEvent.userID = user.userID;
dispatcher.dispatchEvent(joinEvent);
@ -233,7 +238,7 @@ package org.bigbluebutton.main.model.users {
participantStatusChange(user.userID, "presenter", joinedUser.status.presenter);
participantStatusChange(user.userID, "raiseHand", joinedUser.status.raiseHand);
var dispatcher:Dispatcher = new Dispatcher();
var joinEvent:UserJoinedEvent = new UserJoinedEvent(UserJoinedEvent.JOINED);
joinEvent.userID = user.userID;
dispatcher.dispatchEvent(joinEvent);
@ -244,7 +249,7 @@ package org.bigbluebutton.main.model.users {
* Called by the server to tell the client that the meeting has ended.
*/
public function logout():void {
var dispatcher:Dispatcher = new Dispatcher();
var endMeetingEvent:BBBEvent = new BBBEvent(BBBEvent.END_MEETING_EVENT);
dispatcher.dispatchEvent(endMeetingEvent);
}
@ -260,7 +265,7 @@ package org.bigbluebutton.main.model.users {
if (status == "presenter"){
var e:PresenterStatusEvent = new PresenterStatusEvent(PresenterStatusEvent.PRESENTER_NAME_CHANGE);
e.userID = userID;
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(e);
}
}

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
width="600" height="300" creationComplete="initDefaultMic()" showCloseButton="true" close="onCancelClicked()" keyDown="handleKeyDown(event)">
width="600" height="300" creationComplete="initDefaultMic()" styleName="micSettingsStyle"
showCloseButton="true" close="onCancelClicked()" keyDown="handleKeyDown(event)">
<mx:Script>
<![CDATA[
import flash.system.Security;

View File

@ -219,11 +219,11 @@ package org.bigbluebutton.modules.broadcast.models
}
private function determineHowToDisplayVideo():void {
if (videoIsSmallerThanWindow()) {
centerToWindow();
} else {
// if (videoIsSmallerThanWindow()) {
// centerToWindow();
// } else {
fitVideoToWindow();
}
// }
}
}

View File

@ -2,7 +2,7 @@
<bcast:MDIWindow xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:bcast="flexlib.mdi.containers.*"
implements="org.bigbluebutton.common.IBbbModuleWindow"
styleNameFocus="broadcastStyleFocus"
styleNameFocus="broadcastStyleFocus"
styleNameNoFocus="broadcastStyleNoFocus"
creationComplete="onCreationComplete()"
visible="false"
@ -33,9 +33,14 @@
private function onCreationComplete():void {
options = new BroadcastOptions();
streamsList.visible = options.showStreams;
this.showControls = options.showWindowControls;
streamsList.visible = options.showStreams
if (! options.showStreams) {
currentState = "doNotShowPlaylist";
}
createComplete = true;
autoPlayTimer = new Timer(3000,1);
@ -108,11 +113,18 @@
]]>
</mx:Script>
<mx:HBox id="videoHolderBox" width="100%" height="100%" />
<mx:ControlBar id="streamsList" visible="false" width="100%" height="30" paddingTop="0" borderStyle="outset" horizontalAlign="center">
<mx:HBox x="1" y="1" id="videoStreamList" visible="false" width="100%" height="30" horizontalAlign="center">
<mx:ComboBox id="streamsComboBox" width="85%" dataProvider="{streams.streamNames}" />
<mx:Button id="playBtn" label="Play" width="15% " click="playStopVideo()" toggle="true"/>
</mx:HBox>
</mx:ControlBar>
<bcast:states>
<mx:State name="doNotShowPlaylist">
<mx:SetProperty target="{streamsList}" name="height" value="1"/>
</mx:State>
</bcast:states>
<mx:HBox id="videoHolderBox" width="100%" height="100%" />
<mx:ControlBar id="streamsList" visible="false" width="100%" height="30" paddingTop="0" borderStyle="outset" horizontalAlign="center">
<mx:HBox x="1" y="1" id="videoStreamList" visible="false" width="100%" height="100%" horizontalAlign="center">
<mx:ComboBox id="streamsComboBox" width="85%" dataProvider="{streams.streamNames}" />
<mx:Button id="playBtn" label="Play" width="15% " click="playStopVideo()" toggle="true"/>
</mx:HBox>
</mx:ControlBar>
</bcast:MDIWindow>

View File

@ -36,8 +36,9 @@
private function onLinkClick(e:TextEvent):void{
trace("Clicked on link[" + e.text + "] from chat");
var url:URLRequest = new URLRequest(e.text);
navigateToURL(url, '_blank');
if (ExternalInterface.available) {
ExternalInterface.call("chatLinkClicked", e.text);
}
}
private function onCreationComplete():void{

View File

@ -19,8 +19,7 @@
*/
package org.bigbluebutton.modules.layout.managers
{
import com.asfusion.mate.events.Dispatcher;
import com.asfusion.mate.events.Dispatcher;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.TimerEvent;
@ -28,15 +27,12 @@ package org.bigbluebutton.modules.layout.managers
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.utils.Dictionary;
import flash.utils.Timer;
import flash.utils.Timer;
import flexlib.mdi.containers.MDICanvas;
import flexlib.mdi.containers.MDIWindow;
import flexlib.mdi.events.MDIManagerEvent;
import flexlib.mdi.events.MDIManagerEvent;
import mx.controls.Alert;
import mx.events.ResizeEvent;
import mx.events.ResizeEvent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.EventBroadcaster;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
@ -200,7 +196,6 @@ package org.bigbluebutton.modules.layout.managers
applyLayout(newLayout);
sendLayoutUpdate(_currentLayout);
dispatchSwitchedLayoutEvent(newLayout.name);
}
public function applyDefaultLayout():void {
@ -210,8 +205,7 @@ package org.bigbluebutton.modules.layout.managers
var defaultLayout:LayoutDefinition = _layouts.getLayout(layoutOptions.defaultLayout);
var sessionDefaulLayout:String = UserManager.getInstance().getConference().getDefaultLayout();
if (sessionDefaulLayout != "NOLAYOUT") {
var sesLayout:LayoutDefinition = _layouts.getLayout(sessionDefaulLayout);
if (sesLayout != null) {
@ -226,11 +220,13 @@ package org.bigbluebutton.modules.layout.managers
trace("************** USING [" + defaultLayout.name + "] as default LAYOUT ***************************");
applyLayout(defaultLayout);
sendLayoutUpdate(_currentLayout);
dispatchSwitchedLayoutEvent(defaultLayout.name);
}
private function dispatchSwitchedLayoutEvent(layoutID:String):void {
if (_currentLayout != null && _currentLayout.name == layoutID) return;
trace("************** DISPATCHING [" + layoutID + "] as new LAYOUT ***************************");
var layoutEvent:SwitchedLayoutEvent = new SwitchedLayoutEvent();
layoutEvent.layoutID = layoutID;
_globalDispatcher.dispatchEvent(layoutEvent);
@ -253,8 +249,11 @@ package org.bigbluebutton.modules.layout.managers
private function applyLayout(layout:LayoutDefinition):void {
_detectContainerChange = false;
if (layout != null)
layout.applyToCanvas(_canvas);
if (layout != null) {
layout.applyToCanvas(_canvas);
dispatchSwitchedLayoutEvent(layout.name);
}
updateCurrentLayout(layout);
_detectContainerChange = true;
}
@ -262,8 +261,9 @@ package org.bigbluebutton.modules.layout.managers
public function redefineLayout(e:RedefineLayoutEvent):void {
var layout:LayoutDefinition = e.layout;
applyLayout(layout);
if (!e.remote)
sendLayoutUpdate(layout);
if (!e.remote) {
sendLayoutUpdate(layout);
}
}
public function remoteLockLayout():void {

View File

@ -192,7 +192,7 @@ package org.bigbluebutton.modules.layout.model {
if (!ignoreWindowByType(type)) {
trace("LayoutDefinition::applyToWindow [" + window.name + ", type=" + type + "]");
// trace("LayoutDefinition::applyToWindow [" + window.name + ", type=" + type + "]");
WindowLayout.setLayout(canvas, window, myLayout[type]);
}
}

View File

@ -63,7 +63,7 @@
</mx:Script>
<mx:HBox width="100%" height="15" styleName="noteRendererTimestampStyle">
<mx:Text id="timestamp" htmlText="{note.timestamp}" textAlign="left" color="gray" width="100%"/>
<mx:Text id="timestamp" htmlText="{note.timestamp}" textAlign="right" color="gray" width="100%"/>
</mx:HBox>
<mx:HBox width="100%" styleName="noteRendererTextStyle">
<mx:Spacer width="5"/>

View File

@ -425,6 +425,7 @@ package org.bigbluebutton.modules.present.business {
var meeting:Conference = UserManager.getInstance().getConference();
if (meeting.amIPresenter()) {
LogUtil.debug("trigger Switch to Presenter mode ");
trace("PresentSOService:: trigger Switch to Presenter mode ");
var e:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_PRESENTER_MODE);
e.userid = meeting.getMyUserId();
e.presenterName = meeting.getMyName();
@ -436,6 +437,7 @@ package org.bigbluebutton.modules.present.business {
var p:BBBUser = meeting.getPresenter();
if (p != null) {
LogUtil.debug("trigger Switch to Viewer mode ");
trace("PresentSOService:: trigger Switch to Presenter mode ");
var viewerEvent:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_VIEWER_MODE);
viewerEvent.userid = p.userID;
viewerEvent.presenterName = p.name;

View File

@ -18,15 +18,12 @@
*/
package org.bigbluebutton.modules.present.managers
{
import com.asfusion.mate.events.Dispatcher;
import mx.managers.PopUpManager;
import com.asfusion.mate.events.Dispatcher;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;

View File

@ -23,7 +23,7 @@
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:mate="http://mate.asfusion.com/"
title="{ResourceUtil.getInstance().getString('bbb.fileupload.title')}"
x="168" y="86" layout="absolute" width="600" height="200"
x="168" y="86" layout="absolute" width="600" height="200" styleName="presentationFileUploadWindowStyle"
initialize="initData();">
<mate:Dispatcher id="globalDispatch" />

View File

@ -61,7 +61,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function start():void {
trace("[" + me + "] Video Module Started.");
trace("VideoEventMapDelegate:: [" + me + "] Video Module Started.");
}
public function stop():void {
@ -69,17 +69,17 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function viewCamera(userID:String, stream:String, name:String, mock:Boolean = false):void {
trace("[" + me + "] viewCamera. ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] viewCamera. ready = [" + _ready + "]");
if (!_ready) return;
trace("[" + me + "] Viewing [" + userID + " stream [" + stream + "]");
trace("VideoEventMapDelegate:: [" + me + "] Viewing [" + userID + " stream [" + stream + "]");
if (! UserManager.getInstance().getConference().amIThisUser(userID)) {
openViewWindowFor(userID);
}
}
public function handleUserLeftEvent(event:UserLeftEvent):void {
trace("[" + me + "] handleUserLeftEvent. ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] handleUserLeftEvent. ready = [" + _ready + "]");
if (!_ready) return;
@ -87,7 +87,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function handleUserJoinedEvent(event:UserJoinedEvent):void {
trace("[" + me + "] handleUserJoinedEvent. ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] handleUserJoinedEvent. ready = [" + _ready + "]");
if (!_ready) return;
@ -111,38 +111,38 @@ package org.bigbluebutton.modules.videoconf.maps
}
private function openWebcamWindows():void {
trace("[" + me + "] openWebcamWindows:: ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindows:: ready = [" + _ready + "]");
var uids:ArrayCollection = UsersUtil.getUserIDs();
for (var i:int = 0; i < uids.length; i++) {
var u:String = uids.getItemAt(i) as String;
trace("[" + me + "] openWebcamWindows:: open window for = [" + u + "]");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindows:: open window for = [" + u + "]");
openWebcamWindowFor(u);
}
}
private function openWebcamWindowFor(userID:String):void {
trace("[" + me + "] openWebcamWindowFor:: open window for = [" + userID + "]");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: open window for = [" + userID + "]");
if (! UsersUtil.isMe(userID) && UsersUtil.hasWebcamStream(userID)) {
trace("[" + me + "] openWebcamWindowFor:: Not ME and user = [" + userID + "] is publishing.");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: Not ME and user = [" + userID + "] is publishing.");
if (webcamWindows.hasWindow(userID)) {
trace("[" + me + "] openWebcamWindowFor:: user = [" + userID + "] has a window open. Close it.");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: user = [" + userID + "] has a window open. Close it.");
closeWindow(userID);
}
trace("[" + me + "] openWebcamWindowFor:: View user's = [" + userID + "] webcam.");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: View user's = [" + userID + "] webcam.");
openViewWindowFor(userID);
} else {
if (UsersUtil.isMe(userID) && options.autoStart) {
trace("[" + me + "] openWebcamWindowFor:: It's ME and AutoStart. Start publishing.");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: It's ME and AutoStart. Start publishing.");
autoStart();
} else {
if (options.displayAvatar) {
trace("[" + me + "] openWebcamWindowFor:: It's NOT ME and NOT AutoStart. Open Avatar for user = [" + userID + "]");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: It's NOT ME and NOT AutoStart. Open Avatar for user = [" + userID + "]");
openAvatarWindowFor(userID);
} else {
trace("[" + me + "] openWebcamWindowFor:: Is THERE another option for user = [" + userID + "]");
trace("VideoEventMapDelegate:: [" + me + "] openWebcamWindowFor:: Is THERE another option for user = [" + userID + "]");
}
}
}
@ -153,12 +153,12 @@ package org.bigbluebutton.modules.videoconf.maps
window.userID = userID;
window.title = UsersUtil.getUserName(userID);
trace("[" + me + "] openAvatarWindowFor:: Closing window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] openAvatarWindowFor:: Closing window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
closeWindow(userID);
webcamWindows.addWindow(window);
trace("[" + me + "] openAvatarWindowFor:: Opening AVATAR window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] openAvatarWindowFor:: Opening AVATAR window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
openWindow(window);
dockWindow(window);
@ -175,12 +175,12 @@ package org.bigbluebutton.modules.videoconf.maps
publishWindow.resolutions = options.resolutions.split(",");
trace("[" + me + "] openPublishWindowFor:: Closing window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] openPublishWindowFor:: Closing window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
closeWindow(userID);
webcamWindows.addWindow(publishWindow);
trace("[" + me + "] openPublishWindowFor:: Opening PUBLISH window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] openPublishWindowFor:: Opening PUBLISH window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
openWindow(publishWindow);
dockWindow(publishWindow);
@ -188,24 +188,24 @@ package org.bigbluebutton.modules.videoconf.maps
private function closeWindow(userID:String):void {
if (! webcamWindows.hasWindow(userID)) {
trace("[" + me + "] closeWindow:: No window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] closeWindow:: No window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
return;
}
var win:VideoWindowItf = webcamWindows.removeWindow(userID);
if (win != null) {
trace("[" + me + "] closeWindow:: Closing [" + win.getWindowType() + "] for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] closeWindow:: Closing [" + win.getWindowType() + "] for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
win.close();
var cwe:CloseWindowEvent = new CloseWindowEvent();
cwe.window = win;
_dispatcher.dispatchEvent(cwe);
} else {
trace("[" + me + "] closeWindow:: Not Closing. No window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] closeWindow:: Not Closing. No window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
}
}
private function openViewWindowFor(userID:String):void {
trace("[" + me + "] openViewWindowFor:: Opening VIEW window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
trace("VideoEventMapDelegate:: [" + me + "] openViewWindowFor:: Opening VIEW window for [" + userID + "] [" + UsersUtil.getUserName(userID) + "]");
var window:VideoWindow = new VideoWindow();
window.userID = userID;
@ -242,7 +242,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function startPublishing(e:StartBroadcastEvent):void{
LogUtil.debug("[" + me + "] startPublishing:: Publishing stream to: " + proxy.connection.uri + "/" + e.stream);
LogUtil.debug("VideoEventMapDelegate:: [" + me + "] startPublishing:: Publishing stream to: " + proxy.connection.uri + "/" + e.stream);
streamName = e.stream;
proxy.startPublishing(e);
@ -260,7 +260,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function stopPublishing(e:StopBroadcastEvent):void{
trace("[" + me + "] Stop publishing. ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] Stop publishing. ready = [" + _ready + "]");
stopBroadcasting();
}
@ -280,7 +280,7 @@ package org.bigbluebutton.modules.videoconf.maps
closeWindow(UsersUtil.getMyUserID());
if (options.displayAvatar) {
trace("[" + me + "] Opening avatar");
trace("VideoEventMapDelegate:: [" + me + "] Opening avatar");
openAvatarWindowFor(UsersUtil.getMyUserID());
}
}
@ -317,7 +317,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function switchToPresenter(event:MadePresenterEvent):void{
trace("[" + me + "] Got Switch to presenter event. ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] Got Switch to presenter event. ready = [" + _ready + "]");
if (!_ready) return;
@ -327,7 +327,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function switchToViewer(event:MadePresenterEvent):void{
trace("[" + me + "] Got Switch to viewer event. ready = [" + _ready + "]");
trace("VideoEventMapDelegate:: [" + me + "] Got Switch to viewer event. ready = [" + _ready + "]");
if (!_ready) return;
@ -340,7 +340,7 @@ package org.bigbluebutton.modules.videoconf.maps
}
public function connectedToVideoApp():void{
trace("[" + me + "] Connected to video application.");
trace("VideoEventMapDelegate:: [" + me + "] Connected to video application.");
_ready = true;
addToolbarButton();
openWebcamWindows();
@ -365,7 +365,7 @@ package org.bigbluebutton.modules.videoconf.maps
closeWindow(event.webcamUserID);
if (options.displayAvatar) {
trace("[" + me + "] Opening avatar");
trace("VideoEventMapDelegate:: [" + me + "] Opening avatar");
openAvatarWindowFor(event.webcamUserID);
}
}

View File

@ -36,14 +36,14 @@
<mate:Listener type="{BBBEvent.USER_VOICE_MUTED}" method="handleUserVoiceMutedEvent" />
<mate:Listener type="{EventConstants.USER_TALKING}" method="handleUserTalkingEvent" />
<mate:Listener type="{EventConstants.SWITCHED_PRESENTER}" method="handleNewRoleEvent" />
<mate:Listener type="{SwitchedPresenterEvent.SWITCHED_PRESENTER}" method="handleNewRoleEvent" />
<mate:Listener type="{CloseAllWindowsEvent.CLOSE_ALL_WINDOWS}" method="closeWindow" />
<mx:Script>
<![CDATA[
import flexlib.mdi.events.MDIWindowEvent;
import flexlib.mdi.events.MDIWindowEvent;
import mx.core.UIComponent;
import mx.events.ResizeEvent;
import mx.events.ResizeEvent;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
@ -52,8 +52,10 @@
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.core.events.SwitchedLayoutEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.videoconf.business.TalkingButtonOverlay;
import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent;
@ -81,8 +83,7 @@
loader = new Loader();
request = new URLRequest(UsersUtil.getAvatarURL());
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete);
loader.load(request);
loader.load(request);
}
private function onLoadingComplete(event:Event):void {
@ -129,8 +130,8 @@
}
}
private function handleNewRoleEvent(event:CoreEvent):void {
switchRole(event.message.role == Role.PRESENTER)
private function handleNewRoleEvent(event:SwitchedPresenterEvent):void {
switchRole(event.amIPresenter);
}
private function handleUserVoiceMutedEvent(event:BBBEvent):void {

View File

@ -36,7 +36,7 @@
<mate:Listener type="{BBBEvent.USER_VOICE_MUTED}" method="handleUserVoiceMutedEvent" />
<mate:Listener type="{EventConstants.USER_TALKING}" method="handleUserTalkingEvent" />
<mate:Listener type="{EventConstants.SWITCHED_PRESENTER}" method="handleNewRoleEvent" />
<mate:Listener type="{SwitchedPresenterEvent.SWITCHED_PRESENTER}" method="handleNewRoleEvent" />
<mate:Listener type="{CloseAllWindowsEvent.CLOSE_ALL_WINDOWS}" method="closeWindow" />
<mx:Script>
@ -56,6 +56,7 @@
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.videoconf.business.TalkingButtonOverlay;
import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent;
@ -124,8 +125,8 @@
autoPublishTimer.stop();
}
private function handleNewRoleEvent(event:CoreEvent):void {
switchRole(event.message.role == Role.PRESENTER)
private function handleNewRoleEvent(event:SwitchedPresenterEvent):void {
switchRole(event.amIPresenter)
}
private function handleUserVoiceMutedEvent(event:BBBEvent):void {

View File

@ -33,14 +33,17 @@
<mate:Listener type="{BBBEvent.USER_VOICE_MUTED}" method="handleUserVoiceMutedEvent" />
<mate:Listener type="{EventConstants.USER_TALKING}" method="handleUserTalkingEvent" />
<mate:Listener type="{EventConstants.SWITCHED_PRESENTER}" method="handleNewRoleEvent" />
<mate:Listener type="{SwitchedPresenterEvent.SWITCHED_PRESENTER}" method="handleNewRoleEvent" />
<mate:Listener type="{CloseAllWindowsEvent.CLOSE_ALL_WINDOWS}" method="closeWindow" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import flexlib.mdi.events.MDIWindowEvent;
import mx.core.UIComponent;
import com.asfusion.mate.events.Dispatcher;
import flexlib.mdi.events.MDIWindowEvent;
import mx.core.UIComponent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.common.events.CloseWindowEvent;
@ -48,6 +51,7 @@
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.StoppedViewingWebcamEvent;
import org.bigbluebutton.main.events.SwitchedPresenterEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.videoconf.business.TalkingButtonOverlay;
import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent;
@ -103,8 +107,8 @@
this.showCloseButton = videoOptions.showCloseButton;
}
private function handleNewRoleEvent(event:CoreEvent):void {
switchRole(event.message.role == Role.PRESENTER)
private function handleNewRoleEvent(event:SwitchedPresenterEvent):void {
switchRole(event.amIPresenter)
}
private function handleUserVoiceMutedEvent(event:BBBEvent):void {