mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1803: Default to 1000 millisecond refresh interval.
This commit is contained in:
@@ -37,9 +37,14 @@ var Guacamole = Guacamole || {};
|
|||||||
* position through the provided onseek() callback. If non-positive, this
|
* position through the provided onseek() callback. If non-positive, this
|
||||||
* parameter will be ignored, and the recording position will only be
|
* parameter will be ignored, and the recording position will only be
|
||||||
* updated when seek requests are made, or when new frames are rendered.
|
* updated when seek requests are made, or when new frames are rendered.
|
||||||
|
* If not specified, refreshInterval will default to 1000 milliseconds.
|
||||||
*/
|
*/
|
||||||
Guacamole.SessionRecording = function SessionRecording(source, refreshInterval) {
|
Guacamole.SessionRecording = function SessionRecording(source, refreshInterval) {
|
||||||
|
|
||||||
|
// Default the refresh interval to 1 second if not specified otherwise
|
||||||
|
if (refreshInterval === undefined)
|
||||||
|
refreshInterval = 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to this Guacamole.SessionRecording.
|
* Reference to this Guacamole.SessionRecording.
|
||||||
*
|
*
|
||||||
|
@@ -96,14 +96,6 @@ angular.module('player').directive('guacPlayer', ['$injector', function guacPlay
|
|||||||
config.controller = ['$scope', '$element', '$injector',
|
config.controller = ['$scope', '$element', '$injector',
|
||||||
function guacPlayerController($scope) {
|
function guacPlayerController($scope) {
|
||||||
|
|
||||||
/**
|
|
||||||
* The minimum number of milliseconds that should occur between updates
|
|
||||||
* to the progress indicator.
|
|
||||||
*
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
const PROGRESS_REFRESH_INTERVAL = 1000;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Guacamole.SessionRecording instance to be used to playback the
|
* Guacamole.SessionRecording instance to be used to playback the
|
||||||
* session recording given via $scope.src. If the recording has not
|
* session recording given via $scope.src. If the recording has not
|
||||||
@@ -311,8 +303,7 @@ angular.module('player').directive('guacPlayer', ['$injector', function guacPlay
|
|||||||
// Otherwise, begin loading the provided recording
|
// Otherwise, begin loading the provided recording
|
||||||
else {
|
else {
|
||||||
|
|
||||||
$scope.recording = new Guacamole.SessionRecording(
|
$scope.recording = new Guacamole.SessionRecording(src);
|
||||||
src, PROGRESS_REFRESH_INTERVAL);
|
|
||||||
|
|
||||||
// Begin downloading the recording
|
// Begin downloading the recording
|
||||||
$scope.recording.connect();
|
$scope.recording.connect();
|
||||||
|
Reference in New Issue
Block a user