diff --git a/guacamole-common-js/src/main/webapp/modules/SessionRecording.js b/guacamole-common-js/src/main/webapp/modules/SessionRecording.js index 37270a5fb..02a083bba 100644 --- a/guacamole-common-js/src/main/webapp/modules/SessionRecording.js +++ b/guacamole-common-js/src/main/webapp/modules/SessionRecording.js @@ -37,9 +37,14 @@ var Guacamole = Guacamole || {}; * position through the provided onseek() callback. If non-positive, this * parameter will be ignored, and the recording position will only be * 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) { + // Default the refresh interval to 1 second if not specified otherwise + if (refreshInterval === undefined) + refreshInterval = 1000; + /** * Reference to this Guacamole.SessionRecording. * diff --git a/guacamole/src/main/frontend/src/app/player/directives/player.js b/guacamole/src/main/frontend/src/app/player/directives/player.js index f2a008fee..7b3e08792 100644 --- a/guacamole/src/main/frontend/src/app/player/directives/player.js +++ b/guacamole/src/main/frontend/src/app/player/directives/player.js @@ -96,14 +96,6 @@ angular.module('player').directive('guacPlayer', ['$injector', function guacPlay config.controller = ['$scope', '$element', '$injector', 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 * 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 else { - $scope.recording = new Guacamole.SessionRecording( - src, PROGRESS_REFRESH_INTERVAL); + $scope.recording = new Guacamole.SessionRecording(src); // Begin downloading the recording $scope.recording.connect();