feat: Allow disabling the call controls (#2615)

- For: #2587
This commit is contained in:
Dermot Duffy
2026-07-26 11:35:18 -07:00
committed by GitHub
parent 0c3d46ad3d
commit 3b8835ee7c
7 changed files with 87 additions and 8 deletions
+1
View File
@@ -25,6 +25,7 @@ const getCallSchema = (): HAFormExpandableSchema => ({
title: localize('config.live.controls.call.editor_label'),
icon: 'mdi:phone',
schema: [
{ name: 'enabled', selector: { boolean: {} } },
{ name: 'lock', selector: { boolean: {} } },
{
name: 'ringtone',
+3 -2
View File
@@ -435,7 +435,8 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
!gesturesPTZActive &&
!this.locked;
const isCallActive = this.call?.cameraID === carouselCameraID;
const isCallControlsActive =
this.liveConfig.controls.call.enabled && this.call?.cameraID === carouselCameraID;
const callMediaPlayerController =
this._mediaLoadedInfoSinkController.get()?.mediaPlayerController ?? null;
@@ -470,7 +471,7 @@ export class AdvancedCameraCardLiveCarousel extends LitElement {
>
</advanced-camera-card-ptz>
<advanced-camera-card-call-controls
.active=${isCallActive}
.active=${isCallControlsActive}
.answered=${this.call?.answered ?? true}
.microphoneState=${this.microphoneState}
.muted=${callMediaPlayerController?.isMuted()}
+2
View File
@@ -50,6 +50,7 @@ export type RingtoneConfig = z.infer<typeof ringtoneConfigSchema>;
const callConfigDefault = {
button_size: 40,
enabled: true,
lock: true,
ringtone: { ...ringtoneConfigDefault },
unanswered_timeout_seconds: 60,
@@ -57,6 +58,7 @@ const callConfigDefault = {
const callConfigSchema = z.object({
button_size: z.number().min(BUTTON_SIZE_MIN).default(callConfigDefault.button_size),
enabled: z.boolean().default(callConfigDefault.enabled),
lock: z.boolean().default(callConfigDefault.lock),
ringtone: ringtoneConfigSchema.default(callConfigDefault.ringtone),
+1
View File
@@ -459,6 +459,7 @@
"answer": "Answer call",
"button_size": "Call control button size",
"editor_label": "Two-way audio call",
"enabled": "Show on-screen call controls",
"end": "End 2-way audio call",
"lock": "Lock UI during an active call",
"mute_audio": "Mute audio",