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

Add user-configurable switch for hi10p on safari

This commit is contained in:
gnattu 2024-08-10 21:00:48 +08:00
parent 62b44d218c
commit 0ed16a04b2
5 changed files with 32 additions and 1 deletions

View file

@ -182,6 +182,19 @@ class AppSettings {
return toBoolean(this.get('enableTrueHd'), false);
}
/**
* Get or set 'Enable H.264 High 10 Profile' state.
* @param {boolean|undefined} val - Flag to enable 'Enable H.264 High 10 Profile' or undefined.
* @return {boolean} 'Enable H.264 High 10 Profile' state.
*/
enableHi10p(val) {
if (val !== undefined) {
return this.set('enableHi10p', val.toString());
}
return toBoolean(this.get('enableHi10p'), false);
}
set(name, value, userId) {
const currentValue = this.get(name, userId);
localStorage.setItem(this.#getKey(name, userId), value);