Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two issues with progress bar #269

Closed
03397 opened this issue Apr 4, 2020 · 30 comments · Fixed by #272
Closed

Two issues with progress bar #269

03397 opened this issue Apr 4, 2020 · 30 comments · Fixed by #272
Labels
bug Something isn't working

Comments

@03397
Copy link

03397 commented Apr 4, 2020

I have found two issues with the progress bar.

During playing the progress bar works just fine but if I switch to another card at the top and back to the mini media player card the progress is frozen but the playback is continuing.

In addition, when I stop the playback the progress bar is keep counting seconds.

@kalkih
Copy link
Owner

kalkih commented Apr 4, 2020

What media player integration are you seeing this with?

@03397
Copy link
Author

03397 commented Apr 4, 2020

With Sonos.

@03397
Copy link
Author

03397 commented Apr 4, 2020

Another issue is If refresh the url at the media player card the icons dissapear.
after_refresh
before_refresh

You can see at the pictures also the counter regarding my previous post and the icons missing

@03397
Copy link
Author

03397 commented Apr 5, 2020

I am not want to give you more information. I think the issue with the dissapearing icons is created because of vertical stack I am using.

@kalkih kalkih added the bug Something isn't working label Apr 5, 2020
@kalkih
Copy link
Owner

kalkih commented Apr 5, 2020

Was not able to reproduce the progress tracking continuing after pausing playback, does it always happen?
The freezing after changing tab was easy to reproduce and I will fix that.

@03397
Copy link
Author

03397 commented Apr 5, 2020

Yes it happens always. Just pause and notice the number of the progress bar. Then if you switch card and come back you will see that the progress bar has moved and the number is not the same.
So if you pause for two hours the progress bar will be moved two hours ahead.

I am using vertical stack and the progress bar is at the second card if this matters.

@03397
Copy link
Author

03397 commented Apr 5, 2020

Have you managed to reproduce the disappearing icons issue?
This should be easy to reproduce too.

@kalkih
Copy link
Owner

kalkih commented Apr 5, 2020

Yes it happens always. Just pause and notice the number of the progress bar.

No this doesn't happen to me, the progress stops correctly until I unpause again I don't own any Sonos, so not sure if the issue is specific to Sonos.

Have you managed to reproduce the disappearing icons issue?
This should be easy to reproduce too.

No, never seen that happen.

@kalkih kalkih linked a pull request Apr 5, 2020 that will close this issue
@03397
Copy link
Author

03397 commented Apr 5, 2020

Have you tried to reproduce it using vertical stack?

Because it does not happen otherwise.
Use my setup. Maybe you can reproduce both issues.

@kalkih
Copy link
Owner

kalkih commented Apr 5, 2020

Ok, please post your config (inside a code block).

@03397
Copy link
Author

03397 commented Apr 5, 2020

cards:
  - artwork: full-cover-fit
    entity: media_player.sonos_one
    hide:
      controls: true
      icon: true
      info: true
      name: true
      power: true
      progress: true
      source: true
      volume: true
    type: 'custom:mini-media-player'
  - entity: media_player.sonos_one
    hide:
      info: false
      power: true
      runtime: false
      shuffle: false
    info: scroll
    name: Master Bedroom
    type: 'custom:mini-media-player'
type: vertical-stack

@kalkih
Copy link
Owner

kalkih commented Apr 7, 2020

Hello, I've now tried with you config and can't see any of the two issues (disappearing icons or progress continuing after pausing).

The issue regarding progress tracking not working when leaving the tab and coming back has been addressed and will be included in the next release #272

@kalkih
Copy link
Owner

kalkih commented Apr 7, 2020

Kapture 2020-04-07 at 20 12 20 2

Do you happen to use any specific theme or plugins in chrome that could cause this?

@03397
Copy link
Author

03397 commented Apr 7, 2020

The disappearing icons issue have been solved after installing mini media player from HACS.
The issue with the progress bar it still there.
You need to pause, switch to a different card from Home Assistant and then come back.
You will see that the progress bar moved forward since the pause.
I am using Sonos. Do you think this might cause the issue?

