- continue refactoring presentation on client
This commit is contained in:
parent
10b4b6ee3a
commit
fe30c034d8
@ -207,7 +207,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{BBBEvent.LOGIN_EVENT}" method="handleLoginEvent"/>
|
||||
<mate:Listener type="{BBBEvent.RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT}" method="handleReceivedPublicChatMessageEvent"/>
|
||||
<mate:Listener type="{BBBEvent.USER_VOICE_JOINED}" method="handleAddedListenerEvent"/>
|
||||
<mate:Listener type="{BBBEvent.PRESENTATION_CONVERTED}" method="handlePresentationConversion"/>
|
||||
<mate:Listener type="{BBBEvent.VIDEO_STARTED}" method="videoHasStarted"/>
|
||||
|
||||
</mx:Application>
|
||||
|
@ -22,7 +22,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
implements="org.bigbluebutton.common.IBigBlueButtonModule"
|
||||
creationComplete="onCreationComplete()" xmlns:maps="org.bigbluebutton.modules.present.maps.*">
|
||||
creationComplete="onCreationComplete()"
|
||||
xmlns:maps="org.bigbluebutton.modules.present.maps.*"
|
||||
xmlns:maps="org.bigbluebutton.modules.present.ui.views.maps.*">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
@ -98,4 +100,5 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
</mx:Script>
|
||||
|
||||
<maps:PresentEventMap id="eventMap" />
|
||||
<viewMaps:PresentationViewMap id="viewMap"/>
|
||||
</mx:Module>
|
||||
|
@ -41,7 +41,6 @@ package org.bigbluebutton.main.api
|
||||
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
|
||||
import org.bigbluebutton.modules.phone.events.CallConnectedEvent;
|
||||
import org.bigbluebutton.modules.phone.events.CallDisconnectedEvent;
|
||||
import org.bigbluebutton.modules.present.events.QueryPresentationsListEvent;
|
||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.ClosePublishWindowEvent;
|
||||
@ -107,10 +106,11 @@ package org.bigbluebutton.main.api
|
||||
}
|
||||
|
||||
private function handleQueryListsOfPresentationsRequest():void {
|
||||
_dispatcher.dispatchEvent(new QueryPresentationsListEvent());
|
||||
trace(LOG + "TODO - handleQueryListsOfPresentationsRequest");
|
||||
|
||||
//_dispatcher.dispatchEvent(new QueryPresentationsListEvent());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function handleDisplayPresentationRequest(presentationID:String):void {
|
||||
var readyEvent:UploadEvent = new UploadEvent(UploadEvent.PRESENTATION_READY);
|
||||
readyEvent.presentationName = presentationID;
|
||||
|
@ -41,7 +41,6 @@ package org.bigbluebutton.main.api
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
|
||||
import org.bigbluebutton.modules.present.events.QueryListOfPresentationsReplyEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
|
||||
|
||||
@ -391,12 +390,12 @@ package org.bigbluebutton.main.api
|
||||
broadcastEvent(payload);
|
||||
}
|
||||
|
||||
public function handleQueryListOfPresentationsReplyEvent(event:QueryListOfPresentationsReplyEvent):void {
|
||||
var payload:Object = new Object();
|
||||
payload.eventName = EventConstants.QUERY_PRESENTATION_REPLY;
|
||||
payload.presentations = event.presentations;
|
||||
broadcastEvent(payload);
|
||||
}
|
||||
// public function handleQueryListOfPresentationsReplyEvent(event:QueryListOfPresentationsReplyEvent):void {
|
||||
// var payload:Object = new Object();
|
||||
// payload.eventName = EventConstants.QUERY_PRESENTATION_REPLY;
|
||||
// payload.presentations = event.presentations;
|
||||
// broadcastEvent(payload);
|
||||
// }
|
||||
|
||||
private function broadcastEvent(message:Object):void {
|
||||
if (ExternalInterface.available) {
|
||||
|
@ -38,7 +38,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
|
||||
import org.bigbluebutton.modules.present.events.QueryListOfPresentationsReplyEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
]]>
|
||||
</mx:Script>
|
||||
@ -172,7 +171,4 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<MethodInvoker generator="{ExternalApiCalls}" method="handleConvertUpdate" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{QueryListOfPresentationsReplyEvent.QUERY_LIST_OF_PRESENTATIONS_REPLY}" >
|
||||
<MethodInvoker generator="{ExternalApiCalls}" method="handleQueryListOfPresentationsReplyEvent" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
</EventMap>
|
||||
|
@ -26,7 +26,6 @@ package org.bigbluebutton.main.events {
|
||||
public static const RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT:String = 'RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT';
|
||||
public static const SEND_PUBLIC_CHAT_MESSAGE_EVENT:String = 'SEND_PUBLIC_CHAT_MESSAGE_EVENT';
|
||||
public static const JOIN_VOICE_CONFERENCE:String = 'BBB_JOIN_VOICE_CONFERENCE';
|
||||
public static const PRESENTATION_CONVERTED:String = 'BBB_PRESENTATION_CONVERTED';
|
||||
public static const START_VIDEO_CONNECTION:String = 'BBB_START_VIDEO_CONNECTION';
|
||||
public static const START_VIDEO_STREAM:String = 'BBB_START_VIDEO_STREAM';
|
||||
public static const VIDEO_STARTED:String = 'BBB_VIDEO_STARTED';
|
||||
|
@ -26,10 +26,6 @@
|
||||
<InlineInvoker method="{MonitoringModule.handleAddedListenerEvent}" arguments="{[event]}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{BBBEvent.PRESENTATION_CONVERTED}" >
|
||||
<InlineInvoker method="{MonitoringModule.handlePresentationConversion}" arguments="{[event]}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{BBBEvent.VIDEO_STARTED}" >
|
||||
<InlineInvoker method="{MonitoringModule.videoHasStarted}" arguments="{[event]}" />
|
||||
</EventHandlers>
|
||||
|
@ -32,7 +32,6 @@ package org.bigbluebutton.modules.present.business
|
||||
import org.bigbluebutton.modules.present.events.PresentModuleEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.SlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.managers.PresentationSlides;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
@ -93,36 +92,7 @@ package org.bigbluebutton.modules.present.business
|
||||
public function gotoSlide(e:PresenterCommands):void{
|
||||
sender.gotoSlide(e.slideNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current slide number from the server, then loads the page on the local client
|
||||
* @param e
|
||||
*
|
||||
*/
|
||||
public function loadCurrentSlideLocally(e:SlideEvent):void{
|
||||
getCurrentSlideNumber();
|
||||
}
|
||||
|
||||
public function getCurrentSlideNumber():void {
|
||||
trace("PresentPoxy: getCurrentSlideNumber DISABLED!!!]");
|
||||
|
||||
return;
|
||||
/*
|
||||
var curPage:Page = presentationModel.getCurrentPage();
|
||||
if (curPage != null) {
|
||||
if (curPage.num >= 0) {
|
||||
var e:NavigationEvent = new NavigationEvent(NavigationEvent.GOTO_PAGE)
|
||||
trace("PresentPoxy: getCurrentSlideNumber [" + curPage.num + "]");
|
||||
e.pageNumber = curPage.num;
|
||||
var dispatcher:Dispatcher = new Dispatcher();
|
||||
dispatcher.dispatchEvent(e);
|
||||
}
|
||||
} else {
|
||||
trace("PresentPoxy: getCurrentSlideNumber [No Current Page]");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Loads a presentation from the server. creates a new PresentationService class
|
||||
*
|
||||
|
@ -18,15 +18,12 @@
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.business
|
||||
{
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
import flash.events.*;
|
||||
import flash.net.URLLoader;
|
||||
import flash.net.URLRequest;
|
||||
|
||||
import flash.net.URLRequest;
|
||||
import mx.rpc.IResponder;
|
||||
import mx.rpc.http.HTTPService;
|
||||
|
||||
import mx.rpc.http.HTTPService;
|
||||
import org.bigbluebutton.modules.present.events.PresentationEvent;
|
||||
import org.bigbluebutton.modules.present.managers.PresentationSlides;
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
@ -41,8 +38,7 @@ package org.bigbluebutton.modules.present.business
|
||||
* @author dev_team@bigbluebutton.org
|
||||
*
|
||||
*/
|
||||
public class PresentationService implements IResponder
|
||||
{
|
||||
public class PresentationService implements IResponder {
|
||||
private var service : HTTPService;
|
||||
private var _slides:PresentationSlides;
|
||||
private var urlLoader:URLLoader;
|
||||
@ -50,8 +46,7 @@ package org.bigbluebutton.modules.present.business
|
||||
private var dispatcher:Dispatcher;
|
||||
|
||||
|
||||
public function PresentationService()
|
||||
{
|
||||
public function PresentationService() {
|
||||
service = new HTTPService();
|
||||
|
||||
dispatcher = new Dispatcher();
|
||||
@ -62,28 +57,26 @@ package org.bigbluebutton.modules.present.business
|
||||
* @param url
|
||||
*
|
||||
*/
|
||||
public function load(url:String, slides:PresentationSlides, slideUri:String) : void
|
||||
{
|
||||
public function load(url:String, slides:PresentationSlides, slideUri:String):void {
|
||||
_slides = slides;
|
||||
this.slideUri = slideUri;
|
||||
service.url = url;
|
||||
urlLoader = new URLLoader();
|
||||
urlLoader.addEventListener(Event.COMPLETE, handleComplete);
|
||||
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, handleIOErrorEvent);
|
||||
urlLoader.load(new URLRequest(url));
|
||||
|
||||
urlLoader.load(new URLRequest(url));
|
||||
}
|
||||
|
||||
private function handleComplete(e:Event):void{
|
||||
private function handleComplete(e:Event):void {
|
||||
LogUtil.debug("Loading complete");
|
||||
parse(new XML(e.target.data));
|
||||
}
|
||||
|
||||
private function handleIOErrorEvent(e:IOErrorEvent):void{
|
||||
private function handleIOErrorEvent(e:IOErrorEvent):void {
|
||||
LogUtil.error(e.toString());
|
||||
}
|
||||
|
||||
public function parse(xml:XML):void{
|
||||
public function parse(xml:XML):void {
|
||||
var list:XMLList = xml.presentation.slides.slide;
|
||||
var item:XML;
|
||||
LogUtil.debug("Slides: " + xml);
|
||||
@ -120,8 +113,7 @@ package org.bigbluebutton.modules.present.business
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
public function result(event : Object):void
|
||||
{
|
||||
public function result(event : Object):void {
|
||||
var xml:XML = new XML(event.result);
|
||||
var list:XMLList = xml.presentations;
|
||||
var item:XML;
|
||||
@ -138,8 +130,7 @@ package org.bigbluebutton.modules.present.business
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
public function fault(event : Object):void
|
||||
{
|
||||
public function fault(event : Object):void {
|
||||
LogUtil.debug("Got fault [" + event.fault.toString() + "]");
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,14 @@ package org.bigbluebutton.modules.present.commands
|
||||
|
||||
public class ChangePageCommand extends Event
|
||||
{
|
||||
public function ChangePageCommand(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
|
||||
public static const CHANGE_PAGE_COMMAND:String = "presentation change page command";
|
||||
|
||||
public var pageId:String;
|
||||
|
||||
public function ChangePageCommand(pageId: String)
|
||||
{
|
||||
super(type, bubbles, cancelable);
|
||||
super(CHANGE_PAGE_COMMAND, true, false);
|
||||
this.pageId = pageId;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
import flexlib.containers.DockableToolBar;
|
||||
|
||||
public class AddPresentationToolbarEvent extends Event
|
||||
{
|
||||
public static const ADD_TOOLBAR:String = "ADD_TOOLBAR";
|
||||
|
||||
public var toolbar:DockableToolBar;
|
||||
|
||||
public function AddPresentationToolbarEvent(type:String)
|
||||
{
|
||||
super(type, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class MoveEvent extends Event
|
||||
{
|
||||
public static const MOVE:String = "MOVE_SLIDE";
|
||||
public static const CUR_SLIDE_SETTING:String = "CUR_SLIDE_SETTING";
|
||||
|
||||
public var xOffset:Number;
|
||||
public var yOffset:Number;
|
||||
|
||||
public var slideToCanvasWidthRatio:Number;
|
||||
public var slideToCanvasHeightRatio:Number;
|
||||
|
||||
public function MoveEvent(type:String)
|
||||
{
|
||||
super(type, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class PageLoadedEvent extends Event
|
||||
{
|
||||
public static const PAGE_LOADED_EVENT:String = "presentation page loaded event";
|
||||
|
||||
public var pageId: String;
|
||||
|
||||
public function PageLoadedEvent(pageId: String)
|
||||
{
|
||||
super(PAGE_LOADED_EVENT, true, false);
|
||||
this.pageId = pageId;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class PresentationReadyEvent extends Event
|
||||
{
|
||||
public static const READY_EVENT:String = "presentation ready event";
|
||||
|
||||
public var presId: String;
|
||||
|
||||
public function PresentationReadyEvent(presId: String)
|
||||
{
|
||||
super(READY_EVENT, true, false);
|
||||
this.presId = presId;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
public class QueryListOfPresentationsReplyEvent extends Event
|
||||
{
|
||||
public static const QUERY_LIST_OF_PRESENTATIONS_REPLY:String = "query list of presentations reply";
|
||||
|
||||
public var presentations:Array;
|
||||
|
||||
public function QueryListOfPresentationsReplyEvent()
|
||||
{
|
||||
super(QUERY_LIST_OF_PRESENTATIONS_REPLY, true, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class QueryPresentationsListEvent extends Event
|
||||
{
|
||||
|
||||
public static const QUERY_PRESENTATIONS_LIST:String = "queryPresentationsListEvent";
|
||||
|
||||
public function QueryPresentationsListEvent()
|
||||
{
|
||||
super(QUERY_PRESENTATIONS_LIST, true, false);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
import flash.events.Event;
|
||||
import flash.utils.ByteArray;
|
||||
|
||||
public class SlideEvent extends Event
|
||||
{
|
||||
public static const SLIDE_LOADED:String = "Slide Loaded";
|
||||
public static const LOAD_CURRENT_SLIDE:String = "Load Current Slide";
|
||||
|
||||
public var slideNumber:Number;
|
||||
public var slide:ByteArray;
|
||||
public var slideText:String;
|
||||
public var page:Slide;
|
||||
|
||||
public function SlideEvent(type:String)
|
||||
{
|
||||
super(type, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class SlideResizedEvent extends Event
|
||||
{
|
||||
public static const SLIDE_RESIZED_EVENT:String = "SLIDE RESIZED EVENT";
|
||||
|
||||
public var percent:Number = 100;
|
||||
|
||||
public function SlideResizedEvent()
|
||||
{
|
||||
super(SLIDE_RESIZED_EVENT, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
/**
|
||||
* Several events relating to zooming the slides in an out. Note that the difference betweeen the ZOOM event and the RESIZE event. The ZOOM event increases or decreases
|
||||
* the zoom value of the slide in increments, while the RESIZE event updates the zoom value of the slide in terms of the original value. So for example, a ZOOM event
|
||||
* might send the message to increase the size of the slide by 10% of it's current value, while RESIZE would send a message to enlarge the slide to 300% of it's default
|
||||
* size.
|
||||
* @author Denis
|
||||
*
|
||||
*/
|
||||
public class ZoomEvent extends Event
|
||||
{
|
||||
public static const ZOOM:String = "ZOOM";
|
||||
public static const MAXIMIZE:String = "MAXIMIZE";
|
||||
public static const RESTORE:String = "RESTORE";
|
||||
public static const RESIZE:String = "RESIZE";
|
||||
|
||||
public var zoomPercentage:Number;
|
||||
|
||||
public var xOffset:Number;
|
||||
public var yOffset:Number;
|
||||
|
||||
public var slideToCanvasWidthRatio:Number;
|
||||
public var slideToCanvasHeightRatio:Number;
|
||||
|
||||
public function ZoomEvent(type:String)
|
||||
{
|
||||
super(type, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -22,11 +22,9 @@ package org.bigbluebutton.modules.present.managers
|
||||
|
||||
import flash.display.DisplayObject;
|
||||
import flash.geom.Point;
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.core.*;
|
||||
import mx.managers.PopUpManager;
|
||||
|
||||
import org.bigbluebutton.common.IBbbModuleWindow;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.events.OpenWindowEvent;
|
||||
@ -35,7 +33,6 @@ package org.bigbluebutton.modules.present.managers
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentModuleEvent;
|
||||
import org.bigbluebutton.modules.present.events.QueryListOfPresentationsReplyEvent;
|
||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.present.managers
|
||||
{
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import flash.utils.ByteArray;
|
||||
|
||||
import org.bigbluebutton.modules.present.events.SlideEvent;
|
||||
|
||||
public class SlideManager
|
||||
{
|
||||
private var slides:Object;
|
||||
private var dispatcher:Dispatcher;
|
||||
|
||||
public function SlideManager()
|
||||
{
|
||||
slides = new Object();
|
||||
dispatcher = new Dispatcher();
|
||||
}
|
||||
|
||||
public function load(slide:Slide):void {
|
||||
if (slide == null) return;
|
||||
|
||||
slides[slide.slideNumber] = slide;
|
||||
slide.load(slideLoadListener);
|
||||
}
|
||||
|
||||
public function clear():void {
|
||||
slides = null;
|
||||
slides = new Object();
|
||||
}
|
||||
|
||||
private function slideLoadListener(slideNum:Number, slide:ByteArray, slideText:String):void {
|
||||
var e:SlideEvent = new SlideEvent(SlideEvent.SLIDE_LOADED);
|
||||
e.slide = slide;
|
||||
e.slideText = slideText;
|
||||
e.slideNumber = slideNum;
|
||||
e.page = slides[slideNum];
|
||||
dispatcher.dispatchEvent(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -27,15 +27,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
|
||||
import org.bigbluebutton.modules.present.api.PresentationAPI;
|
||||
import org.bigbluebutton.modules.present.business.PresentProxy;
|
||||
import org.bigbluebutton.modules.present.commands.ChangePageCommand;
|
||||
import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentModuleEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.QueryPresentationsListEvent;
|
||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.SlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.managers.PresentManager;
|
||||
import org.bigbluebutton.modules.present.services.PageLoaderService;
|
||||
import org.bigbluebutton.modules.present.ui.views.PresentationWindow;
|
||||
import org.bigbluebutton.modules.whiteboard.events.GetCurrentPresentationInfo;
|
||||
|
||||
@ -106,18 +107,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<MethodInvoker generator="{PresentProxy}" method="resizeSlide" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{UploadEvent.PRESENTATION_READY}" >
|
||||
<MethodInvoker generator="{PresentProxy}" method="loadPresentation" arguments="{event}" />
|
||||
<EventHandlers type="{ChangePageCommand.CHANGE_PAGE_COMMAND}" >
|
||||
<MethodInvoker generator="{PageLoaderService}" method="loadPage" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{RemovePresentationEvent.REMOVE_PRESENTATION_EVENT}">
|
||||
<MethodInvoker generator="{PresentProxy}" method="removePresentation" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{QueryPresentationsListEvent.QUERY_PRESENTATIONS_LIST}">
|
||||
<MethodInvoker generator="{PresentManager}" method="queryPresentations"/>
|
||||
</EventHandlers>
|
||||
|
||||
|
||||
<EventHandlers type="{RemovePresentationEvent.PRESENTATION_REMOVED_EVENT}">
|
||||
<MethodInvoker generator="{PresentManager}" method="removePresentation" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
@ -125,11 +122,5 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<EventHandlers type="{UploadEvent.CONVERT_SUCCESS}">
|
||||
<MethodInvoker generator="{PresentManager}" method="updatePresentationNames" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{SlideEvent.LOAD_CURRENT_SLIDE}" >
|
||||
<MethodInvoker generator="{PresentProxy}" method="loadCurrentSlideLocally" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
|
||||
|
||||
</EventMap>
|
||||
|
@ -5,13 +5,14 @@ package org.bigbluebutton.modules.present.model
|
||||
public class Presentation {
|
||||
private var _id:String;
|
||||
private var _name:String;
|
||||
private var _current:Boolean = false;
|
||||
private var _pages:ArrayCollection;
|
||||
|
||||
|
||||
public var current:Boolean = false;
|
||||
|
||||
public function Presentation(id: String, name: String, current: Boolean, pages: ArrayCollection) {
|
||||
_id = id;
|
||||
_name = name;
|
||||
_current = current;
|
||||
this.current = current;
|
||||
_pages = pages
|
||||
}
|
||||
|
||||
@ -22,9 +23,17 @@ package org.bigbluebutton.modules.present.model
|
||||
public function get name():String {
|
||||
return _name;
|
||||
}
|
||||
|
||||
public function isCurrent():Boolean {
|
||||
return _current;
|
||||
|
||||
|
||||
public function getCurrentPage():Page {
|
||||
for (var i: int = 0; i < _pages.length; i++) {
|
||||
var p: Page = _pages.getItemAt(i) as Page;
|
||||
if (p.current) {
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getPage(pageId:String):Page {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.bigbluebutton.modules.present.model
|
||||
{
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.Presentation;
|
||||
|
||||
@ -56,7 +57,7 @@ package org.bigbluebutton.modules.present.model
|
||||
public function getCurrentPresentationName():String {
|
||||
for (var i:int = 0; i < _presentations.length; i++) {
|
||||
var pres: Presentation = _presentations.getItemAt(i) as Presentation;
|
||||
if (pres.isCurrent()) return pres.id;
|
||||
if (pres.current) return pres.id;
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -76,12 +77,20 @@ package org.bigbluebutton.modules.present.model
|
||||
public function getCurrentPresentation():Presentation {
|
||||
for (var i:int = 0; i < _presentations.length; i++) {
|
||||
var pres: Presentation = _presentations.getItemAt(i) as Presentation;
|
||||
if (pres.isCurrent()) return pres;
|
||||
if (pres.current) return pres;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getCurrentPage():Page {
|
||||
var pres:Presentation = getCurrentPresentation();
|
||||
if (pres != null) {
|
||||
return pres.getCurrentPage();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getPage(id: String):Page {
|
||||
var ids:Array = id.split("/");
|
||||
if (ids.length > 1) {
|
||||
|
@ -2,15 +2,15 @@ package org.bigbluebutton.modules.present.services
|
||||
{
|
||||
public class Constants
|
||||
{
|
||||
private static const OFFICE_DOC_CONVERSION_SUCCESS_KEY:String = "OFFICE_DOC_CONVERSION_SUCCESS";
|
||||
private static const OFFICE_DOC_CONVERSION_FAILED_KEY:String = "OFFICE_DOC_CONVERSION_FAILED";
|
||||
private static const SUPPORTED_DOCUMENT_KEY:String = "SUPPORTED_DOCUMENT";
|
||||
private static const UNSUPPORTED_DOCUMENT_KEY:String = "UNSUPPORTED_DOCUMENT";
|
||||
private static const PAGE_COUNT_FAILED_KEY:String = "PAGE_COUNT_FAILED";
|
||||
private static const PAGE_COUNT_EXCEEDED_KEY:String = "PAGE_COUNT_EXCEEDED";
|
||||
private static const GENERATED_SLIDE_KEY:String = "GENERATED_SLIDE";
|
||||
private static const GENERATING_THUMBNAIL_KEY:String = "GENERATING_THUMBNAIL";
|
||||
private static const GENERATED_THUMBNAIL_KEY:String = "GENERATED_THUMBNAIL";
|
||||
private static const CONVERSION_COMPLETED_KEY:String = "CONVERSION_COMPLETED";
|
||||
public static const OFFICE_DOC_CONVERSION_SUCCESS_KEY:String = "OFFICE_DOC_CONVERSION_SUCCESS";
|
||||
public static const OFFICE_DOC_CONVERSION_FAILED_KEY:String = "OFFICE_DOC_CONVERSION_FAILED";
|
||||
public static const SUPPORTED_DOCUMENT_KEY:String = "SUPPORTED_DOCUMENT";
|
||||
public static const UNSUPPORTED_DOCUMENT_KEY:String = "UNSUPPORTED_DOCUMENT";
|
||||
public static const PAGE_COUNT_FAILED_KEY:String = "PAGE_COUNT_FAILED";
|
||||
public static const PAGE_COUNT_EXCEEDED_KEY:String = "PAGE_COUNT_EXCEEDED";
|
||||
public static const GENERATED_SLIDE_KEY:String = "GENERATED_SLIDE";
|
||||
public static const GENERATING_THUMBNAIL_KEY:String = "GENERATING_THUMBNAIL";
|
||||
public static const GENERATED_THUMBNAIL_KEY:String = "GENERATED_THUMBNAIL";
|
||||
public static const CONVERSION_COMPLETED_KEY:String = "CONVERSION_COMPLETED";
|
||||
}
|
||||
}
|
@ -1,9 +1,25 @@
|
||||
package org.bigbluebutton.modules.present.services
|
||||
{
|
||||
import org.bigbluebutton.modules.present.events.PageLoadedEvent;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
|
||||
public class PageLoaderService
|
||||
{
|
||||
public function PageLoaderService()
|
||||
{
|
||||
|
||||
public function loadPage(pageId: String):void {
|
||||
var page:Page = PresentationModel.getInstance().getPage(pageId);
|
||||
page.loadSwf(pageLoadedListener);
|
||||
}
|
||||
|
||||
public function pageLoadedListener(pageId: String):void {
|
||||
var page: Page = PresentationModel.getInstance().getPage(pageId);
|
||||
if (page != null) {
|
||||
if (page.current) {
|
||||
// The page has been loaded and still the current displayed page.
|
||||
var event: PageLoadedEvent = new PageLoadedEvent(page.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ package org.bigbluebutton.modules.present.services
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.bigbluebutton.modules.present.commands.ChangePageCommand;
|
||||
import org.bigbluebutton.modules.present.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.present.events.PageChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PageMovedEvent;
|
||||
@ -16,6 +17,7 @@ package org.bigbluebutton.modules.present.services
|
||||
import org.bigbluebutton.modules.present.services.messages.PresentationVO;
|
||||
import org.bigbluebutton.modules.present.services.messaging.MessageReceiver;
|
||||
import org.bigbluebutton.modules.present.services.messaging.MessageSender;
|
||||
import org.bigbluebutton.modules.whiteboard.events.GetCurrentPresentationInfo;
|
||||
|
||||
public class PresentationService
|
||||
{
|
||||
@ -40,6 +42,10 @@ package org.bigbluebutton.modules.present.services
|
||||
public function pageChanged(page: PageVO):void {
|
||||
var np: Page = model.getPage(page.id);
|
||||
if (np != null) {
|
||||
|
||||
var oldPage: Page = PresentationModel.getInstance().getCurrentPage();
|
||||
if (oldPage != null) oldPage.current = false;
|
||||
|
||||
np.current = page.current;
|
||||
np.xOffset = page.xOffset;
|
||||
np.yOffset = page.yOffset;
|
||||
@ -48,10 +54,23 @@ package org.bigbluebutton.modules.present.services
|
||||
|
||||
var event: PageChangedEvent = new PageChangedEvent(np.id);
|
||||
dispatcher.dispatchEvent(event);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function pageMoved(page: PageVO):void {
|
||||
var np: Page = model.getPage(page.id);
|
||||
if (np != null) {
|
||||
np.current = page.current;
|
||||
np.xOffset = page.xOffset;
|
||||
np.yOffset = page.yOffset;
|
||||
np.widthRatio = page.widthRatio;
|
||||
np.heightRatio = page.heightRatio;
|
||||
|
||||
var event: PageChangedEvent = new PageChangedEvent(np.id);
|
||||
dispatcher.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
private function copyPageVOToPage(p: PageVO):Page {
|
||||
var page:Page = new Page(p.id, p.num, p.current,
|
||||
p.swfUri, p.thumbUri, p.txtUri,
|
||||
@ -61,6 +80,13 @@ package org.bigbluebutton.modules.present.services
|
||||
}
|
||||
|
||||
public function changePresentation(pres: PresentationVO):void {
|
||||
|
||||
// We've switched presentations. Mark the old presentation as not current.
|
||||
var curPres:Presentation = PresentationModel.getInstance().getCurrentPresentation();
|
||||
if (curPres != null) {
|
||||
curPres.current = false;
|
||||
}
|
||||
|
||||
var presoPages:ArrayCollection = new ArrayCollection();
|
||||
var pages:ArrayCollection = pres.getPages() as ArrayCollection;
|
||||
for (var k:int = 0; k < pages.length; k++) {
|
||||
@ -69,13 +95,16 @@ package org.bigbluebutton.modules.present.services
|
||||
presoPages.addItem(pg);
|
||||
}
|
||||
|
||||
var presentation: Presentation = new Presentation(pres.id, pres.name, pres.isCurrent(), presoPages);
|
||||
|
||||
var presentation: Presentation = new Presentation(pres.id, pres.name, pres.isCurrent(), presoPages);
|
||||
model.addPresentation(presentation);
|
||||
|
||||
var event: PresentationChangedEvent = new PresentationChangedEvent(presentation.id);
|
||||
dispatcher.dispatchEvent(event);
|
||||
|
||||
var curPage:Page = presentation.getCurrentPage();
|
||||
var changePageCommand: ChangePageCommand = new ChangePageCommand(curPage.id);
|
||||
dispatcher.dispatchEvent(changePageCommand);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -32,7 +32,6 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
import org.bigbluebutton.main.model.users.Conference;
|
||||
import org.bigbluebutton.main.model.users.IMessageListener;
|
||||
import org.bigbluebutton.modules.present.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.present.events.MoveEvent;
|
||||
import org.bigbluebutton.modules.present.events.NavigationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PageChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||
@ -41,20 +40,22 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
import org.bigbluebutton.modules.present.model.Presentation;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
import org.bigbluebutton.modules.present.model.Presenter;
|
||||
import org.bigbluebutton.modules.present.services.Constants;
|
||||
import org.bigbluebutton.modules.present.services.PresentationService;
|
||||
import org.bigbluebutton.modules.present.services.messages.CursorMovedMessage;
|
||||
import org.bigbluebutton.modules.present.services.messages.PageVO;
|
||||
import org.bigbluebutton.modules.present.services.messages.PresentationVO;
|
||||
|
||||
public class MessageReceiver implements IMessageListener
|
||||
{
|
||||
public class MessageReceiver implements IMessageListener {
|
||||
private static const LOG:String = "Present::MessageReceiver - ";
|
||||
|
||||
private var service:PresentationService;
|
||||
private var dispatcher:Dispatcher;
|
||||
|
||||
public function MessageReceiver(service: PresentationService) {
|
||||
this.service = service;
|
||||
BBB.initConnectionManager().addMessageListener(this);
|
||||
dispatcher = new Dispatcher();
|
||||
}
|
||||
|
||||
public function onMessage(messageName:String, message:Object):void {
|
||||
@ -110,8 +111,7 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
}
|
||||
|
||||
private function handlePresentationCursorUpdateCommand(msg:Object):void {
|
||||
// trace(LOG + "*** handlePresentationCursorUpdateCommand " + msg.msg + " **** \n");
|
||||
|
||||
// trace(LOG + "*** handlePresentationCursorUpdateCommand " + msg.msg + " **** \n");
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
if (map.hasOwnProperty("xPercent") && map.hasOwnProperty("yPercent")) {
|
||||
service.cursorMoved(map.xPercent, map.yPercent);
|
||||
@ -121,14 +121,12 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
private function handleGotoSlideCallback(msg:Object) : void {
|
||||
trace(LOG + "*** handleGotoSlideCallback " + msg.msg + " **** \n");
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
|
||||
if (map.hasOwnProperty("id") && map.hasOwnProperty("num") && map.hasOwnProperty("current") &&
|
||||
map.hasOwnProperty("swfUri") && map.hasOwnProperty("txtUri") && map.hasOwnProperty("pngUri") &&
|
||||
map.hasOwnProperty("thumbUri") && map.hasOwnProperty("xOffset") && map.hasOwnProperty("yOffset") &&
|
||||
map.hasOwnProperty("widthRatio") && map.hasOwnProperty("heightRatio")) {
|
||||
|
||||
var page:PageVO = extractPage(map);
|
||||
|
||||
service.pageChanged(page);
|
||||
}
|
||||
}
|
||||
@ -159,14 +157,6 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
&& map.hasOwnProperty("heightRatio")) {
|
||||
service.pageChanged(extractPage(map));
|
||||
}
|
||||
|
||||
trace(LOG + "TODO: handleMoveCallback [" + msg.xOffset + "," + msg.yOffset + "][" + msg.widthRatio + "," + msg.heightRatio + "]");
|
||||
// var e:MoveEvent = new MoveEvent(MoveEvent.MOVE);
|
||||
// e.xOffset = map.xOffset;
|
||||
// e.yOffset = map.yOffset;
|
||||
// e.slideToCanvasWidthRatio = map.widthRatio;
|
||||
// e.slideToCanvasHeightRatio = map.heightRatio;
|
||||
// dispatcher.dispatchEvent(e);
|
||||
}
|
||||
|
||||
private function handleSharePresentationCallback(msg:Object):void {
|
||||
@ -195,21 +185,16 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
}
|
||||
|
||||
private function handleConversionCompletedUpdateMessageCallback(msg:Object) : void {
|
||||
trace(LOG + "*** handleConversionCompletedUpdateMessageCallback " + msg.msg + " **** \n");
|
||||
|
||||
trace(LOG + "*** handleConversionCompletedUpdateMessageCallback " + msg.msg + " **** \n");
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
var presVO: PresentationVO = pocessUploadedPresentation(map)
|
||||
service.changePresentation(presVO);
|
||||
|
||||
// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_SUCCESS);
|
||||
// uploadEvent.data = CONVERSION_COMPLETED_KEY;
|
||||
// uploadEvent.presentationName = map.id;
|
||||
// dispatcher.dispatchEvent(uploadEvent);
|
||||
var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_SUCCESS);
|
||||
uploadEvent.data = Constants.CONVERSION_COMPLETED_KEY;
|
||||
uploadEvent.presentationName = map.id;
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
|
||||
// dispatcher.dispatchEvent(new BBBEvent(BBBEvent.PRESENTATION_CONVERTED));
|
||||
// var readyEvent:UploadEvent = new UploadEvent(UploadEvent.PRESENTATION_READY);
|
||||
// readyEvent.presentationName = map.id;
|
||||
// dispatcher.dispatchEvent(readyEvent);
|
||||
}
|
||||
|
||||
private function pocessUploadedPresentation(presentation:Object):PresentationVO {
|
||||
@ -230,59 +215,58 @@ package org.bigbluebutton.modules.present.services.messaging
|
||||
trace(LOG + "*** handleGeneratedSlideUpdateMessageCallback " + msg.msg + " **** \n");
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
|
||||
// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_UPDATE);
|
||||
// uploadEvent.totalSlides = map.numberOfPages as Number;
|
||||
// uploadEvent.completedSlides = msg.pagesCompleted as Number;
|
||||
// dispatcher.dispatchEvent(uploadEvent);
|
||||
var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.CONVERT_UPDATE);
|
||||
uploadEvent.totalSlides = map.numberOfPages as Number;
|
||||
uploadEvent.completedSlides = msg.pagesCompleted as Number;
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
}
|
||||
|
||||
private function handlePageCountExceededUpdateMessageCallback(msg:Object) : void {
|
||||
trace(LOG + "*** handlePageCountExceededUpdateMessageCallback " + msg.msg + " **** \n");
|
||||
|
||||
trace(LOG + "*** handlePageCountExceededUpdateMessageCallback " + msg.msg + " **** \n");
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
|
||||
// var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_EXCEEDED);
|
||||
//// uploadEvent.maximumSupportedNumberOfSlides = map.maxNumberPages as Number;
|
||||
// dispatcher.dispatchEvent(uploadEvent);
|
||||
var uploadEvent:UploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_EXCEEDED);
|
||||
uploadEvent.maximumSupportedNumberOfSlides = map.maxNumberPages as Number;
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
}
|
||||
|
||||
private function handleConversionUpdateMessageCallback(msg:Object) : void {
|
||||
trace(LOG + "*** handleConversionUpdateMessageCallback " + msg.msg + " **** \n");
|
||||
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
/*
|
||||
|
||||
var uploadEvent:UploadEvent;
|
||||
|
||||
switch (map.messageKey) {
|
||||
case OFFICE_DOC_CONVERSION_SUCCESS_KEY :
|
||||
case Constants.OFFICE_DOC_CONVERSION_SUCCESS_KEY :
|
||||
uploadEvent = new UploadEvent(UploadEvent.OFFICE_DOC_CONVERSION_SUCCESS);
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
break;
|
||||
case OFFICE_DOC_CONVERSION_FAILED_KEY :
|
||||
case Constants.OFFICE_DOC_CONVERSION_FAILED_KEY :
|
||||
uploadEvent = new UploadEvent(UploadEvent.OFFICE_DOC_CONVERSION_FAILED);
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
break;
|
||||
case SUPPORTED_DOCUMENT_KEY :
|
||||
case Constants.SUPPORTED_DOCUMENT_KEY :
|
||||
uploadEvent = new UploadEvent(UploadEvent.SUPPORTED_DOCUMENT);
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
break;
|
||||
case UNSUPPORTED_DOCUMENT_KEY :
|
||||
case Constants.UNSUPPORTED_DOCUMENT_KEY :
|
||||
uploadEvent = new UploadEvent(UploadEvent.UNSUPPORTED_DOCUMENT);
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
break;
|
||||
case GENERATING_THUMBNAIL_KEY :
|
||||
case Constants.GENERATING_THUMBNAIL_KEY :
|
||||
dispatcher.dispatchEvent(new UploadEvent(UploadEvent.THUMBNAILS_UPDATE));
|
||||
break;
|
||||
case PAGE_COUNT_FAILED_KEY :
|
||||
case Constants.PAGE_COUNT_FAILED_KEY :
|
||||
uploadEvent = new UploadEvent(UploadEvent.PAGE_COUNT_FAILED);
|
||||
dispatcher.dispatchEvent(uploadEvent);
|
||||
break;
|
||||
case GENERATED_THUMBNAIL_KEY :
|
||||
case Constants.GENERATED_THUMBNAIL_KEY :
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
private var currentSlide:Number = -1;
|
||||
|
@ -46,11 +46,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{ShortcutEvent.FOCUS_PRESENTATION_WINDOW}" method="focusWindow" />
|
||||
<mate:Listener type="{MadePresenterEvent.SWITCH_TO_PRESENTER_MODE}" method="becomePresenter" />
|
||||
<mate:Listener type="{MadePresenterEvent.SWITCH_TO_VIEWER_MODE}" method="becomeViewer" />
|
||||
<mate:Listener type="{PresentationEvent.PRESENTATION_LOADED}" method="handlePresentationLoadedEvent" />
|
||||
<mate:Listener type="{NavigationEvent.GOTO_PAGE}" method="gotoPage" />
|
||||
<mate:Listener type="{NavigationEvent.BIND_KEYBOARD_EVENT}" method="bindToKeyboardEvents" />
|
||||
<mate:Listener type="{PresentationChangedEvent.PRESENTATION_CHANGED_EVENT}" method="handlePresentationChangedEvent" />
|
||||
<mate:Listener type="{NavigationEvent.BIND_KEYBOARD_EVENT}" method="bindToKeyboardEvents" />
|
||||
<mate:Listener type="{UploadEvent.CLEAR_PRESENTATION}" method="clearPresentation" />
|
||||
<mate:Listener type="{SlideResizedEvent.SLIDE_RESIZED_EVENT}" method="handleSlideResizedEvent" />
|
||||
<mate:Listener type="{DisplaySlideEvent.DISPLAY_SLIDE_EVENT}" method="handleDisplaySlideEvent" />
|
||||
<mate:Listener type="{AddOverlayCanvasEvent.ADD_OVERLAY_CANVAS}" method="addOverlayCanvas" />
|
||||
<mate:Listener type="{LocaleChangeEvent.LOCALE_CHANGED}" method="localeChanged" />
|
||||
@ -87,22 +85,21 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
import org.bigbluebutton.modules.present.events.AddOverlayCanvasEvent;
|
||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.MoveEvent;
|
||||
import org.bigbluebutton.modules.present.events.NavigationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.SlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.SlideResizedEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.events.WindowResizedEvent;
|
||||
import org.bigbluebutton.modules.present.events.ZoomEvent;
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
import org.bigbluebutton.modules.present.managers.SlideManager;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
import org.bigbluebutton.modules.present.ui.views.PresentOptions;
|
||||
import org.bigbluebutton.modules.whiteboard.events.WhiteboardButtonEvent;
|
||||
@ -136,8 +133,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private var currentSlideHeight:Number = DEFAULT_WINDOW_HEIGHT;
|
||||
|
||||
private var mouseDown:Boolean = false;
|
||||
[Bindable] private var isPresenter:Boolean = false;
|
||||
[Bindable] private var presentationLoaded:Boolean = false;
|
||||
|
||||
[Bindable] private var currentPresentation:String = "";
|
||||
|
||||
[Bindable] private var baseIndex:int;
|
||||
@ -174,12 +170,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
t.start();
|
||||
}
|
||||
|
||||
private function addWhiteboardToolbar(event:TimerEvent):void {
|
||||
// Tell the WhiteboardManager to add the toolbar
|
||||
var e:WhiteboardButtonEvent = new WhiteboardButtonEvent(WhiteboardButtonEvent.WHITEBOARD_ADDED_TO_PRESENTATION);
|
||||
e.window = this;
|
||||
dispatchEvent(e);
|
||||
}
|
||||
private function addWhiteboardToolbar(event:TimerEvent):void {
|
||||
// Tell the WhiteboardManager to add the toolbar
|
||||
var e:WhiteboardButtonEvent = new WhiteboardButtonEvent(WhiteboardButtonEvent.WHITEBOARD_ADDED_TO_PRESENTATION);
|
||||
e.window = this;
|
||||
dispatchEvent(e);
|
||||
}
|
||||
|
||||
private function hotkeyCapture():void{
|
||||
LogUtil.debug("Entering hotkeyCapture");
|
||||
@ -268,16 +264,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
/*
|
||||
* Notify the slide container telling it the available dimensions to display the slide.
|
||||
*/
|
||||
private function sendWindowResizedEvent(parentWidth:Number, parentHeight:Number):void {
|
||||
var dispatcher:Dispatcher = new Dispatcher();
|
||||
var dispEvent:WindowResizedEvent = new WindowResizedEvent(WindowResizedEvent.PRESENTATION_WINDOW_RESIZED_EVENT);
|
||||
dispEvent.width = parentWidth;
|
||||
dispEvent.height = parentHeight;
|
||||
dispEvent.fitToPage = fitToPage;
|
||||
dispEvent.old_width = this.slideView.width;
|
||||
dispEvent.old_height = this.slideView.height;
|
||||
dispatcher.dispatchEvent(dispEvent);
|
||||
|
||||
private function sendWindowResizedEvent(parentWidth:Number, parentHeight:Number):void {
|
||||
slideView.onParentResized(parentWidth, parentHeight);
|
||||
}
|
||||
|
||||
@ -287,15 +274,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
fitSlideToWindowMaintainingAspectRatio();
|
||||
}
|
||||
|
||||
private function bindToKeyboardEvents(event:NavigationEvent):void {
|
||||
if (event.bindToKeyboard) {
|
||||
LogUtil.debug("******************************************** Binding to keyboard events ********************");
|
||||
bindKeyboardEvents();
|
||||
} else {
|
||||
LogUtil.debug("********************************************* Unbinding to keyboard events *****************");
|
||||
unbindKeyboardEvents();
|
||||
}
|
||||
}
|
||||
private function bindToKeyboardEvents(event:NavigationEvent):void {
|
||||
if (event.bindToKeyboard) {
|
||||
trace("******************************************** Binding to keyboard events ********************");
|
||||
bindKeyboardEvents();
|
||||
} else {
|
||||
LogUtil.debug("********************************************* Unbinding to keyboard events *****************");
|
||||
unbindKeyboardEvents();
|
||||
}
|
||||
}
|
||||
|
||||
private function unbindKeyboardEvents():void {
|
||||
stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
|
||||
@ -343,11 +330,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
zoomSlider.value = 100;
|
||||
slideView.onZoomSlide(zoomSlider.value);
|
||||
}
|
||||
|
||||
private function handleSlideResizedEvent(e:SlideResizedEvent):void{
|
||||
zoomSlider.value = e.percent;
|
||||
}
|
||||
|
||||
|
||||
private function becomePresenter(e:MadePresenterEvent):void{
|
||||
setupPresenter(true, e.presenterName);
|
||||
addContextMenuItems();
|
||||
@ -363,30 +346,25 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
private function setupPresenter(isPresenter:Boolean, presentersName:String):void {
|
||||
this.isPresenter = isPresenter;
|
||||
uploadPres.visible = isPresenter;
|
||||
|
||||
if (presentationLoaded) {
|
||||
displaySlideNumber(slideView.getSelectedSlide() + 1);
|
||||
displaySlideNavigationControls(isPresenter);
|
||||
}
|
||||
var page:Page = PresentationModel.getInstance().getCurrentPage();
|
||||
displaySlideNumber(page.num);
|
||||
displaySlideNavigationControls(isPresenter);
|
||||
}
|
||||
|
||||
private function handlePresentationLoadedEvent(e:PresentationEvent):void {
|
||||
var newPresName = PresentationModel.getInstance().getCurrentPresentationName();
|
||||
private function handlePresentationChangedEvent(e:PresentationChangedEvent):void {
|
||||
var newPresName:String = PresentationModel.getInstance().getCurrentPresentationName();
|
||||
|
||||
if (newPresName == currentPresentation) return;
|
||||
presentationLoaded = true;
|
||||
slideView.setSlides(e.slides.slides);
|
||||
slideView.setSlides();
|
||||
slideView.visible = true;
|
||||
|
||||
if (slideManager != null) slideManager.clear();
|
||||
displaySlideNumber(slideView.getSelectedSlide() + 1);
|
||||
if (isPresenter) {
|
||||
var page:Page = PresentationModel.getInstance().getCurrentPage();
|
||||
displaySlideNumber(page.num);
|
||||
|
||||
if (UsersUtil.amIPresenter()) {
|
||||
displaySlideNavigationControls(true);
|
||||
notifyOthersOfSharingPresentation(newPresName);
|
||||
} else {
|
||||
dispatchEvent(new SlideEvent(SlideEvent.LOAD_CURRENT_SLIDE));
|
||||
displaySlideNavigationControls(false)
|
||||
}
|
||||
onResetZoom();
|
||||
}
|
||||
@ -449,34 +427,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
shareEvent.share = true;
|
||||
dispatchEvent(shareEvent);
|
||||
}
|
||||
|
||||
private function gotoPage(e:NavigationEvent):void{
|
||||
trace("PresentationWindow:gotoPage page[" + e.pageNumber + "]");
|
||||
loadPage(e.pageNumber);
|
||||
}
|
||||
|
||||
public function loadPage(pageNumber:int):void{
|
||||
// using zero-based index. So we need to subtract 1.
|
||||
slideView.setSelectedSlide(pageNumber - 1);
|
||||
|
||||
if (validPageNumber(pageNumber)) {
|
||||
loadSlide(pageNumber);
|
||||
disableSlideNavigationButtons(pageNumber);
|
||||
displaySlideNumber(pageNumber);
|
||||
} else {
|
||||
trace("PresentationWindow:loadPage - not valid page number [" + pageNumber + "]");
|
||||
}
|
||||
}
|
||||
|
||||
private function loadSlide(page:int):void {
|
||||
// subtract 1 as this is an array which is zero-based.
|
||||
slideManager.load(slideView.slides.getItemAt(page-1) as Slide);
|
||||
}
|
||||
|
||||
private function validPageNumber(pageNumber:int):Boolean {
|
||||
return (pageNumber <= slideView.slides.length && pageNumber > 0)
|
||||
}
|
||||
|
||||
|
||||
private function disableSlideNavigationButtons(pageNumber:int):void {
|
||||
if (pageNumber == 1) {
|
||||
backButton.enabled = false;
|
||||
@ -499,6 +450,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
btnSlideNum.label = "" + currentSlide + '/' + slideView.slides.length;
|
||||
}
|
||||
|
||||
|
||||
private function clearPresentation(e:UploadEvent):void{
|
||||
slideView.visible = false;
|
||||
slideView.slideLoader.source = null;
|
||||
|
@ -24,18 +24,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
xmlns:mate="http://mate.asfusion.com/"
|
||||
xmlns:local="*"
|
||||
xmlns:fimage="org.bigbluebutton.common.model.*"
|
||||
width="{slideModel.viewportW}" height="{slideModel.viewportH}"
|
||||
width="{slideModel.viewportW}" height="{slideModel.viewportH}"
|
||||
x="{slideModel.viewportX}" y="{slideModel.viewportY}"
|
||||
creationComplete="onCreationComplete()"
|
||||
creationComplete="onCreationComplete()"
|
||||
verticalScrollPolicy="off"
|
||||
horizontalScrollPolicy="off"
|
||||
rollOut="hideCursor()" styleName="presentationSlideViewStyle"
|
||||
xmlns:views="org.bigbluebutton.modules.present.views.*"
|
||||
implements="org.bigbluebutton.common.IBbbCanvas">
|
||||
|
||||
<mate:Listener type="{MoveEvent.CUR_SLIDE_SETTING}" method="handleCurSlideSettingEvent" />
|
||||
<mate:Listener type="{MoveEvent.MOVE}" method="handleMoveEvent" />
|
||||
<mate:Listener type="{SlideEvent.SLIDE_LOADED}" method="handleSlideLoadedEvent" />
|
||||
rollOut="hideCursor()" styleName="presentationSlideViewStyle"
|
||||
xmlns:views="org.bigbluebutton.modules.present.views.*"
|
||||
implements="org.bigbluebutton.common.IBbbCanvas">
|
||||
|
||||
<mate:Listener type="{PageChangedEvent.PRESENTATION_PAGE_CHANGED_EVENT}" method="handlePageChangedEvent" />
|
||||
<mate:Listener type="{PageLoadedEvent.PAGE_LOADED_EVENT}" method="handlePageLoadedEvent" />
|
||||
<mate:Listener type="{MadePresenterEvent.SWITCH_TO_PRESENTER_MODE}" method="handleSwitchToPresenterEvent" />
|
||||
<mate:Listener type="{MadePresenterEvent.SWITCH_TO_VIEWER_MODE}" method="handleSwitchToViewerEvent" />
|
||||
<mate:Listener type="{CursorEvent.UPDATE_CURSOR}" method="handleUpdateCursorEvent" />
|
||||
@ -43,34 +42,35 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
import flash.events.Event;
|
||||
import mx.binding.utils.BindingUtils;
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.controls.Alert;
|
||||
import mx.controls.Button;
|
||||
import mx.events.FlexEvent;
|
||||
import mx.events.ListEvent;
|
||||
import org.bigbluebutton.common.IBbbCanvas;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.model.FocusableImage;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.modules.present.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.MoveEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.SlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.SlideResizedEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.events.WindowResizedEvent;
|
||||
import org.bigbluebutton.modules.present.events.ZoomEvent;
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
import org.bigbluebutton.modules.present.ui.views.models.SlideCalcUtil;
|
||||
import org.bigbluebutton.modules.present.ui.views.models.SlideViewModel;
|
||||
import org.bigbluebutton.modules.whiteboard.events.GetCurrentPresentationInfo;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
import flash.events.Event;
|
||||
import mx.binding.utils.BindingUtils;
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.controls.Alert;
|
||||
import mx.controls.Button;
|
||||
import mx.events.FlexEvent;
|
||||
import mx.events.ListEvent;
|
||||
import org.bigbluebutton.common.IBbbCanvas;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.common.model.FocusableImage;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.modules.present.commands.ChangePageCommand;
|
||||
import org.bigbluebutton.modules.present.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.PageChangedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PageLoadedEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresenterCommands;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.events.WindowResizedEvent;
|
||||
import org.bigbluebutton.modules.present.managers.Slide;
|
||||
import org.bigbluebutton.modules.present.model.Page;
|
||||
import org.bigbluebutton.modules.present.model.PresentationModel;
|
||||
import org.bigbluebutton.modules.present.ui.views.models.SlideCalcUtil;
|
||||
import org.bigbluebutton.modules.present.ui.views.models.SlideViewModel;
|
||||
import org.bigbluebutton.modules.whiteboard.events.GetCurrentPresentationInfo;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
[Bindable] public var zoomPercentage:Number = 100;
|
||||
public static const ZOOM_STEP:int = 5;
|
||||
@ -92,7 +92,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private var whiteboardCanvasHolder:Canvas = new Canvas();
|
||||
private var whiteboardCanvas:IBbbCanvas;
|
||||
|
||||
[Bindable] public var slides:ArrayCollection = new ArrayCollection();
|
||||
// [Bindable] public var slides:ArrayCollection = new ArrayCollection();
|
||||
private var _selectedSlide:int=0;
|
||||
[Bindable] private var lateComerSynched:Boolean = false;
|
||||
|
||||
@ -121,14 +121,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
whiteboardCanvasHolder.x = 0;
|
||||
whiteboardCanvasHolder.y = 0;
|
||||
|
||||
this.setChildIndex(thumbnailView, this.numChildren - 1);
|
||||
|
||||
dispatcher.dispatchEvent(new GetCurrentPresentationInfo());
|
||||
this.setChildIndex(thumbnailView, this.numChildren - 1);
|
||||
}
|
||||
|
||||
public function setSlides(slides:ArrayCollection):void {
|
||||
this.slides = slides;
|
||||
thumbnailView.dataProvider = this.slides.toArray();
|
||||
public function setSlides():void {
|
||||
thumbnailView.dataProvider = PresentationModel.getInstance().getCurrentPresentation().getPages();
|
||||
}
|
||||
|
||||
public function setSelectedSlide(slideNum:int):void {
|
||||
@ -142,9 +139,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private function changeSlide():void {
|
||||
if (thumbnailView.selectedIndex != _selectedSlide) {
|
||||
// We need to add 1 as the thumbnail view is zero based.
|
||||
dispatchEvent(new PresenterCommands(PresenterCommands.GOTO_SLIDE, thumbnailView.selectedIndex));
|
||||
thumbnailView.visible = false;
|
||||
var data:Page = thumbnailView.selectedItem as Page;
|
||||
dispatchEvent(new ChangePageCommand(data.id));
|
||||
thumbnailView.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -277,52 +274,45 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
// If delta is negative, the presenter is zooming-out of the presentation.
|
||||
return delta < 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handles notification from presenter that the slide has moved.
|
||||
*/
|
||||
private function handleCurSlideSettingEvent(e:MoveEvent):void{
|
||||
private function handlePageChangedEvent(e:PageChangedEvent):void{
|
||||
if (UserManager.getInstance().getConference().amIPresenter) {
|
||||
return;
|
||||
}
|
||||
|
||||
var page:Page = PresentationModel.getInstance().getPage(e.pageId);
|
||||
if (page != null) {
|
||||
presenterViewedRegionX = page.xOffset;
|
||||
presenterViewedRegionY = page.yOffset;
|
||||
presenterViewedRegionW = page.widthRatio;
|
||||
presenterViewedRegionH = page.heightRatio;
|
||||
|
||||
slideModel.saveViewedRegion(page.xOffset, page.yOffset, page.widthRatio, page.heightRatio);
|
||||
slideModel.calculateViewportNeededForRegion(page.xOffset, page.yOffset, page.widthRatio, page.heightRatio);
|
||||
slideModel.displayViewerRegion(page.xOffset, page.yOffset, page.widthRatio, page.heightRatio);
|
||||
slideModel.calculateViewportXY();
|
||||
slideModel.displayPresenterView();
|
||||
slideModel.printViewedRegion();
|
||||
fitSlideToLoader();
|
||||
}
|
||||
|
||||
presenterViewedRegionX = e.xOffset;
|
||||
presenterViewedRegionY = e.yOffset;
|
||||
presenterViewedRegionW = e.slideToCanvasWidthRatio;
|
||||
presenterViewedRegionH = e.slideToCanvasHeightRatio;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles notification from presenter that the slide has moved.
|
||||
*/
|
||||
private function handleMoveEvent(e:MoveEvent):void{
|
||||
if (UserManager.getInstance().getConference().amIPresenter) {
|
||||
return;
|
||||
}
|
||||
|
||||
presenterViewedRegionX = e.xOffset;
|
||||
presenterViewedRegionY = e.yOffset;
|
||||
presenterViewedRegionW = e.slideToCanvasWidthRatio;
|
||||
presenterViewedRegionH = e.slideToCanvasHeightRatio;
|
||||
|
||||
slideModel.saveViewedRegion(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio);
|
||||
slideModel.calculateViewportNeededForRegion(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio);
|
||||
slideModel.displayViewerRegion(e.xOffset, e.yOffset, e.slideToCanvasWidthRatio, e.slideToCanvasHeightRatio);
|
||||
slideModel.calculateViewportXY();
|
||||
slideModel.displayPresenterView();
|
||||
slideModel.printViewedRegion();
|
||||
fitSlideToLoader();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle notification from loader that a slide has been loaded.
|
||||
*/
|
||||
private function handleSlideLoadedEvent(e:SlideEvent):void{
|
||||
slideLoader.source = e.slide;
|
||||
//slideLoader.accessibilityProperties.description = "Slide text start: " + e.slideText + " Slide text end";
|
||||
slideLoader.accessibilityDescription = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") + e.slideText + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext");
|
||||
slideLoader.accessibilityName = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") + e.slideText + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext");
|
||||
LogUtil.debug(e.slideText);
|
||||
|
||||
private function handleSlideLoadedEvent(e:PageLoadedEvent):void{
|
||||
var page:Page = PresentationModel.getInstance().getPage(e.pageId);
|
||||
if (page != null) {
|
||||
slideLoader.source = page.swfData;
|
||||
//slideLoader.accessibilityProperties.description = "Slide text start: " + e.slideText + " Slide text end";
|
||||
// slideLoader.accessibilityDescription = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") +
|
||||
// page.txtData + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext");
|
||||
// slideLoader.accessibilityName = ResourceUtil.getInstance().getString("bbb.presentation.slideloader.starttext") +
|
||||
// page.txtData + ResourceUtil.getInstance().getString("bbb.presentation.slideloader.endtext");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<EventMap xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="http://mate.asfusion.com/">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
</EventMap>
|
@ -18,9 +18,7 @@
|
||||
*/
|
||||
package org.bigbluebutton.modules.users.services
|
||||
{
|
||||
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import org.bigbluebutton.core.EventConstants;
|
||||
@ -43,7 +41,6 @@ package org.bigbluebutton.modules.users.services
|
||||
import org.bigbluebutton.main.model.users.events.RoleChangeEvent;
|
||||
import org.bigbluebutton.main.model.users.events.UsersConnectionEvent;
|
||||
import org.bigbluebutton.modules.present.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.present.events.MoveEvent;
|
||||
import org.bigbluebutton.modules.present.events.NavigationEvent;
|
||||
import org.bigbluebutton.modules.present.events.RemovePresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
|
@ -37,9 +37,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{GraphicObjectFocusEvent.OBJECT_SELECTED}" method="graphicObjSelected" />
|
||||
<mate:Listener type="{GraphicObjectFocusEvent.OBJECT_DESELECTED}" method="graphicObjDeselected" />
|
||||
<mate:Listener type="{WhiteboardButtonEvent.WHITEBOARD_BUTTON_PRESSED}" method="handleWhiteboardButtonPressed"/>
|
||||
<mate:Listener type="{NavigationEvent.GOTO_PAGE}" method="handleSlideChange" />
|
||||
<mate:Listener type="{DisplaySlideEvent.DISPLAY_SLIDE_EVENT}" method="handleSlideLoaded" />
|
||||
<mate:Listener type="{UploadEvent.PRESENTATION_READY}" method="handlePresentationSwitch" />
|
||||
<mate:Listener type="{NavigationEvent.GOTO_PAGE}" method="handleSlideChange" />
|
||||
<mate:Listener type="{DisplaySlideEvent.DISPLAY_SLIDE_EVENT}" method="handleSlideLoaded" />
|
||||
<mate:Listener type="{UploadEvent.PRESENTATION_READY}" method="handlePresentationSwitch" />
|
||||
|
||||
<mx:Style>
|
||||
.colorPickerStyle {
|
||||
@ -82,7 +82,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.modules.present.events.DisplaySlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.PresentationEvent;
|
||||
import org.bigbluebutton.modules.present.events.NavigationEvent;
|
||||
import org.bigbluebutton.modules.present.events.SlideEvent;
|
||||
import org.bigbluebutton.modules.present.events.UploadEvent;
|
||||
import org.bigbluebutton.modules.present.ui.views.PresentationWindow;
|
||||
import org.bigbluebutton.modules.present.ui.views.SlideView;
|
||||
|
@ -121,10 +121,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<InlineInvoker method="dummyMethod" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{WindowResizedEvent.PRESENTATION_WINDOW_RESIZED_EVENT}">
|
||||
<InlineInvoker method="dummyMethod" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{NavigationEvent.GOTO_PAGE}">
|
||||
<InlineInvoker method="dummyMethod" />
|
||||
</EventHandlers>
|
||||
|
Loading…
Reference in New Issue
Block a user