Force media to 100% width.
This commit is contained in:
@@ -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
@@ -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%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user