mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add option to limit maximum supported video resolution
This commit is contained in:
parent
2097c526d2
commit
6e6b696bd9
5 changed files with 40 additions and 6 deletions
|
@ -105,6 +105,19 @@ class AppSettings {
|
|||
return parseInt(this.get('maxVideoWidth') || '0', 10) || 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or set 'Limit maximum supported video resolution' state.
|
||||
* @param {boolean|undefined} val - Flag to enable 'Limit maximum supported video resolution' or undefined.
|
||||
* @return {boolean} 'Limit maximum supported video resolution' state.
|
||||
*/
|
||||
limitSupportedVideoResolution(val) {
|
||||
if (val !== undefined) {
|
||||
return this.set('limitSupportedVideoResolution', val.toString());
|
||||
}
|
||||
|
||||
return toBoolean(this.get('limitSupportedVideoResolution'), false);
|
||||
}
|
||||
|
||||
set(name, value, userId) {
|
||||
const currentValue = this.get(name, userId);
|
||||
localStorage.setItem(this.#getKey(name, userId), value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue