You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2017/07/19 18:37:13 UTC

[08/14] incubator-guacamole-client git commit: GUACAMOLE-346: Provide explicit "cancel" button for in-progress seek.

GUACAMOLE-346: Provide explicit "cancel" button for in-progress seek.

Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/ed3c022f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/ed3c022f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/ed3c022f

Branch: refs/heads/master
Commit: ed3c022f7e437bfad62ca3b4bd7286521e348a5f
Parents: 25de433
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Jul 15 16:58:39 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sat Jul 15 16:58:39 2017 -0700

----------------------------------------------------------------------
 .../src/main/webapp/index.html                         |  5 ++++-
 .../src/main/webapp/playback.js                        | 13 +++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ed3c022f/doc/guacamole-playback-example/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/doc/guacamole-playback-example/src/main/webapp/index.html b/doc/guacamole-playback-example/src/main/webapp/index.html
index 64f8cbc..9151ebc 100644
--- a/doc/guacamole-playback-example/src/main/webapp/index.html
+++ b/doc/guacamole-playback-example/src/main/webapp/index.html
@@ -34,7 +34,10 @@
             <div id="display">
                 <div class="notification-container">
                     <div class="seek-notification">
-                        <p>Seek in progress... Click "play" to cancel.</p>
+                        <p>
+                            Seek in progress...
+                            <button id="cancel-seek">Cancel</button>
+                        </p>
                     </div>
                 </div>
             </div>

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/ed3c022f/doc/guacamole-playback-example/src/main/webapp/playback.js
----------------------------------------------------------------------
diff --git a/doc/guacamole-playback-example/src/main/webapp/playback.js b/doc/guacamole-playback-example/src/main/webapp/playback.js
index d99322a..d699296 100644
--- a/doc/guacamole-playback-example/src/main/webapp/playback.js
+++ b/doc/guacamole-playback-example/src/main/webapp/playback.js
@@ -42,6 +42,13 @@
     var playPause = document.getElementById('play-pause');
 
     /**
+     * Button for cancelling in-progress seek operations.
+     *
+     * @type Element
+     */
+    var cancelSeek = document.getElementById('cancel-seek');
+
+    /**
      * Text status display indicating the current playback position within the
      * recording.
      *
@@ -164,6 +171,12 @@
             recording.pause();
     };
 
+    // Cancel seek operation when cancel button is clicked
+    cancelSeek.onclick = function cancelSeekOperation(e) {
+        recording.pause();
+        e.stopPropagation();
+    };
+
     // Fit display within containing div
     recordingDisplay.onresize = function displayResized(width, height) {