bigbluebutton-Github/bigbluebutton-client/src/WhiteboardModule.mxml

86 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
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/>.
-->
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300"
implements="org.bigbluebutton.common.IBigBlueButtonModule" xmlns:maps="org.bigbluebutton.modules.whiteboard.maps.*"
creationComplete="init()" xmlns:mate="http://mate.asfusion.com/">
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.common.IBigBlueButtonModule;
import org.bigbluebutton.modules.whiteboard.events.StartWhiteboardModuleEvent;
import org.bigbluebutton.modules.whiteboard.events.StopWhiteboardModuleEvent;
private static const LOGGER:ILogger = getClassLogger(WhiteboardModule);
private var _moduleName:String = "Highlighter Module";
private var _attributes:Object;
private var globalDispatcher:Dispatcher;
private function init():void{
LOGGER.debug("HighlighterModule::init");
}
public function get moduleName():String {
return _moduleName;
}
public function get uri():String {
return _attributes.uri + "/" + _attributes.room;
}
public function get username():String {
return _attributes.username;
}
public function get userid():Number {
return _attributes.userid as Number;
}
public function get role():String {
return _attributes.userrole as String;
}
public function start(attributes:Object):void {
LOGGER.debug("highlighter attr: {0}", [attributes.username]);
_attributes = attributes;
globalDispatcher = new Dispatcher();
//eventMap.createHighlighterCanvas();
var startEvent:StartWhiteboardModuleEvent = new StartWhiteboardModuleEvent();
startEvent.attributes = attributes;
globalDispatcher.dispatchEvent(startEvent);
}
public function stop():void {
globalDispatcher.dispatchEvent(new StopWhiteboardModuleEvent(StopWhiteboardModuleEvent.STOP_HIGHLIGHTER_MODULE_EVENT));
}
]]>
</mx:Script>
<maps:WhiteboardEventMap id="eventMap" />
</mx:Module>