System.out.println("Got CaptureStartBlockEvent");
CaptureStartBlockEvent event = (CaptureStartBlockEvent) message;
sessionManager.createSession(event.getRoom(), event.getScreenDimension(), event.getBlockDimension(), event.getSequenceNum(), event.isUseSVC2());
} else if (message instanceof CaptureUpdateBlockEvent) {
// System.out.println("Got CaptureUpdateBlockEvent");
CaptureUpdateBlockEvent event = (CaptureUpdateBlockEvent) message;
sessionManager.updateBlock(event.getRoom(), event.getPosition(), event.getVideoData(), event.isKeyFrame(), event.getSequenceNum());
if (sessionManager.isSharingStopped(event.getRoom())) {
// The flash client told us to stop sharing. Force stopping by closing connection from applet.
// We're changing how to tell the applet to stop sharing as AS ExternalInterface to JS to Applet calls
// generates a popup dialog that users may or may not see causing the browser to hang. (ralam aug 24, 2014)
log.info("Sharing has stopped for meeting [" + event.getRoom() + "]. Closing connection.");
session.close(true);
}
} else if (message instanceof CaptureEndBlockEvent) {
CaptureEndBlockEvent event = (CaptureEndBlockEvent) message;
sessionManager.removeSession(event.getRoom(), event.getSequenceNum());
} else if (message instanceof MouseLocationEvent) {
MouseLocationEvent event = (MouseLocationEvent) message;
sessionManager.updateMouseLocation(event.getRoom(), event.getLoc(), event.getSequenceNum());
}
}