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

This commit is contained in:
Michael Jumper
2017-07-15 16:58:39 -07:00
parent 25de43391a
commit ed3c022f7e
2 changed files with 17 additions and 1 deletions

View File

@@ -34,7 +34,10 @@
<div id="display"> <div id="display">
<div class="notification-container"> <div class="notification-container">
<div class="seek-notification"> <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> </div>
</div> </div>

View File

@@ -41,6 +41,13 @@
*/ */
var playPause = document.getElementById('play-pause'); 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 * Text status display indicating the current playback position within the
* recording. * recording.
@@ -164,6 +171,12 @@
recording.pause(); recording.pause();
}; };
// Cancel seek operation when cancel button is clicked
cancelSeek.onclick = function cancelSeekOperation(e) {
recording.pause();
e.stopPropagation();
};
// Fit display within containing div // Fit display within containing div
recordingDisplay.onresize = function displayResized(width, height) { recordingDisplay.onresize = function displayResized(width, height) {