Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-2025: Add a button to close the recording video player. #1055

Open
wants to merge 1 commit into
base: patch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions guacamole/src/main/frontend/src/app/player/directives/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ angular.module('player').directive('guacPlayer', ['$injector', function guacPlay
const keyEventDisplayService = $injector.get('keyEventDisplayService');
const playerHeatmapService = $injector.get('playerHeatmapService');
const playerTimeService = $injector.get('playerTimeService');
const $location = $injector.get('$location');
const $routeParams = $injector.get('$routeParams');

/**
* The number of milliseconds after the last detected mouse activity after
Expand Down Expand Up @@ -406,6 +408,14 @@ angular.module('player').directive('guacPlayer', ['$injector', function guacPlay
}
};

/**
* Close recording player and return to history.
*/
$scope.closePlayer = function closePlayer() {
const datasource = encodeURIComponent($routeParams.dataSource);
$location.path('/settings/' + datasource + '/history');
};

// Automatically load the requested session recording
$scope.$watch('src', function srcChanged(src) {

Expand Down
26 changes: 26 additions & 0 deletions guacamole/src/main/frontend/src/app/player/styles/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ guac-player .guac-player-controls {
margin: 0;
}

.guac-player-controls .guac-player-close:hover,
.guac-player-controls .guac-player-play:hover,
.guac-player-controls .guac-player-pause:hover {
background: rgba(255, 255, 255, 0.5);
Expand Down Expand Up @@ -113,6 +114,31 @@ guac-player .guac-player-controls {
align-items: center;
}

.guac-player-controls .guac-player-close {
background: transparent;
border: 0;
box-shadow: none;
margin: 0;
min-width: 0;
padding: 0;
position: fixed;
right: 0;
top: 0;
}

.guac-player-controls .guac-player-close .close-icon {
background-image: url('images/x.svg');
background-position: center center;
background-repeat: no-repeat;
background-size: 50%;
content: "";
cursor: pointer;
display: block;
height: 40px;
margin: 0;
width: 40px;
}

.guac-player-controls .guac-player-keys {
margin-left: auto;
padding-right: 0.5em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@

<div class="guac-player-buttons">

<!-- Close button -->
<button class="guac-player-close"
ng-attr-title="{{ 'PLAYER.ACTION_CLOSE' | translate }}"
ng-click="closePlayer()"><span class="close-icon"></span></button>

<!-- Play button -->
<button class="guac-player-play"
ng-attr-title="{{ 'PLAYER.ACTION_PLAY' | translate }}"
Expand Down
1 change: 1 addition & 0 deletions guacamole/src/main/frontend/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
"PLAYER" : {

"ACTION_CANCEL" : "@:APP.ACTION_CANCEL",
"ACTION_CLOSE" : "Close",
"ACTION_PAUSE" : "@:APP.ACTION_PAUSE",
"ACTION_PLAY" : "@:APP.ACTION_PLAY",
"ACTION_SHOW_KEY_LOG" : "Keystroke Log",
Expand Down
1 change: 1 addition & 0 deletions guacamole/src/main/frontend/src/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@
"PLAYER" : {

"ACTION_CANCEL" : "@:APP.ACTION_CANCEL",
"ACTION_CLOSE" : "Fermer",
"ACTION_PAUSE" : "@:APP.ACTION_PAUSE",
"ACTION_PLAY" : "@:APP.ACTION_PLAY",
"ACTION_SHOW_KEY_LOG" : "Journal des frappes",
Expand Down
Loading