feat: Add new casting profile (#1575)

* feat: Add new `casting` profile

* Set some additional flags for casting
This commit is contained in:
Dermot Duffy
2024-09-23 20:24:35 -07:00
committed by GitHub
parent d203f529f8
commit 1e0a990855
12 changed files with 78 additions and 6 deletions
+23
View File
@@ -0,0 +1,23 @@
import {
CONF_CAMERAS_GLOBAL_IMAGE_REFRESH_SECONDS,
CONF_DIMENSIONS_ASPECT_RATIO,
CONF_LIVE_AUTO_UNMUTE,
CONF_LIVE_CONTROLS_BUILTIN,
CONF_LIVE_SHOW_IMAGE_DURING_LOAD,
CONF_MEDIA_VIEWER_CONTROLS_BUILTIN,
CONF_MENU_STYLE,
} from '../../const.js';
export const CASTING_PROFILE = {
[CONF_MENU_STYLE]: 'none' as const,
[CONF_LIVE_AUTO_UNMUTE]: ['selected', 'visible'],
[CONF_DIMENSIONS_ASPECT_RATIO]: '16:9',
[CONF_LIVE_CONTROLS_BUILTIN]: false,
[CONF_MEDIA_VIEWER_CONTROLS_BUILTIN]: false,
// These values are defaults anyway unless another profile (e.g.
// low-performance) is also selected, but at pretty important to a good
// experience so are reset here.
[CONF_CAMERAS_GLOBAL_IMAGE_REFRESH_SECONDS]: 1,
[CONF_LIVE_SHOW_IMAGE_DURING_LOAD]: true,
};
+3 -1
View File
@@ -1,10 +1,12 @@
import { deepRemoveDefaults } from '../../utils/zod.js';
import { getConfigValue, setConfigValue } from '../management.js';
import { ProfileType, RawFrigateCardConfig, frigateCardConfigSchema } from '../types.js';
import { deepRemoveDefaults } from '../../utils/zod.js';
import { CASTING_PROFILE } from './casting.js';
import { LOW_PERFORMANCE_PROFILE } from './low-performance.js';
import { SCRUBBING_PROFILE } from './scrubbing.js';
const PROFILES = {
casting: CASTING_PROFILE,
'low-performance': LOW_PERFORMANCE_PROFILE,
scrubbing: SCRUBBING_PROFILE,
};