]> source.dussan.org Git - tigervnc.git/commitdiff
- Implemented liveshare archive playback pause.
authorwimba.com <wimba.com@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 2 Apr 2007 18:54:41 +0000 (18:54 +0000)
committerwimba.com <wimba.com@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 2 Apr 2007 18:54:41 +0000 (18:54 +0000)
- 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

java/src/com/tightvnc/rfbplayer/PARfbSender.java
java/src/com/tightvnc/rfbplayer/RfbPlayer.java

index 1f620cfa62db0956a7481db53fe3cd8a8bad04f2..c73fe25ea408bb7ed2cfcf2193618f41e8f23162 100644 (file)
@@ -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.");
   }
index 1d53674156903be9a3e454d788c9364723bbb7ab..be081a0d83107e91b1d2e69899538850b34da6a6 100644 (file)
@@ -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);