This commit is contained in:
Richard Alam 2013-06-25 16:11:47 +00:00
parent 54c977a0b4
commit 2ee386df71
5 changed files with 26 additions and 10 deletions

View File

@ -27,12 +27,10 @@ public class ConversionUpdatesProcessor {
private PresentationApplication presentationApplication;
public void process(Map<String, Object> message) {
log.debug("Received conversion message from REDIS");
presentationApplication.sendUpdateMessage(message);
}
public void setPresentationApplication(PresentationApplication a) {
log.debug("Setting presentation application");
presentationApplication = a;
}
}

View File

@ -55,7 +55,6 @@ public class PresentationService {
public void gotoSlide(Map<String, Object> msg) {
Integer slideNum = (Integer) msg.get("pageNumber");
log.debug("Request to go to slide " + slideNum);
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.gotoSlide(scope.getName(), slideNum);
}
@ -70,7 +69,25 @@ public class PresentationService {
public void sendCursorUpdate(Map<String, Object> msg) {
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.sendCursorUpdate(scope.getName(), (Double) msg.get("xPercent"), (Double) msg.get("yPercent"));
Double xPercent;
if (msg.get("xPercent") instanceof Integer) {
Integer tempXOffset = (Integer) msg.get("xPercent");
xPercent = tempXOffset.doubleValue();
} else {
xPercent = (Double) msg.get("xPercent");
}
Double yPercent;
if (msg.get("yPercent") instanceof Integer) {
Integer tempYOffset = (Integer) msg.get("yPercent");
yPercent = tempYOffset.doubleValue();
} else {
yPercent = (Double) msg.get("yPercent");
}
presentationApplication.sendCursorUpdate(scope.getName(), xPercent, yPercent);
}
public void resizeAndMoveSlide(Map<String, Object> msg) {
@ -108,13 +125,11 @@ public class PresentationService {
heightRatio = (Double) msg.get("heightRatio");
}
log.debug("Request to resize and move slide[" + xOffset + "," + yOffset + "," + widthRatio + "," + heightRatio);
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.resizeAndMoveSlide(scope.getName(), xOffset, yOffset, widthRatio, heightRatio);
}
public void setPresentationApplication(PresentationApplication a) {
log.debug("Setting Presentation Applications");
presentationApplication = a;
}

View File

@ -10,10 +10,9 @@ import org.bigbluebutton.core.api.InMessage
import org.bigbluebutton.core.api.InitializeMeeting
import org.bigbluebutton.core.api.DestroyMeeting
import org.bigbluebutton.core.api.KeepAliveMessage
import org.bigbluebutton.core.api.KeepAliveMessageReply
import org.red5.logging.Red5LoggerFactory
import org.slf4j.Logger
import org.bigbluebutton.core.api.KeepAliveMessageReply
class BigBlueButtonActor(outGW: MessageOutGateway) extends Actor {
private var log = Red5LoggerFactory.getLogger(classOf[BigBlueButtonActor], "bigbluebutton")
@ -34,7 +33,6 @@ class BigBlueButtonActor(outGW: MessageOutGateway) extends Actor {
}
private def handleMeetingMessage(msg: InMessage):Unit = {
println("receiving:" + msg)
meetings.get(msg.meetingID) match {
case None => // do nothing
case Some(m) => m ! msg
@ -42,7 +40,6 @@ class BigBlueButtonActor(outGW: MessageOutGateway) extends Actor {
}
private def handleKeepAliveMessage(msg: KeepAliveMessage):Unit = {
println("receiving keep alive message")
outGW.send(new KeepAliveMessageReply(msg.aliveID))
}

View File

@ -126,6 +126,7 @@ package org.bigbluebutton.modules.present.services
}
private function handleMoveCallback(msg:Object):void{
trace(LOG + "handleMoveCallback [" + msg.xOffset + "," + msg.yOffset + "][" + msg.widthRatio + "," + msg.heightRatio + "]");
var e:MoveEvent = new MoveEvent(MoveEvent.MOVE);
e.xOffset = msg.xOffset;
e.yOffset = msg.yOffset;

View File

@ -24,6 +24,9 @@ package org.bigbluebutton.modules.present.services
import org.bigbluebutton.main.model.users.IMessageListener;
public class MessageSender {
private static const LOG:String = "Present::MessageReceiver - ";
/**
* Send an event to the server to update the presenter's cursor view on the client
* @param xPercent
@ -54,6 +57,8 @@ package org.bigbluebutton.modules.present.services
*
*/
public function move(xOffset:Number, yOffset:Number, widthRatio:Number, heightRatio:Number):void{
trace(LOG + "move [" + xOffset + "," + yOffset + "][" + widthRatio + "," + heightRatio + "]");
var message:Object = new Object();
message["xOffset"] = xOffset;
message["yOffset"] = yOffset;