mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Handle inifinity media duration (#11749)
This commit is contained in:
parent
afe044d152
commit
9b4c6eea63
@ -339,7 +339,7 @@ export const computeMediaControls = (
|
||||
};
|
||||
|
||||
export const formatMediaTime = (seconds: number | undefined): string => {
|
||||
if (seconds === undefined) {
|
||||
if (seconds === undefined || seconds === Infinity) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,9 @@ class BarMediaPlayer extends LitElement {
|
||||
`
|
||||
)}
|
||||
</div>
|
||||
${this.narrow
|
||||
${stateObj?.attributes.media_duration === Infinity
|
||||
? html``
|
||||
: this.narrow
|
||||
? html`<mwc-linear-progress></mwc-linear-progress>`
|
||||
: html`
|
||||
<div class="progress">
|
||||
|
Loading…
x
Reference in New Issue
Block a user