Add "Maximum video bitrate" option

This commit is contained in:
redphx
2024-05-12 18:05:21 +07:00
parent c1b41663db
commit 1dee720f77
6 changed files with 127 additions and 6 deletions

View File

@@ -32,6 +32,8 @@ export enum PrefKey {
STREAM_DISABLE_FEEDBACK_DIALOG = 'stream_disable_feedback_dialog',
BITRATE_VIDEO_MAX = 'bitrate_video_max',
GAME_BAR_POSITION = 'game_bar_position',
LOCAL_CO_OP_ENABLED = 'local_co_op_enabled',
@@ -314,6 +316,28 @@ export class Preferences {
default: false,
},
[PrefKey.BITRATE_VIDEO_MAX]: {
type: SettingElementType.NUMBER_STEPPER,
label: 'Maximum video bitrate',
default: 0,
min: 0,
max: 15,
steps: 1,
params: {
suffix: ' Mb/s',
exactTicks: 5,
customTextValue: (value: any) => {
value = parseInt(value);
if (value === 0) {
return t('default');
}
return null;
},
},
},
[PrefKey.GAME_BAR_POSITION]: {
label: t('position'),
default: 'bottom-left',