feat: Rework casting profile and documentation (#1602)
* feat: Rework casting profile and documentation * Apply suggestions from code review Co-authored-by: Dermot Duffy <dermot.duffy@gmail.com> * Some other minor details * Update docs/usage/casting.md Co-authored-by: Dermot Duffy <dermot.duffy@gmail.com> * Improve const.ts * Some other small changes * Update docs/usage/casting.md Co-authored-by: Dermot Duffy <dermot.duffy@gmail.com> --------- Co-authored-by: Dermot Duffy <dermot.duffy@gmail.com>
This commit is contained in:
co-authored by
Dermot Duffy
parent
eccf50252f
commit
9098eb3483
@@ -1,18 +1,37 @@
|
||||
import {
|
||||
CONF_CAMERAS_GLOBAL_IMAGE_REFRESH_SECONDS,
|
||||
CONF_DIMENSIONS_ASPECT_RATIO,
|
||||
CONF_DIMENSIONS_ASPECT_RATIO_MODE,
|
||||
CONF_LIVE_AUTO_UNMUTE,
|
||||
CONF_LIVE_CONTROLS_BUILTIN,
|
||||
CONF_LIVE_SHOW_IMAGE_DURING_LOAD,
|
||||
CONF_MEDIA_VIEWER_CONTROLS_BUILTIN,
|
||||
CONF_MENU_BUTTONS_FULLSCREEN,
|
||||
CONF_MENU_BUTTONS_MEDIA_PLAYER,
|
||||
CONF_MENU_BUTTONS_MUTE,
|
||||
CONF_MENU_BUTTONS_PLAY,
|
||||
CONF_MENU_STYLE,
|
||||
} from '../../const.js';
|
||||
|
||||
export const CASTING_PROFILE = {
|
||||
[CONF_LIVE_AUTO_UNMUTE]: ['selected', 'visible'],
|
||||
[CONF_DIMENSIONS_ASPECT_RATIO]: '16:9',
|
||||
[CONF_LIVE_CONTROLS_BUILTIN]: false,
|
||||
[CONF_MEDIA_VIEWER_CONTROLS_BUILTIN]: false,
|
||||
|
||||
// TVs are generally not touch-enabled, so we don't want to show the menu
|
||||
[CONF_MENU_STYLE]: 'none',
|
||||
|
||||
// But in case the user enables the menu, let's make sure to enable the
|
||||
// buttons that make sense and disable the ones that don't
|
||||
[`${CONF_MENU_BUTTONS_PLAY}.enabled`]: true,
|
||||
[`${CONF_MENU_BUTTONS_MUTE}.enabled`]: true,
|
||||
[`${CONF_MENU_BUTTONS_FULLSCREEN}.enabled`]: false,
|
||||
[`${CONF_MENU_BUTTONS_MEDIA_PLAYER}.enabled`]: false,
|
||||
|
||||
[CONF_LIVE_AUTO_UNMUTE]: ['selected', 'visible'],
|
||||
|
||||
[CONF_DIMENSIONS_ASPECT_RATIO_MODE]: 'static',
|
||||
[CONF_DIMENSIONS_ASPECT_RATIO]: '16:9',
|
||||
|
||||
// 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.
|
||||
|
||||
+7
-4
@@ -328,11 +328,14 @@ export const CONF_MENU_STYLE = `${CONF_MENU}.style` as const;
|
||||
export const CONF_MENU_BUTTON_SIZE = `${CONF_MENU}.button_size` as const;
|
||||
export const CONF_MENU_BUTTONS = `${CONF_MENU}.buttons` as const;
|
||||
|
||||
export const CONF_MENU_BUTTONS_FRIGATE = `${CONF_MENU}.buttons.frigate` as const;
|
||||
export const CONF_MENU_BUTTONS_CAMERA_UI = `${CONF_MENU}.buttons.camera_ui` as const;
|
||||
export const CONF_MENU_BUTTONS_FRIGATE = `${CONF_MENU_BUTTONS}.frigate` as const;
|
||||
export const CONF_MENU_BUTTONS_CAMERA_UI = `${CONF_MENU_BUTTONS}.camera_ui` as const;
|
||||
export const CONF_MENU_BUTTONS_FULLSCREEN = `${CONF_MENU_BUTTONS}.fullscreen` as const;
|
||||
export const CONF_MENU_BUTTONS_PLAY = `${CONF_MENU_BUTTONS}.play` as const;
|
||||
export const CONF_MENU_BUTTONS_MUTE = `${CONF_MENU_BUTTONS}.mute` as const;
|
||||
export const CONF_MENU_BUTTONS_MEDIA_PLAYER =
|
||||
`${CONF_MENU}.buttons.media_player` as const;
|
||||
export const CONF_MENU_BUTTONS_TIMELINE = `${CONF_MENU}.buttons.timeline` as const;
|
||||
`${CONF_MENU_BUTTONS}.media_player` as const;
|
||||
export const CONF_MENU_BUTTONS_TIMELINE = `${CONF_MENU_BUTTONS}.timeline` as const;
|
||||
|
||||
export const CONF_STATUS_BAR = 'status_bar' as const;
|
||||
export const CONF_STATUS_BAR_POSITION = `${CONF_STATUS_BAR}.position` as const;
|
||||
|
||||
Reference in New Issue
Block a user