Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/Core.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/Core.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/Core.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/CoreScreenShare.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/Core.java Wed Sep 14 05:24:18 2016 @@ -16,32 +16,36 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; -import static java.awt.Toolkit.getDefaultToolkit; -import static java.awt.datatransfer.DataFlavor.stringFlavor; import static java.lang.Boolean.TRUE; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.resizeX; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.resizeY; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.spinnerHeight; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.spinnerWidth; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.spinnerX; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.spinnerY; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeY; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerHeight; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerWidth; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerY; +import static org.apache.openmeetings.screenshare.util.Util.getQurtzProps; +import static org.quartz.SimpleScheduleBuilder.simpleSchedule; import static org.slf4j.LoggerFactory.getLogger; import java.awt.MouseInfo; import java.awt.Point; -import java.awt.Robot; -import java.awt.datatransfer.Clipboard; -import java.awt.datatransfer.StringSelection; -import java.awt.datatransfer.Transferable; -import java.awt.event.InputEvent; -import java.awt.event.KeyEvent; import java.net.URI; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.LinkedBlockingQueue; -import org.apache.openmeetings.screen.webstart.gui.ScreenSharerFrame; +import org.apache.openmeetings.screenshare.gui.ScreenSharerFrame; +import org.apache.openmeetings.screenshare.job.RemoteJob; +import org.quartz.JobBuilder; +import org.quartz.JobDetail; +import org.quartz.Scheduler; +import org.quartz.SchedulerException; +import org.quartz.SchedulerFactory; +import org.quartz.Trigger; +import org.quartz.TriggerBuilder; +import org.quartz.impl.StdSchedulerFactory; import org.red5.client.net.rtmp.INetStreamEventHandler; import org.red5.io.utils.ObjectMap; import org.red5.server.api.Red5; @@ -57,8 +61,12 @@ import org.red5.server.net.rtmp.status.S import org.slf4j.Logger; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; -public class CoreScreenShare implements IPendingServiceCallback, INetStreamEventHandler { - private static final Logger log = getLogger(CoreScreenShare.class); +public class Core implements IPendingServiceCallback, INetStreamEventHandler { + private static final Logger log = getLogger(Core.class); + public static float Ampl_factor = 1f; + final static String QUARTZ_GROUP_NAME = "ScreenShare"; + final static String QUARTZ_REMOTE_JOB_NAME = "RemoteJob"; + final static String QUARTZ_REMOTE_TRIGGER_NAME = "RemoteTrigger"; enum Protocol { rtmp, rtmpt, rtmpe, rtmps @@ -82,16 +90,16 @@ public class CoreScreenShare implements private boolean allowRecording = true; private boolean allowPublishing = true; - private boolean startStreaming = false; + private boolean startSharing = false; private boolean startRecording = false; private boolean startPublishing = false; - public float Ampl_factor = 1f; public boolean isConnected = false; private boolean readyToRecord = false; private boolean audioNotify = false; private boolean remoteEnabled = true; - - public Map<Integer, Boolean> currentPressedKeys = new HashMap<Integer, Boolean>(); + private SchedulerFactory schdlrFactory; + private Scheduler schdlr; + private LinkedBlockingQueue<Map<String, Object>> remoteEvents = new LinkedBlockingQueue<>(); private CaptureScreen getCapture() { if (_capture == null) { @@ -105,7 +113,7 @@ public class CoreScreenShare implements // // ------------------------------------------------------------------------ - public CoreScreenShare(String[] args) { + public Core(String[] args) { try { System.setProperty("org.terracotta.quartz.skipUpdateCheck", "true"); for (String arg : args) { @@ -132,9 +140,7 @@ public class CoreScreenShare implements textArray = labelTexts.split(";"); log.debug("labelTexts :: " + labelTexts); - log.debug("textArray Length " + textArray.length); - for (int i = 0; i < textArray.length; i++) { log.debug(i + " :: " + textArray[i]); } @@ -166,6 +172,15 @@ public class CoreScreenShare implements } else { System.exit(0); } + schdlrFactory = new StdSchedulerFactory(getQurtzProps("CoreScreenShare")); + schdlr = schdlrFactory.getScheduler(); + JobDetail remoteJob = JobBuilder.newJob(RemoteJob.class).withIdentity(QUARTZ_REMOTE_JOB_NAME, QUARTZ_GROUP_NAME).build(); + Trigger cursorTrigger = TriggerBuilder.newTrigger() + .withIdentity(QUARTZ_REMOTE_TRIGGER_NAME, QUARTZ_GROUP_NAME) + .withSchedule(simpleSchedule().withIntervalInMilliseconds(50).repeatForever()) + .build(); + remoteJob.getJobDataMap().put(RemoteJob.CORE_KEY, this); + schdlr.scheduleJob(remoteJob, cursorTrigger); createWindow(textArray); } catch (Exception err) { @@ -174,7 +189,7 @@ public class CoreScreenShare implements } public static void main(String[] args) { - new CoreScreenShare(args); + new Core(args); } // ------------------------------------------------------------------------ @@ -243,7 +258,7 @@ public class CoreScreenShare implements map.put("screenHeight", scaledHeight); map.put("publishName", publishName); map.put("startRecording", startRecording); - map.put("startStreaming", startStreaming); + map.put("startStreaming", startSharing); map.put("startPublishing", startPublishing); map.put("publishingHost", frame.getPublishHost()); map.put("publishingApp", frame.getPublishApp()); @@ -258,8 +273,13 @@ public class CoreScreenShare implements } } - public void streamingStart() { - startStreaming = true; + public void sharingStart() { + try { + schdlr.start(); + } catch (SchedulerException e) { + log.error("[schdlr.start]", e); + } + startSharing = true; captureScreenStart(); } @@ -295,8 +315,13 @@ public class CoreScreenShare implements } } - public void streamingStop() { - startStreaming = false; + public void sharingStop() { + try { + schdlr.standby(); + } catch (SchedulerException e) { + log.error("[schdlr.standby]", e); + } + startSharing = false; captureScreenStop("stopStreaming"); } @@ -327,18 +352,23 @@ public class CoreScreenShare implements } } - public void stopStreaming() { - frame.setSharingStatus(false, !startPublishing && !startRecording && !startStreaming); - startStreaming = false; + public void stopSharing() { + try { + schdlr.standby(); + } catch (SchedulerException e) { + log.error("[schdlr.standby]", e); + } + frame.setSharingStatus(false, !startPublishing && !startRecording && !startSharing); + startSharing = false; } public void stopRecording() { - frame.setRecordingStatus(false, !startPublishing && !startRecording && !startStreaming); + frame.setRecordingStatus(false, !startPublishing && !startRecording && !startSharing); startRecording = false; } public void stopPublishing() { - frame.setPublishingStatus(false, !startPublishing && !startRecording && !startStreaming); + frame.setPublishingStatus(false, !startPublishing && !startRecording && !startSharing); startPublishing = false; if (publishClient != null) { publishClient.disconnect(); @@ -383,7 +413,7 @@ public class CoreScreenShare implements try { log.debug("ScreenShare stopStream"); - stopStreaming(); + stopSharing(); stopRecording(); stopPublishing(); isConnected = false; @@ -417,239 +447,16 @@ public class CoreScreenShare implements return TRUE.equals(Boolean.valueOf("" + b)); } - private static String getString(Map<String, Object> map, String key) { - return String.valueOf(map.get(key)); - } - - private static Double getDouble(Map<String, Object> map, String key) { - return Double.valueOf(getString(map, key)); - } - - private static int getInt(Map<String, Object> map, String key) { - return getDouble(map, key).intValue(); - } - - private static float getFloat(Map<String, Object> map, String key) { - return getDouble(map, key).floatValue(); - } - - private Point getCoordinates(Map<String, Object> returnMap) { - float scaleFactorX = spinnerWidth / (Ampl_factor * resizeX); - float scaleFactorY = spinnerHeight / (Ampl_factor * resizeY); - - int x = Math.round(scaleFactorX * getFloat(returnMap, "x") + spinnerX); - int y = Math.round(scaleFactorY * getFloat(returnMap, "y") + spinnerY); - return new Point(x, y); - } - - public void sendRemoteCursorEvent(Object obj) { - try { - if (!remoteEnabled) { - return; - } - log.trace("#### sendRemoteCursorEvent "); - log.trace("Result Map Type "+obj.getClass().getName()); - - @SuppressWarnings("unchecked") - Map<String, Object> returnMap = (Map<String, Object>)obj; - - String action = "" + returnMap.get("action"); - - if (action.equals("onmouseup")) { - Robot robot = new Robot(); - - Point p = getCoordinates(returnMap); - robot.mouseMove(p.x, p.y); - robot.mouseRelease(InputEvent.BUTTON1_MASK); - } else if (action.equals("onmousedown")) { - Robot robot = new Robot(); - - Point p = getCoordinates(returnMap); - robot.mouseMove(p.x, p.y); - robot.mousePress(InputEvent.BUTTON1_MASK); - } else if (action.equals("mousePos")) { - Robot robot = new Robot(); - - Point p = getCoordinates(returnMap); - robot.mouseMove(p.x, p.y); - } else if (action.equals("onkeydown")) { - Robot robot = new Robot(); - - int key = getInt(returnMap, "k"); - - log.trace("KEY EVENT!!!!! key onkeydown -1 " + key); - boolean doAction = true; - - if (key == 221) { - key = 61; - } else if (key == -1) { - String charValue = returnMap.get("c").toString(); - - // key = KeyEvent.VK_ADD; - doAction = false; - - for (Integer storedKey : currentPressedKeys.keySet()) { - robot.keyRelease(storedKey); - } - - currentPressedKeys.clear(); - - pressSpecialSign(charValue, robot); - } else if (key == 188) { - key = 44; - } else if (key == 189) { - key = 109; - } else if (key == 190) { - key = 46; - } else if (key == 191) { - key = 47; - } else if (key == 13) { - key = KeyEvent.VK_ENTER; - } - - if (doAction) { - currentPressedKeys.put(key, true); - - robot.keyPress(key); - } - } else if (action.equals("onkeyup")) { - Robot robot = new Robot(); - - int key = getInt(returnMap, "k"); - - boolean doAction = true; - - if (key == 221) { - key = 61; - } else if (key == -1) { - doAction = false; - } else if (key == 188) { - key = 44; - } else if (key == 189) { - key = 109; - } else if (key == 190) { - key = 46; - } else if (key == 191) { - key = 47; - } else if (key == 13) { - key = KeyEvent.VK_ENTER; - } - - log.trace("KEY EVENT!!!!! key onkeyup 2- " + key); - - if (doAction) { - if (currentPressedKeys.containsKey(key)) { - currentPressedKeys.remove(key); - - robot.keyRelease(key); - } - } - } else if (action.equals("paste")) { - Robot robot = new Robot(); - - String paste = returnMap.get("paste").toString(); - - pressSpecialSign(paste, robot); - } else if (action.equals("copy")) { - Robot robot = new Robot(); - - String paste = this.getHighlightedText(robot); - - Map<Integer, String> map = new HashMap<Integer, String>(); - map.put(0, "copiedText"); - map.put(1, paste); - - String clientId = returnMap.get("clientId").toString(); - - instance.invoke("sendMessageWithClientById", new Object[]{map, clientId}, this); - } else if (action.equals("show")) { - String paste = getClipboardText(); - - Map<Integer, String> map = new HashMap<Integer, String>(); - map.put(0, "copiedText"); - map.put(1, paste); - - String clientId = returnMap.get("clientId").toString(); - - instance.invoke("sendMessageWithClientById", new Object[]{map, clientId}, this); - } - } catch (Exception err) { - log.error("[sendRemoteCursorEvent]", err); - } - } - - public String getClipboardText() { - try { - // get the system clipboard - Clipboard systemClipboard = getDefaultToolkit().getSystemClipboard(); - - // get the contents on the clipboard in a - // transferable object - Transferable clipboardContents = systemClipboard.getContents(null); - - // check if clipboard is empty - if (clipboardContents == null) { - // Clipboard is empty!!! - return (""); - - // see if DataFlavor of - // DataFlavor.stringFlavor is supported - } else if (clipboardContents.isDataFlavorSupported(stringFlavor)) { - // return text content - String returnText = (String) clipboardContents.getTransferData(stringFlavor); - - return returnText; - } - - return ""; - } catch (Exception e) { - log.error("Unexpected exception while getting clipboard text", e); - } - return ""; - } - - private static void pressSequence(Robot robot, long delay, int... codes) throws InterruptedException { - for (int i = 0; i < codes.length; ++i) { - robot.keyPress(codes[i]); - Thread.sleep(delay); - } - for (int i = codes.length - 1; i >= 0; --i) { - robot.keyRelease(codes[i]); - Thread.sleep(delay); - } - } - - private String getHighlightedText(Robot robot) { - try { - if (System.getProperty("os.name").toUpperCase().indexOf("WINDOWS") >= 0) { - // pressing STRG+C == copy - pressSequence(robot, 200, KeyEvent.VK_CONTROL, KeyEvent.VK_C); - } else { - // Macintosh simulate Copy - pressSequence(robot, 200, 157, 67); - } - return getClipboardText(); - } catch (Exception e) { - log.error("Unexpected exception while getting highlighted text", e); + public void sendRemoteCursorEvent(Map<String, Object> obj) { + if (!remoteEnabled) { + return; } - return ""; - } - - private static void pressSpecialSign(String charValue, Robot robot) { - Clipboard clippy = getDefaultToolkit().getSystemClipboard(); - try { - Transferable transferableText = new StringSelection(charValue); - clippy.setContents(transferableText, null); + log.trace("#### sendRemoteCursorEvent "); + log.trace("Result Map Type "+ obj); - if (System.getProperty("os.name").toUpperCase().indexOf("WINDOWS") > -1) { - // pressing STRG+V == insert-mode - pressSequence(robot, 100, KeyEvent.VK_CONTROL, KeyEvent.VK_V); - } else { - // Macintosh simulate Insert - pressSequence(robot, 100, 157, 86); - } - } catch (Exception e) { - log.error("Unexpected exception while pressSpecialSign", e); + if (obj != null) { + remoteEvents.offer(obj); + log.trace("Action offered:: {}, count: {}", obj, remoteEvents.size()); } } @@ -707,7 +514,7 @@ public class CoreScreenShare implements return; } } else if ("createStream".equals(method)) { - if (startRecording || startStreaming) { + if (startRecording || startSharing) { if (o != null && o instanceof Number) { getCapture().setStreamId((Number)o); } @@ -717,7 +524,7 @@ public class CoreScreenShare implements log.debug("setup capture thread spinnerWidth = {}; spinnerHeight = {};", spinnerWidth, spinnerHeight); if (!getCapture().isAlive()) { - getCapture().setSendCursor(startStreaming); + getCapture().setSendCursor(startSharing); getCapture().start(); } } @@ -727,7 +534,7 @@ public class CoreScreenShare implements log.trace("Stopping to stream, there is neither a Desktop Sharing nor Recording anymore"); stopStream(); } else if ("stopSharingOnly".equals(result)) { - stopStreaming(); + stopSharing(); } else if ("stopRecordingOnly".equals(result)) { stopRecording(); } else if ("stopPublishingOnly".equals(result)) { @@ -769,4 +576,12 @@ public class CoreScreenShare implements deadlockGuard.afterPropertiesSet(); conn.setDeadlockGuardScheduler(deadlockGuard); } + + public IScreenShare getInstance() { + return instance; + } + + public LinkedBlockingQueue<Map<String, Object>> getRemoteEvents() { + return remoteEvents; + } }
Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenEncoder.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/IScreenEncoder.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenEncoder.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenEncoder.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/IScreenEncoder.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/IScreenEncoder.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenEncoder.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import java.io.IOException; Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenShare.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/IScreenShare.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenShare.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenShare.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/IScreenShare.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/IScreenShare.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/IScreenShare.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import java.util.Map; Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPClientPublish.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPClientPublish.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPClientPublish.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPClientPublish.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPClientPublish.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPClientPublish.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPClientPublish.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import org.red5.client.net.rtmp.INetStreamEventHandler; import org.red5.client.net.rtmp.RTMPClient; @@ -34,13 +34,13 @@ class RTMPClientPublish extends RTMPClie private static final Logger logger = LoggerFactory.getLogger(RTMPClientPublish.class); private final CaptureScreen publishScreen; private String id; - private CoreScreenShare core; + private Core core; - public void setCore(CoreScreenShare core) { + public void setCore(Core core) { this.core = core; } - RTMPClientPublish(CoreScreenShare core, String host, String app, String id) { + RTMPClientPublish(Core core, String host, String app, String id) { this.id = id; this.core = core; publishScreen = new CaptureScreen(core, this, host, app, 1935); Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPSScreenShare.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPSScreenShare.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPSScreenShare.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPSScreenShare.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPSScreenShare.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPSScreenShare.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPSScreenShare.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import org.red5.client.net.rtmps.RTMPSClient; import org.red5.server.net.ICommand; @@ -29,9 +29,9 @@ import org.slf4j.LoggerFactory; public class RTMPSScreenShare extends RTMPSClient implements IScreenShare { private static final Logger log = LoggerFactory.getLogger(RTMPSScreenShare.class); - private final CoreScreenShare core; + private final Core core; - public RTMPSScreenShare(CoreScreenShare core) { + public RTMPSScreenShare(Core core) { this.core = core; }; Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPScreenShare.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPScreenShare.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPScreenShare.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPScreenShare.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPScreenShare.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPScreenShare.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPScreenShare.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import org.red5.client.net.rtmp.RTMPClient; import org.red5.server.net.ICommand; @@ -29,9 +29,9 @@ import org.slf4j.LoggerFactory; public class RTMPScreenShare extends RTMPClient implements IScreenShare { private static final Logger log = LoggerFactory.getLogger(RTMPScreenShare.class); - private final CoreScreenShare core; + private final Core core; - public RTMPScreenShare(CoreScreenShare core) { + public RTMPScreenShare(Core core) { this.core = core; } Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTSScreenShare.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTSScreenShare.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTSScreenShare.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTSScreenShare.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTSScreenShare.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTSScreenShare.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTSScreenShare.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import org.red5.client.net.rtmps.RTMPTSClient; import org.red5.server.net.ICommand; @@ -29,9 +29,9 @@ import org.slf4j.LoggerFactory; public class RTMPTSScreenShare extends RTMPTSClient implements IScreenShare { private static final Logger log = LoggerFactory.getLogger(RTMPTSScreenShare.class); - private final CoreScreenShare core; + private final Core core; - public RTMPTSScreenShare(CoreScreenShare core, boolean secure) { + public RTMPTSScreenShare(Core core, boolean secure) { this.core = core; }; Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTScreenShare.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTScreenShare.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTScreenShare.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/RTMPTScreenShare.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/RTMPTScreenShare.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; import org.red5.client.net.rtmpt.RTMPTClient; import org.red5.server.net.ICommand; @@ -29,9 +29,9 @@ import org.slf4j.LoggerFactory; public class RTMPTScreenShare extends RTMPTClient implements IScreenShare { private static final Logger log = LoggerFactory.getLogger(RTMPTScreenShare.class); - private final CoreScreenShare core; + private final Core core; - public RTMPTScreenShare(CoreScreenShare core) { + public RTMPTScreenShare(Core core) { this.core = core; }; Copied: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java (from r1760630, openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/ScreenV1Encoder.java) URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java?p2=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java&p1=openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/ScreenV1Encoder.java&r1=1760630&r2=1760631&rev=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screen/webstart/ScreenV1Encoder.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/ScreenV1Encoder.java Wed Sep 14 05:24:18 2016 @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart; +package org.apache.openmeetings.screenshare; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.resizeX; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.resizeY; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeY; import static org.red5.io.IoConstants.FLAG_CODEC_SCREEN; import static org.red5.io.IoConstants.FLAG_FRAMETYPE_INTERFRAME; import static org.red5.io.IoConstants.FLAG_FRAMETYPE_KEYFRAME; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/BlankArea.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/BlankArea.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/BlankArea.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/BlankArea.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import javax.swing.*; import java.awt.Dimension; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/MouseListenerable.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/MouseListenerable.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/MouseListenerable.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/MouseListenerable.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.event.MouseAdapter; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/NumberSpinner.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/NumberSpinner.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/NumberSpinner.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/NumberSpinner.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import javax.swing.JSpinner; import javax.swing.SpinnerNumberModel; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenDimensions.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenDimensions.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenDimensions.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenDimensions.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.Dimension; import java.awt.Toolkit; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenHeightMouseListener.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenHeightMouseListener.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenHeightMouseListener.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenHeightMouseListener.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.Component; import java.awt.Cursor; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenKeyListener.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenKeyListener.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenKeyListener.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenKeyListener.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenMouseListener.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenMouseListener.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenMouseListener.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenMouseListener.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.Component; import java.awt.Cursor; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenSharerFrame.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenSharerFrame.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenSharerFrame.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenSharerFrame.java Wed Sep 14 05:24:18 2016 @@ -16,11 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.ROUND_VALUE; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.resizeX; -import static org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.resizeY; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.ROUND_VALUE; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeY; import static org.slf4j.LoggerFactory.getLogger; import java.awt.AWTException; @@ -56,8 +56,8 @@ import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; -import org.apache.openmeetings.screen.webstart.CoreScreenShare; -import org.apache.openmeetings.screen.webstart.gui.ScreenDimensions.ScreenQuality; +import org.apache.openmeetings.screenshare.Core; +import org.apache.openmeetings.screenshare.gui.ScreenDimensions.ScreenQuality; import org.slf4j.Logger; public class ScreenSharerFrame extends JFrame { @@ -191,8 +191,8 @@ public class ScreenSharerFrame extends J private static final long serialVersionUID = 1L; public VerticalSlider() { - ImageIcon iUp = new ImageIcon(ScreenSharerFrame.class.getResource("/org/apache/openmeetings/screen/up.png")); - ImageIcon iDown = new ImageIcon(ScreenSharerFrame.class.getResource("/org/apache/openmeetings/screen/down.png")); + ImageIcon iUp = new ImageIcon(ScreenSharerFrame.class.getResource("up.png")); + ImageIcon iDown = new ImageIcon(ScreenSharerFrame.class.getResource("down.png")); setSize(16, 32); JLabel jUp = new JLabel(iUp); jUp.setBounds(0, 0, 16, 16); @@ -207,8 +207,8 @@ public class ScreenSharerFrame extends J private static final long serialVersionUID = 1L; public HorizontalSlider() { - ImageIcon iLeft = new ImageIcon(ScreenSharerFrame.class.getResource("/org/apache/openmeetings/screen/previous.png")); - ImageIcon iRight = new ImageIcon(ScreenSharerFrame.class.getResource("/org/apache/openmeetings/screen/next.png")); + ImageIcon iLeft = new ImageIcon(ScreenSharerFrame.class.getResource("previous.png")); + ImageIcon iRight = new ImageIcon(ScreenSharerFrame.class.getResource("next.png")); setSize(32, 16); JLabel jLeft = new JLabel(iLeft); jLeft.setBounds(0, 0, 16, 16); @@ -228,7 +228,7 @@ public class ScreenSharerFrame extends J * @throws AWTException * @throws IOException */ - public ScreenSharerFrame(final CoreScreenShare core, String[] textLabels) throws AWTException { + public ScreenSharerFrame(final Core core, String[] textLabels) throws AWTException { setTitle(getTextLabel(textLabels, 0)); //#id 730 setBackground(Color.WHITE); setResizable(false); @@ -261,8 +261,8 @@ public class ScreenSharerFrame extends J reduceYLabel = getTextLabel(textLabels, 32); //#id 1474 recordingTipLabel = getTextLabel(textLabels, 35); //#id 1477 publishingTipLabel = getTextLabel(textLabels, 34); //#id 1476 - startIcon = new ImageIcon(ScreenSharerFrame.class.getResource("/org/apache/openmeetings/screen/play.png")); - stopIcon = new ImageIcon(ScreenSharerFrame.class.getResource("/org/apache/openmeetings/screen/stop.png")); + startIcon = new ImageIcon(getClass().getResource("play.png")); + stopIcon = new ImageIcon(getClass().getResource("stop.png")); btnStartStopSharing = new JButton(startSharingLabel); btnStartStopSharing.setToolTipText(startSharingLabel); btnStartStopSharing.setIcon(startIcon); @@ -273,14 +273,14 @@ public class ScreenSharerFrame extends J if (sharingStarted) { if (!sharingActionRequested) { sharingActionRequested = true; - core.streamingStop(); + core.sharingStop(); } else { logger.warn("Sharing action is already requested"); } } else { if (!sharingActionRequested) { sharingActionRequested = true; - core.streamingStart(); + core.sharingStart(); } else { logger.warn("Sharing action is already requested"); } Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenWidthMouseListener.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenWidthMouseListener.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenWidthMouseListener.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenWidthMouseListener.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.Component; import java.awt.Cursor; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenXMouseListener.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenXMouseListener.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenXMouseListener.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenXMouseListener.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.Component; import java.awt.Cursor; Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenYMouseListener.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenYMouseListener.java?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenYMouseListener.java (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/gui/ScreenYMouseListener.java Wed Sep 14 05:24:18 2016 @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.openmeetings.screen.webstart.gui; +package org.apache.openmeetings.screenshare.gui; import java.awt.Component; import java.awt.Cursor; Added: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/CursorJob.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/CursorJob.java?rev=1760631&view=auto ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/CursorJob.java (added) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/CursorJob.java Wed Sep 14 05:24:18 2016 @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.screenshare.job; + +import org.apache.openmeetings.screenshare.CaptureScreen; +import org.quartz.DisallowConcurrentExecution; +import org.quartz.Job; +import org.quartz.JobDataMap; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; + +@DisallowConcurrentExecution +public class CursorJob implements Job { + public static final String CAPTURE_KEY = "capture"; + + public CursorJob() {} + + @Override + public void execute(JobExecutionContext context) throws JobExecutionException { + JobDataMap data = context.getJobDetail().getJobDataMap(); + CaptureScreen capture = (CaptureScreen)data.get(CAPTURE_KEY); + if (!capture.getSendFrameGuard()) { + capture.sendCursorStatus(); + } + } +} Added: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/EncodeJob.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/EncodeJob.java?rev=1760631&view=auto ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/EncodeJob.java (added) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/EncodeJob.java Wed Sep 14 05:24:18 2016 @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.screenshare.job; + +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerHeight; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerWidth; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerY; +import static org.slf4j.LoggerFactory.getLogger; + +import java.awt.AWTException; +import java.awt.Rectangle; +import java.awt.Robot; + +import org.apache.openmeetings.screenshare.CaptureScreen; +import org.apache.openmeetings.screenshare.ScreenV1Encoder; +import org.quartz.DisallowConcurrentExecution; +import org.quartz.Job; +import org.quartz.JobDataMap; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.red5.server.net.rtmp.event.VideoData; +import org.slf4j.Logger; + +@DisallowConcurrentExecution +public class EncodeJob implements Job { + private static final Logger log = getLogger(EncodeJob.class); + public static final String CAPTURE_KEY = "capture"; + Robot robot; + Rectangle screen = new Rectangle(spinnerX, spinnerY, spinnerWidth, spinnerHeight); + int[][] image = null; + + public EncodeJob() { + try { + robot = new Robot(); + } catch (AWTException e) { + log.error("encode: Unexpected Error while creating robot", e); + } + } + + @Override + public void execute(JobExecutionContext context) throws JobExecutionException { + JobDataMap data = context.getJobDetail().getJobDataMap(); + CaptureScreen capture = (CaptureScreen)data.get(CAPTURE_KEY); + + long start = 0; + if (log.isTraceEnabled()) { + start = System.currentTimeMillis(); + } + image = ScreenV1Encoder.getImage(screen, robot); + if (log.isTraceEnabled()) { + log.trace(String.format("encode: Image was captured in %s ms, size %sk", System.currentTimeMillis() - start, 4 * image.length * image[0].length / 1024)); + start = System.currentTimeMillis(); + } + try { + VideoData vData = capture.getEncoder().encode(image); + if (log.isTraceEnabled()) { + long now = System.currentTimeMillis(); + log.trace(String.format("encode: Image was encoded in %s ms, timestamp is %s", now - start, now - capture.getStartTime())); + } + capture.getFrames().offer(vData); + capture.getEncoder().createUnalteredFrame(); + } catch (Exception e) { + log.error("Error while encoding: ", e); + } + } +} Added: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/OmKeyEvent.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/OmKeyEvent.java?rev=1760631&view=auto ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/OmKeyEvent.java (added) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/OmKeyEvent.java Wed Sep 14 05:24:18 2016 @@ -0,0 +1,128 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.screenshare.job; + +import static java.lang.Boolean.TRUE; +import java.awt.event.KeyEvent; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.slf4j.Logger; + +import static org.apache.openmeetings.screenshare.util.Util.getInt; +import static org.slf4j.LoggerFactory.getLogger; + +public class OmKeyEvent { + private static final Logger log = getLogger(OmKeyEvent.class); + private static final Map<Integer, Integer> KEY_MAP = new HashMap<>(); + static { + KEY_MAP.put(13, KeyEvent.VK_ENTER); + KEY_MAP.put(16, 0); + KEY_MAP.put(20, KeyEvent.VK_CAPS_LOCK); + KEY_MAP.put(46, KeyEvent.VK_DELETE); + KEY_MAP.put(110, KeyEvent.VK_DECIMAL); + KEY_MAP.put(186, KeyEvent.VK_SEMICOLON); + KEY_MAP.put(187, KeyEvent.VK_EQUALS); + KEY_MAP.put(188, KeyEvent.VK_COMMA); + KEY_MAP.put(189, KeyEvent.VK_MINUS); + KEY_MAP.put(190, KeyEvent.VK_PERIOD); + KEY_MAP.put(191, KeyEvent.VK_SLASH); + KEY_MAP.put(219, KeyEvent.VK_OPEN_BRACKET); + KEY_MAP.put(220, KeyEvent.VK_BACK_SLASH); + KEY_MAP.put(221, KeyEvent.VK_CLOSE_BRACKET); + KEY_MAP.put(222, KeyEvent.VK_QUOTE); + } + private boolean alt = false; + private boolean ctrl = false; + private boolean shift = false; + private int key = 0; + private char ch = 0; + + public OmKeyEvent(int key) { + this(key, false); + } + + public OmKeyEvent(int key, boolean shift) { + this.key = key; + this.shift = shift; + } + + public OmKeyEvent(Map<String, Object> obj) { + alt = TRUE.equals(obj.get("alt")); + ctrl = TRUE.equals(obj.get("ctrl")); + shift = TRUE.equals(obj.get("shift")); + ch = (char)getInt(obj, "char"); + Integer _key = null; + int key = getInt(obj, "key"); + if (key == 0) { + if (ch == 61) { + this.key = KeyEvent.VK_EQUALS; + } + } else { + _key = KEY_MAP.get(key); + this.key = _key == null ? key : _key; + } + log.debug("sequence:: shift {}, orig {} -> key {}, _key {}", shift, key, this.key, _key); + } + + public int[] sequence() { + List<Integer> list = new ArrayList<>(); + if (alt) { + list.add(KeyEvent.VK_ALT); + } + if (ctrl) { + list.add(KeyEvent.VK_CONTROL); + } + if (shift) { + list.add(KeyEvent.VK_SHIFT); + } + if (key != 0) { + list.add(key); + } + return list.stream().mapToInt(Integer::intValue).toArray(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + key; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof OmKeyEvent)) { + return false; + } + OmKeyEvent other = (OmKeyEvent) obj; + if (key != other.key) { + return false; + } + return true; + } +} Added: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/RemoteJob.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/RemoteJob.java?rev=1760631&view=auto ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/RemoteJob.java (added) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/RemoteJob.java Wed Sep 14 05:24:18 2016 @@ -0,0 +1,194 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.screenshare.job; + +import static java.awt.Toolkit.getDefaultToolkit; +import static java.awt.datatransfer.DataFlavor.stringFlavor; +import static org.apache.openmeetings.screenshare.Core.Ampl_factor; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.resizeY; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerHeight; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerWidth; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerX; +import static org.apache.openmeetings.screenshare.gui.ScreenDimensions.spinnerY; +import static org.apache.openmeetings.screenshare.util.Util.getFloat; +import static org.slf4j.LoggerFactory.getLogger; + +import java.awt.AWTException; +import java.awt.Point; +import java.awt.Robot; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.StringSelection; +import java.awt.datatransfer.Transferable; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.apache.openmeetings.screenshare.Core; +import org.quartz.DisallowConcurrentExecution; +import org.quartz.Job; +import org.quartz.JobDataMap; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.slf4j.Logger; + +@DisallowConcurrentExecution +public class RemoteJob implements Job { + private static final Logger log = getLogger(RemoteJob.class); + private static final boolean isWindows = System.getProperty("os.name").toUpperCase().indexOf("WINDOWS") > -1; + public static final String CORE_KEY = "core"; + private Robot robot = null; + + public RemoteJob() { + try { + robot = new Robot(); + robot.setAutoDelay(5); + } catch (AWTException e) { + log.error("Unexpected error while creating Robot", e); + } + } + + @Override + public void execute(JobExecutionContext context) throws JobExecutionException { + JobDataMap data = context.getJobDetail().getJobDataMap(); + Core core = (Core)data.get(CORE_KEY); + try { + Map<String, Object> obj = null; + while ((obj = core.getRemoteEvents().poll(1, TimeUnit.MILLISECONDS)) != null) { + String action = "" + obj.get("action"); + log.trace("Action polled:: {}, count: {}", action, core.getRemoteEvents().size()); + + if (action.equals("onmouseup")) { + Point p = getCoordinates(obj); + robot.mouseMove(p.x, p.y); + robot.mouseRelease(InputEvent.BUTTON1_MASK); + } else if (action.equals("onmousedown")) { + Point p = getCoordinates(obj); + robot.mouseMove(p.x, p.y); + robot.mousePress(InputEvent.BUTTON1_MASK); + } else if (action.equals("mousePos")) { + Point p = getCoordinates(obj); + robot.mouseMove(p.x, p.y); + } else if (action.equals("keyDown")) { + pressSequence(new OmKeyEvent(obj).sequence()); + } else if (action.equals("paste")) { + String paste = obj.get("paste").toString(); + pressSpecialSign(paste); + } else if (action.equals("copy")) { + String paste = getHighlightedText(); + + Map<Integer, String> map = new HashMap<Integer, String>(); + map.put(0, "copiedText"); + map.put(1, paste); + + String clientId = obj.get("clientId").toString(); + + core.getInstance().invoke("sendMessageWithClientById", new Object[]{map, clientId}, core); + } else if (action.equals("show")) { + String paste = getClipboardText(); + + Map<Integer, String> map = new HashMap<Integer, String>(); + map.put(0, "copiedText"); + map.put(1, paste); + + String clientId = obj.get("clientId").toString(); + + core.getInstance().invoke("sendMessageWithClientById", new Object[]{map, clientId}, core); + } + } + } catch (Exception err) { + log.error("[sendRemoteCursorEvent]", err); + } + } + + private void pressSequence(int... codes) throws InterruptedException { + for (int i = 0; i < codes.length; ++i) { + robot.keyPress(codes[i]); + } + for (int i = codes.length - 1; i > -1; --i) { + robot.keyRelease(codes[i]); + } + } + + private String getHighlightedText() { + try { + if (isWindows) { + // pressing STRG+C == copy + pressSequence(KeyEvent.VK_CONTROL, KeyEvent.VK_C); + } else { + // Macintosh simulate Copy + pressSequence(157, 67); + } + return getClipboardText(); + } catch (Exception e) { + log.error("Unexpected exception while getting highlighted text", e); + } + return ""; + } + + public String getClipboardText() { + try { + // get the system clipboard + Clipboard systemClipboard = getDefaultToolkit().getSystemClipboard(); + // get the contents on the clipboard in a transferable object + Transferable clipboardContents = systemClipboard.getContents(null); + // check if clipboard is empty + if (clipboardContents == null) { + // Clipboard is empty!!! + } else if (clipboardContents.isDataFlavorSupported(stringFlavor)) { + // see if DataFlavor of DataFlavor.stringFlavor is supported + // return text content + String returnText = (String) clipboardContents.getTransferData(stringFlavor); + return returnText; + } + } catch (Exception e) { + log.error("Unexpected exception while getting clipboard text", e); + } + return ""; + } + + private void pressSpecialSign(String charValue) { + Clipboard clippy = getDefaultToolkit().getSystemClipboard(); + try { + Transferable transferableText = new StringSelection(charValue); + clippy.setContents(transferableText, null); + + if (isWindows) { + // pressing STRG+V == insert-mode + pressSequence(KeyEvent.VK_CONTROL, KeyEvent.VK_V); + } else { + // Macintosh simulate Insert + pressSequence(157, 86); + } + } catch (Exception e) { + log.error("Unexpected exception while pressSpecialSign", e); + } + } + + private Point getCoordinates(Map<String, Object> obj) { + float scaleFactorX = spinnerWidth / (Ampl_factor * resizeX); + float scaleFactorY = spinnerHeight / (Ampl_factor * resizeY); + + int x = Math.round(scaleFactorX * getFloat(obj, "x") + spinnerX); + int y = Math.round(scaleFactorY * getFloat(obj, "y") + spinnerY); + return new Point(x, y); + } +} Added: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/SendJob.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/SendJob.java?rev=1760631&view=auto ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/SendJob.java (added) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/job/SendJob.java Wed Sep 14 05:24:18 2016 @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.screenshare.job; + +import static org.slf4j.LoggerFactory.getLogger; + +import java.io.IOException; + +import org.apache.openmeetings.screenshare.CaptureScreen; +import org.quartz.Job; +import org.quartz.JobDataMap; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.red5.server.net.rtmp.event.VideoData; +import org.slf4j.Logger; + +public class SendJob implements Job { + private static final Logger log = getLogger(SendJob.class); + public static final String CAPTURE_KEY = "capture"; + public SendJob() {} + + @Override + public void execute(JobExecutionContext context) throws JobExecutionException { + JobDataMap data = context.getJobDetail().getJobDataMap(); + CaptureScreen capture = (CaptureScreen)data.get(CAPTURE_KEY); + capture.setSendFrameGuard(true); + if (log.isTraceEnabled()) { + long real = System.currentTimeMillis() - capture.getStartTime(); + log.trace(String.format("send: Enter method, timestamp: %s, real: %s, diff: %s", capture.getTimestamp(), real, real - capture.getTimestamp().get())); + } + VideoData f = capture.getFrames().poll(); + if (log.isTraceEnabled()) { + log.trace(String.format("send: Getting %s image", f == null ? "DUMMY" : "CAPTURED")); + } + f = f == null ? capture.getEncoder().getUnalteredFrame() : f; + if (f != null) { + try { + capture.pushVideo(f, capture.getTimestamp().get()); + if (log.isTraceEnabled()) { + long real = System.currentTimeMillis() - capture.getStartTime(); + log.trace(String.format("send: Sending video %sk, timestamp: %s, real: %s, diff: %s", f.getData().capacity() / 1024, capture.getTimestamp(), real, real - capture.getTimestamp().get())); + } + capture.getTimestamp().addAndGet(capture.getTimestampDelta()); + if (log.isTraceEnabled()) { + log.trace(String.format("send: new timestamp: %s", capture.getTimestamp())); + } + } catch (IOException e) { + log.error("Error while sending: ", e); + } + } else if (log.isTraceEnabled()) { + log.trace(String.format("send: nothing to send")); + } + capture.setSendFrameGuard(false); + } +} Added: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/util/Util.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/util/Util.java?rev=1760631&view=auto ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/util/Util.java (added) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/java/org/apache/openmeetings/screenshare/util/Util.java Wed Sep 14 05:24:18 2016 @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License") + you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.openmeetings.screenshare.util; + +import static org.quartz.impl.StdSchedulerFactory.PROP_SCHED_INSTANCE_NAME; +import static org.quartz.impl.StdSchedulerFactory.PROP_SCHED_SKIP_UPDATE_CHECK; + +import java.util.Map; +import java.util.Properties; + +public class Util { + public static Properties getQurtzProps(String name) { + final Properties p = new Properties(); + p.put(PROP_SCHED_SKIP_UPDATE_CHECK, "true"); + p.put(PROP_SCHED_INSTANCE_NAME, name); + p.put("org.quartz.threadPool.threadCount", "10"); + return p; + } + + public static String getString(Map<String, Object> map, String key) { + return String.valueOf(map.get(key)); + } + + public static Double getDouble(Map<String, Object> map, String key) { + return Double.valueOf(getString(map, key)); + } + + public static int getInt(Map<String, Object> map, String key) { + return getDouble(map, key).intValue(); + } + + public static float getFloat(Map<String, Object> map, String key) { + return getDouble(map, key).floatValue(); + } + +} Modified: openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp (original) +++ openmeetings/application/branches/3.1.x/openmeetings-screenshare/src/main/jnlp/templates/template.jnlp Wed Sep 14 05:24:18 2016 @@ -36,7 +36,7 @@ <jar href="bcprov-jdk15on-1.55.jar" main="true"/> <jar href="openmeetings-screenshare-${project.version}-full.jar" main="true"/> </resources> - <application-desc main-class='org.apache.openmeetings.screen.webstart.CoreScreenShare'> + <application-desc main-class='org.apache.openmeetings.screenshare.Core'> <argument>$url</argument> <argument>$publicSid</argument> <argument>$labels</argument> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/baseVideoView.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/baseVideoView.lzx?rev=1760631&r1=1760630&r2=1760631&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/baseVideoView.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/remote/baseVideoView.lzx Wed Sep 14 05:24:18 2016 @@ -9,7 +9,7 @@ with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -23,9 +23,9 @@ <!--- This class provides the basic functions for the video-output - @START_CODE - <baseVideoView x="20" y="20" width="320" height="240" bgcolor="black" /> - @END_CODE + @START_CODE + <baseVideoView x="20" y="20" width="320" height="240" bgcolor="black" /> + @END_CODE --> <class name="baseVideoView" width="${parent.width}" height="${parent.height}"> @@ -35,35 +35,35 @@ import flash.net.NetStream; </passthrough> - <attribute name="_sound" value="null"/> - <attribute name="__LZvideo" value="null"/> + <attribute name="_sound" value="null"/> + <attribute name="__LZvideo" value="null"/> <method name="init"><![CDATA[ - super.init(); - var mc = new Video(this.width, this.height); - this.sprite.addChild(mc); - this.__LZvideo = mc; - this.applySizeToVid(); - ]]></method> + super.init(); + var mc = new Video(this.width, this.height); + this.sprite.addChild(mc); + this.__LZvideo = mc; + this.applySizeToVid(); + ]]></method> <method name="applySizeToVid"> var vid = this._getflashvideo(); - if(vid != null) { - vid.width = this.width; - vid.height = this.height; - } else { - if ($debug) Debug.warn("applySizeToVid IS NULL ",this.width,this.height); - } + if(vid != null) { + vid.width = this.width; + vid.height = this.height; + } else { + if ($debug) Debug.warn("applySizeToVid IS NULL ",this.width,this.height); + } </method> - <handler name="onwidth" args="w"> - this.applySizeToVid(); - </handler> - - <handler name="onheight" args="h"> - //if ($debug) Debug.info("onheight ",this.width,this.height); - this.applySizeToVid(); - </handler> + <handler name="onwidth" args="w"> + this.applySizeToVid(); + </handler> + + <handler name="onheight" args="h"> + //if ($debug) Debug.info("onheight ",this.width,this.height); + this.applySizeToVid(); + </handler> <method name="_getflashvideo"> <