feat: Add 'call' support to improve 2-way audio experience (#2486)
Draws significant inspiration (and direct styling) from https://github.com/dermotduffy/advanced-camera-card/pull/2447 . Thank you @Maudfer ! BREAKING CHANGE: The microphone condition previously bundled two unrelated signals — whether a two-way-audio session was connected and whether the microphone was muted. Connection state is now its own dedicated call condition, and microphone is reserved purely for mute state. Configs are upgraded automatically (the card rewrites affected conditions under overrides, elements, and automations). If you maintain config by hand, convert as follows: If you only used connected: # Before ```yaml condition: microphone connected: true ``` # After ```yaml condition: call call: true ``` If you used both connected and muted — they must be split into two conditions, since they no longer live together: # Before ```yaml condition: microphone connected: true muted: false ``` # After ```yaml condition: and conditions: - condition: call call: true - condition: microphone muted: false ```
This commit is contained in:
committed by
dermotduffy
parent
bb061a1a55
commit
abcba884e5
@@ -10,18 +10,16 @@ import {
|
||||
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_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
|
||||
// TVs are generally not touch-enabled, so the menu auto-hides while casting
|
||||
// (the `casting` default in `menu.auto_hide`). Should it nonetheless be
|
||||
// shown, make sure the buttons that make sense are enabled and the ones that
|
||||
// don't are disabled.
|
||||
[`${CONF_MENU_BUTTONS_PLAY}.enabled`]: true,
|
||||
[`${CONF_MENU_BUTTONS_MUTE}.enabled`]: true,
|
||||
[`${CONF_MENU_BUTTONS_FULLSCREEN}.enabled`]: false,
|
||||
|
||||
Reference in New Issue
Block a user