Force media to 100% width.

This commit is contained in:
Dermot Duffy
2021-09-07 21:17:41 -07:00
parent c9319b42f5
commit 6995e581ee
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -827,6 +827,7 @@ export class FrigateCard extends LitElement {
${this._view.is('clip') ${this._view.is('clip')
? resolvedMedia?.mime_type.toLowerCase() == 'application/x-mpegurl' ? resolvedMedia?.mime_type.toLowerCase() == 'application/x-mpegurl'
? html`<ha-hls-player ? html`<ha-hls-player
class="media"
.hass=${this._hass} .hass=${this._hass}
.url=${resolvedMedia.url} .url=${resolvedMedia.url}
title="${mediaToRender.title}" title="${mediaToRender.title}"
@@ -838,6 +839,7 @@ export class FrigateCard extends LitElement {
> >
</ha-hls-player>` </ha-hls-player>`
: html`<video : html`<video
class="media"
title="${mediaToRender.title}" title="${mediaToRender.title}"
muted muted
controls controls
@@ -854,7 +856,7 @@ export class FrigateCard extends LitElement {
</video>` </video>`
: html`<img : html`<img
src=${resolvedMedia.url} src=${resolvedMedia.url}
class="snapshot" class="media"
title="${mediaToRender.title}" title="${mediaToRender.title}"
@click=${() => { @click=${() => {
// Get clips potentially related to this snapshot. // Get clips potentially related to this snapshot.
+1 -1
View File
@@ -22,7 +22,7 @@
scrollbar-width: none; /* Hide scrollbar: Firefox */ scrollbar-width: none; /* Hide scrollbar: Firefox */
} }
.frigate-card-contents img.snapshot { .frigate-card-contents img.media,video.media {
width: 100%; width: 100%;
} }