From: wimba.com Date: Mon, 2 Apr 2007 18:54:41 +0000 (+0000) Subject: - Implemented liveshare archive playback pause. X-Git-Tag: v0.0.90~475 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b5a903452b2b63a3a11b038b60055c4b41573422;p=tigervnc.git - Implemented liveshare archive playback pause. - Liveshare is now unloaded when archive playback is stopped. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2546 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/java/src/com/tightvnc/rfbplayer/PARfbSender.java b/java/src/com/tightvnc/rfbplayer/PARfbSender.java index 1f620cfa..c73fe25e 100644 --- a/java/src/com/tightvnc/rfbplayer/PARfbSender.java +++ b/java/src/com/tightvnc/rfbplayer/PARfbSender.java @@ -9,9 +9,18 @@ public class PARfbSender extends Applet { Applet receiver = null; receiver = RfbSharedStatic.refApplet; long time = Long.valueOf(getParameter("time")).longValue(); + boolean pause = (Integer.parseInt(getParameter("pause")) != 0); + boolean unpause = (Integer.parseInt(getParameter("unpause")) != 0); if (receiver != null) { - ((RfbPlayer)receiver).jumpTo(time); + + if (pause) { + ((RfbPlayer)receiver).setPaused(true); + } else if (unpause) { + ((RfbPlayer)receiver).setPaused(false); + } else { + ((RfbPlayer)receiver).jumpTo(time); + } } else System.out.println("Couldn't jump to time: " + time + " in RfbPlayer."); } diff --git a/java/src/com/tightvnc/rfbplayer/RfbPlayer.java b/java/src/com/tightvnc/rfbplayer/RfbPlayer.java index 1d536741..be081a0d 100644 --- a/java/src/com/tightvnc/rfbplayer/RfbPlayer.java +++ b/java/src/com/tightvnc/rfbplayer/RfbPlayer.java @@ -209,6 +209,22 @@ public class RfbPlayer extends java.applet.Applet } + public void setPausedInt(String paused) { + // default to true (pause) + int pause = 1; + + try { + pause = Integer.parseInt(paused); + } catch (NumberFormatException e) { + } + + if (pause == 0) { + setPaused(false); + } else { + setPaused(true); + } + } + public void setPaused(boolean paused) { if (showControls) buttonPanel.setPaused(paused);