Only show the microphone button when the loaded media supports 2-way audio.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
`;
|
||||
|
||||
@@ -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>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user