1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Added toggle to show/hide remaining video time in video player

Toggle applied to the remaining time label of the video player and added
`-` as a prefix of the remaining time, both behaviours like in VLC.

Toggle preference as user setting.
This commit is contained in:
dvdandroid 2023-01-05 11:08:02 +01:00 committed by Davide Maggio
parent 6e66e224a9
commit c33dc8cd7a
2 changed files with 40 additions and 5 deletions

View file

@ -169,6 +169,19 @@ export class UserSettings {
return toBoolean(this.get('enableNextVideoInfoOverlay', false), true);
}
/**
* Get or set 'Video Remaining/Total Time' state.
* @param {boolean|undefined} val - Flag to enable 'Video Remaining/Total Time' or undefined.
* @return {boolean} 'Video Remaining/Total Time' state.
*/
enableVideoRemainingTime(val) {
if (val !== undefined) {
return this.set('enableVideoRemainingTime', val.toString());
}
return toBoolean(this.get('enableVideoRemainingTime', false), true);
}
/**
* Get or set 'Theme Songs' state.
* @param {boolean|undefined} val - Flag to enable 'Theme Songs' or undefined.
@ -580,6 +593,7 @@ export const allowedAudioChannels = currentSettings.allowedAudioChannels.bind(cu
export const preferFmp4HlsContainer = currentSettings.preferFmp4HlsContainer.bind(currentSettings);
export const enableCinemaMode = currentSettings.enableCinemaMode.bind(currentSettings);
export const enableNextVideoInfoOverlay = currentSettings.enableNextVideoInfoOverlay.bind(currentSettings);
export const enableVideoRemainingTime = currentSettings.enableVideoRemainingTime.bind(currentSettings);
export const enableThemeSongs = currentSettings.enableThemeSongs.bind(currentSettings);
export const enableThemeVideos = currentSettings.enableThemeVideos.bind(currentSettings);
export const enableFastFadein = currentSettings.enableFastFadein.bind(currentSettings);