@@ -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',
|
||||
|
||||
@@ -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()}
|
||||
|
||||
@@ -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),
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user