@kalkih
Copy link
Owner

kalkih commented Apr 7, 2020

Okay, great!

If it's just when you're switching between tabs it should be fixed with #272 as well 👍

@PD75
Copy link

PD75 commented Apr 8, 2020

I also have problem with the progress and runtime:
image
Without runtime:
image
Normal Media Player:
image

I am using mpd.

entity: media_player.music_player_daemon
group: true
hide:
  power_state: false
  shuffle: false
  volume: true
  progress: false
  runtime: false
icon: 'mdi:music-circle'
info: short
source: icon
type: 'custom:mini-media-player'

@mwasowski
Copy link

I can say I experience something related?

At the beginning it's fine for few seconds, but then this starts to happen more and more:
qUZjWyyXjp
This happened when I sipped ahead in Spotify desktop app:
1jQGHH2bKc
And here you see that current time is kinda longer than the song itself ;)
firefox_GigDkkX8AT
My config:

entity: media_player.spotify
type: 'custom:mini-media-player'
artwork: cover
source: icon
hide:
  volume: true
  runtime: false
style: |
  ha-card {
    height: 100px;
  }
  ha-card .mmp-player {
    margin: auto 0;
  }

@kalkih kalkih closed this as completed May 17, 2020
@03397
Copy link
Author

03397 commented May 17, 2020

I have upgraded to version 1.8.0.
Problem with the status bar still there .
After pause counter and bar keeps counting.

@mwasowski
Copy link

Same here. The bar skips like in my previous gifs and counts past song length.

@kalkih
Copy link
Owner

kalkih commented May 18, 2020

@03397

You need to pause, switch to a different card from Home Assistant and then come back.
You will see that the progress bar moved forward since the pause.
I am using Sonos. Do you think this might cause the issue?

Is this the issue you're having or does it also happen when just pausing and not switching tabs?

@mwasowski Does the skipping and ticking past the track length occur on the default media control card as well?

@kalkih kalkih reopened this May 18, 2020
@03397
Copy link
Author

03397 commented May 18, 2020

@kalkih
It seems now you do not need to changes tabs. It changes every time the card refreshes.
But this can happen with either changing tabs, refresh the current tab or wait until the card refreshes by itself.

@mwasowski
Copy link

@kalkih Ok, I just added standard media control card for testing and it behaves in a similar way. Maybe it's not skipping back and forth like before, but does skip forward. And definitely not counting the time right. I am suspecting that it's the Spotify integration :( When I pause from the card it pauses playback, but when I pause from Spotify the progress bar and time continues to move :( Also, when I pause the playback with the progress bar and time ahead, it snaps back to correct position:
OLrdcpq0WP

@kalkih
Copy link
Owner

kalkih commented May 18, 2020

@mwasowski
Thanks for the details.
Okay, yes I believe I've seen this behaviour as well, I believe it started after the rework of the Spotify component. If the underlying data isn't accurate there's not much I can do about that particular issue unfortunately.

@03397 Ok, what media player component are you using where you see this behaviour?

@03397
Copy link
Author

03397 commented May 18, 2020

@kalkih
I am using a Sonos Media Player.

@mwasowski
Copy link

@kalkih I was afraid it's not related to the mini-media-player since after your suggestion it bugs out on the default card the same way. I guess it has to be moved upstream if you won't be able to find anything.

@kalkih
Copy link
Owner

kalkih commented May 18, 2020

Yes you are right, the only thing I could do would be to limit it from going past the length of the media, but that won't help the out of sync issue.

@mwasowski
Copy link

@kalkih It might seem like a dumb question but is this the right place to report this?
https://github.com/home-assistant/core

@kalkih
Copy link
Owner

kalkih commented May 18, 2020

@mwasowski yes, that's the correct place 👍🏼

@kalkih
Copy link
Owner

kalkih commented Sep 30, 2021

Still having this issue?

@03397
Copy link
Author

03397 commented Sep 30, 2021

@kalkih
Both issues has been solved by your last commit

@kalkih kalkih closed this as completed Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants