diff --git a/src/patches/ha-hls-player.ts b/src/patches/ha-hls-player.ts index 71bda287..8a5b67fa 100644 --- a/src/patches/ha-hls-player.ts +++ b/src/patches/ha-hls-player.ts @@ -29,8 +29,6 @@ customElements.whenDefined('ha-hls-player').then(() => { @query('#video') protected _video: HTMLVideoElement; - protected _controlsVisibilityTimerID: number | null = null; - /** * Play the video. */ diff --git a/src/patches/ha-web-rtc-player.ts b/src/patches/ha-web-rtc-player.ts index 5c4a1d44..99b4a8a9 100644 --- a/src/patches/ha-web-rtc-player.ts +++ b/src/patches/ha-web-rtc-player.ts @@ -14,6 +14,10 @@ import { customElement } from 'lit/decorators.js'; import { query } from 'lit/decorators/query.js'; import { dispatchErrorMessageEvent } from '../components/message.js'; import { dispatchMediaLoadedEvent } from '../utils/media-info.js'; +import { + hideMediaControlsTemporarily, + MEDIA_LOAD_CONTROLS_HIDE_SECONDS, +} from '../utils/media.js'; import liveHAComponentsStyle from '../scss/live-ha-components.scss'; customElements.whenDefined('ha-web-rtc-player').then(() => { @@ -86,6 +90,9 @@ customElements.whenDefined('ha-web-rtc-player').then(() => { .muted=${this.muted} ?playsinline=${this.playsInline} ?controls=${this.controls} + @loadedmetadata=${() => { + hideMediaControlsTemporarily(this._video, MEDIA_LOAD_CONTROLS_HIDE_SECONDS); + }} @loadeddata=${(e) => { dispatchMediaLoadedEvent(this, e); }}