Only show the microphone button when the loaded media supports 2-way audio.

This commit is contained in:
Dermot Duffy
2023-05-07 16:47:02 -07:00
parent ae4ced8a23
commit d63a1de042
16 changed files with 109 additions and 44 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ customElements.whenDefined('ha-camera-stream').then(() => {
return html`
<img
@load=${(ev: Event) => {
dispatchMediaLoadedEvent(this, ev);
dispatchMediaLoadedEvent(this, ev, { player: this });
}}
.src=${typeof this._connected == 'undefined' || this._connected
? computeMJPEGStreamUrl(this.stateObj)
+1 -1
View File
@@ -97,7 +97,7 @@ customElements.whenDefined('ha-hls-player').then(() => {
hideMediaControlsTemporarily(this._video, MEDIA_LOAD_CONTROLS_HIDE_SECONDS);
}}
@loadeddata=${(e) => {
dispatchMediaLoadedEvent(this, e);
dispatchMediaLoadedEvent(this, e, { player: this });
}}
></video>
`;
+1 -1
View File
@@ -93,7 +93,7 @@ customElements.whenDefined('ha-web-rtc-player').then(() => {
hideMediaControlsTemporarily(this._video, MEDIA_LOAD_CONTROLS_HIDE_SECONDS);
}}
@loadeddata=${(e) => {
dispatchMediaLoadedEvent(this, e);
dispatchMediaLoadedEvent(this, e, { player: this });
}}
></video>
`;