Skip to content

Commit

Permalink
fixed: flashing notification and the viewer back from the full screen…
Browse files Browse the repository at this point in the history
… don't see the presenter view port.
  • Loading branch information
chhtrao committed Feb 11, 2011
1 parent 4fa4d63 commit d29e84c
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface IPresentationRoomListener {
public void sharePresentation(String presentationName, Boolean share);

// use to share the presenter view port to fix the problem with enabling presentation window full screen
public void shareUpdatePresenterViewDimension(Double topLeftX, Double topLeftY, Double bottomRightx, Double bottomRightY);
public void shareUpdatePresenterViewDimension(Double curSlideWidth, Double curSlideHeight, Double viewPortWidth, Double viewPortHeight);
public void setFullScreen(boolean status);

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ public class PresentationRoom {
Double heightRatio = 0D;
ArrayList<String> presentationNames = new ArrayList<String>();
private boolean _isFullScreen = false ;
private Double topLeftX = 0D;
private Double topLeftY = 0D;
private Double bottomRightX = 0D;
private Double bottomRightY = 0D;
private Double curSlideWidth = 0D;
private Double curSlideHeight = 0D;
private Double viewPortWidth = 0D;
private Double viewPortHeight = 0D;

public PresentationRoom(String name) {
this.name = name;
Expand Down Expand Up @@ -330,25 +330,25 @@ public Double getHeightRatio() {
;
******************************************************************************/
public void setCurrentPresentationPosition(Double curSlideWidth, Double curSlideHeight, Double viewPortWidth, Double viewPortHeight){
this.topLeftX = curSlideWidth ;
this.topLeftY = curSlideHeight ;
this.bottomRightX = viewPortWidth ;
this.bottomRightY = viewPortHeight ;
this.curSlideWidth = curSlideWidth ;
this.curSlideHeight = curSlideHeight ;
this.viewPortWidth = viewPortWidth ;
this.viewPortHeight = viewPortHeight ;

log.debug("Update Dimension");
log.debug("topLeftX {}",curSlideWidth);
log.debug("topLeftY {}",curSlideHeight);
log.debug("bottomRightX {}",viewPortWidth);
log.debug("bottomRightY {}",viewPortHeight);
log.debug("curSlideWidth {}",curSlideWidth);
log.debug("curSlideHeight {}",curSlideHeight);
log.debug("viewPortWidth {}",viewPortWidth);
log.debug("viewPortHeight {}",viewPortHeight);
}
/** END Function : setCurrentPresentationPosition **/

public ArrayList<Double> getCurrentPresenterPosition(){
ArrayList<Double> curDimension = new ArrayList<Double>();
curDimension.add(this.topLeftX) ;
curDimension.add(this.topLeftY) ;
curDimension.add(this.bottomRightX) ;
curDimension.add(this.bottomRightY) ;
curDimension.add(this.curSlideWidth) ;
curDimension.add(this.curSlideHeight) ;
curDimension.add(this.viewPortWidth) ;
curDimension.add(this.viewPortHeight) ;

return curDimension ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ public void shareUpdatePresenterViewDimension(Double curSlideWidth,Double curSli
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to call the 'setFullScreen' from the presentationApplication
; to set the presener's presentation window status.
; to set the presenter's presentation window status.
;
; RETURNS
;
; INTERFACE NOTES
; INPUT
; isFullScreen : the presener's presentation window status.
; isFullScreen : the presenter's presentation window status.
;
; IMPLEMENTATION
;
Expand All @@ -205,14 +205,14 @@ public void setFullScreen(boolean isFullScreen){
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to call the 'getFullScreenStatus' from the presentationApplication
; to get the presener's presentation window status.
; to get the presenter's presentation window status.
;
; RETURNS
; the presener's presentation window status
; the presenter's presentation window status
;
; INTERFACE NOTES
; INPUT
; isFullScreen : the presener's presentation window status.
; isFullScreen : the presenter's presentation window status.
;
; IMPLEMENTATION
;
Expand All @@ -233,10 +233,10 @@ public boolean getFullScreenStatus(){
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to call the 'setCurrentPresentationPosition' from the presentationApplication
; to set the presener's view port information.
; to set the presenter's view port information.
;
; RETURNS
; the presener's view port information
; the presenter's view port information
;
; INTERFACE NOTES
; INPUT
Expand Down Expand Up @@ -269,10 +269,10 @@ public void setCurrentPresentationPosition(Double curSlideWidth, Double curSlide
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to call the 'getCurrentPresenterPosition' from the presentationApplication
; to get the presener's view port information.
; to get the presenter's view port information.
;
; RETURNS
; the presener's view port information
; the presenter's view port information
;
; INTERFACE NOTES
; INPUT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ package org.bigbluebutton.main.model.users
newuser.me = true;
}

//check the join status, only joined user can see notification
if ( true == joinedStatus ){
// user joined
if (true == ExternalInterface.available)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@
private var _gWindow:TitleWindow;
private var gTimRaiseHand:Timer;
private var gTimChat:Timer;
private var gTimNewUser:Timer;
private const TIMER_INTERVAL:int = 1000;
private const NOTIFY_DURATION:int = 20;
private var gNotifyChatNum:Number = 0;
private var gNotifyRaiseNum:Number = 0;
private var gIsPresentationFullScr:Boolean = false;
private var gIsEnableChatNotification:Boolean = true;
private var gNotifyNewUserNum:Number = 0;
private var gTimNewUser:Timer;
private var gHBoxNotification:HBox;
private var globalDispatcher:Dispatcher;
Expand Down Expand Up @@ -500,69 +499,30 @@
// check 'gTimChat' Timer and stop if it's starting.
gTimChat.stop();
PopUpManager.removePopUp(_gWindow);
gNotifyChatNum = 0;
}
if ( null != gTimNewUser )
{
// new user notification running, stop it.
gTimNewUser.stop();
PopUpManager.removePopUp(_gWindow);
gNotifyNewUserNum = 0;
}
// initialize chat notification window
showWindow(lSender,lMessage);
_gWindow.visible = false;
// initialize Timer and start to blink chat notification
gTimChat = new Timer(TIMER_INTERVAL);
gTimChat.addEventListener(TimerEvent.TIMER, blinkChatNotification);
gTimChat = new Timer(TIMER_INTERVAL, NOTIFY_DURATION);
gTimChat.addEventListener(TimerEvent.TIMER, function(evt:TimerEvent):void{
gHBoxNotification.visible = !gHBoxNotification.visible;
}
);
gTimChat.start();
}
/*
* END: handleNewChat
*/
/*****************************************************************************
; blinkChatNotification
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to call by Timer to display chat notification.
;
; RETURNS : N/A
;
; INTERFACE NOTES
; INPUT
; evt : TimerEvent object.
;
; IMPLEMENTATION
;
; HISTORY
; __date__ : PTS:
; 2010.12.06 problem 731
;
******************************************************************************/
private function blinkChatNotification(evt:TimerEvent):void
{
// determine the timer step 'equal to NOTIFY_DURATION'
if (NOTIFY_DURATION == gNotifyChatNum)
{
// hide notification window.
_gWindow.visible = false;
if ( null != gTimChat ){
gTimChat.stop();
}
gNotifyChatNum = 0;
return;
}
_gWindow.visible = !_gWindow.visible;
gNotifyChatNum += 1;
}
/*
* END: blinkChatNotification
*/
/*****************************************************************************
; showWindow
;----------------------------------------------------------------------------
Expand All @@ -588,6 +548,7 @@
var lblChatNotificaton:Label = new Label;
var lNotificationMsg:String = lName + " : " + lMessage;
gHBoxNotification = new HBox;
// determine the message length is > 25 character
if ( 25 < lNotificationMsg.length )
Expand All @@ -596,18 +557,23 @@
lNotificationMsg = lNotificationMsg.substring(0,25) + "....";
}
lblChatNotificaton.text = lNotificationMsg;
gHBoxNotification.addChild(lblChatNotificaton);
// initialize and add message to notification window.
_gWindow = TitleWindow(PopUpManager.createPopUp(this, TitleWindow));
_gWindow.addChild(lblChatNotificaton);
_gWindow.width = 200;
_gWindow.title = 'New Chat';
_gWindow.addChild(gHBoxNotification);
_gWindow.width = 200;
_gWindow.horizontalScrollPolicy="off";
// set position
_gWindow.x = mdiCanvas.width - _gWindow.width;
_gWindow.y = mdiCanvas.height - _gWindow.height + 15;
_gWindow.showCloseButton = true;
_gWindow.addEventListener(CloseEvent.CLOSE, closeHandler);
_gWindow.addEventListener(CloseEvent.CLOSE, function(evt:CloseEvent):void{
PopUpManager.removePopUp(_gWindow);
}
);
}
/*
* END: showWindow
Expand Down Expand Up @@ -639,26 +605,30 @@
// initialize controls to add to notification window
var imgUserIcon:Image = new Image;
var lblNotificationText:Label = new Label;
var hBox:HBox = new HBox;
gHBoxNotification = new HBox;
imgUserIcon.source = userIcon;
lblNotificationText.text= lUname + " : joined";
lblNotificationText.width = 150;
hBox.addChild(imgUserIcon);
hBox.addChild(lblNotificationText);
gHBoxNotification.addChild(imgUserIcon);
gHBoxNotification.addChild(lblNotificationText);
// initialize and add controls to notification window.
_gWindow = TitleWindow(PopUpManager.createPopUp(this, TitleWindow));
_gWindow.addChild(hBox);
_gWindow.title = 'Notification';
_gWindow.addChild(gHBoxNotification);
_gWindow.width = 200;
_gWindow.horizontalScrollPolicy="off";
// set position
_gWindow.x = mdiCanvas.width - _gWindow.width;
_gWindow.y = mdiCanvas.height - _gWindow.height + 15;
_gWindow.showCloseButton = true;
_gWindow.addEventListener(CloseEvent.CLOSE, closeHandler);
_gWindow.addEventListener(CloseEvent.CLOSE, function(evt:CloseEvent):void{
PopUpManager.removePopUp(_gWindow);
}
);
}
/*
* END: createNewUserNotificationWindow
Expand Down Expand Up @@ -721,69 +691,28 @@
if ( null != gTimChat ){
// stop 'gTimChat' timer.
gTimChat.stop();
gNotifyChatNum = 0;
PopUpManager.removePopUp(_gWindow);
}
if ( null != gTimNewUser ){
// timer already running
gTimNewUser.stop();
gNotifyNewUserNum = 0;
PopUpManager.removePopUp(_gWindow);
}
// create notification window
createNewUserNotificationWindow(lUname);
// initialize and start time
gTimNewUser = new Timer(TIMER_INTERVAL);
gTimNewUser.addEventListener(TimerEvent.TIMER, blinkNewUserNotification);
gTimNewUser = new Timer(TIMER_INTERVAL, NOTIFY_DURATION);
gTimNewUser.addEventListener(TimerEvent.TIMER, function(evt:TimerEvent):void{
gHBoxNotification.visible = !gHBoxNotification.visible;
}
);
gTimNewUser.start();
}
/*
* END: handleNewUser
*/
/*****************************************************************************
; blinkNewUserNotification
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to call by Timer to display new participant
; joined notification while presentation window in full screen mode.
;
; RETURNS : N/A
;
; INTERFACE NOTES
; INPUT
; evt: TimerEvent object
; IMPLEMENTATION
;
; HISTORY
; __date__ : PTS: Description
; 2010.12.16 new participant joined notification
;
******************************************************************************/
private function blinkNewUserNotification(evt:TimerEvent) : void{
// Determine the timer step
if (NOTIFY_DURATION == gNotifyNewUserNum)
{
_gWindow.visible = false;
// remove notification window
PopUpManager.removePopUp(_gWindow);
// stop timer
if ( null != gTimNewUser ){
gTimNewUser.stop();
}
gNotifyNewUserNum = 0;
return;
}
_gWindow.visible = !_gWindow.visible;
gNotifyNewUserNum += 1;
}
/*
* END: blinkNewUserNotification
*/
]]>
</mx:Script>

Expand Down
Loading

0 comments on commit d29e84c

Please sign in to comment.