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

The state of the component doesn't seem to update after stopping/pausing #475

Closed
Flavien opened this issue Dec 8, 2019 · 13 comments
Closed

Comments

@Flavien
Copy link

Flavien commented Dec 8, 2019

Describe the bug
The state of the component doesn't seem to update after stopping/pausing.

To Reproduce

  1. Play something by saying e.g. "Play XXX on deezer".
  2. Ask Alexa to stop playing.
  3. Ask Alexa for a news update.
  4. The Alexa app doesn't show anything as currently playing anymore. Yet, the state of the media player is still paused with all the attributes still reflecting what was playing initially:
  • media_content_type
  • media_duration
  • media_position
  • media_position_updated_at
  • media_title
  • media_artist
  • media_album_name

Trying to resume playing from Home Assistant fails.

Expected behavior
The state of the media player component should no longer be paused (it should be back to idle or standby).

System details

  • Home-assistant (version): 0.101.3
  • Hassio: No
  • alexa_media: 2.3.4
  • alexapy: 1.3.2
@alandtse
Copy link
Owner

alandtse commented Dec 9, 2019

This is expected behavior as Alexa does not update media player information when you do a non-media command like a news update. Please check the official Alexa app and you'll notice it'll also retain the media info with news. It's paused because it should be able to resume the media playback if it hasn't timed out.

@Flavien
Copy link
Author

Flavien commented Dec 9, 2019

That doesn't seem correct, at least on my Echo.

After I start playing the news update, the app shows a 3 dots loading icon instead of the track that was playing. Then after a while doesn't show anything playing anymore on the app.

If I ask Alexa to resume playing, it resumes the news update, not the music. And resuming from Home Assistant has no effect.

During all that time Home Assistant shows it's still paused on the initial song, and will stay like that until the next time I play media (which can be a week later).

@alandtse
Copy link
Owner

alandtse commented Dec 9, 2019

I'm actually referring to the webapp (fix domain). We are pulling the player information from that webapp. Perhaps the behavior has changed, so let me know.

@Flavien
Copy link
Author

Flavien commented Dec 9, 2019

Yes looking at the Alexa SPA, there is nothing shown as playing on the Echo:

image

But the alexa_media_player component on Home Assistant is still showing the track from yesterday in paused state:

Entity: media_player.living_room_echo
State: paused
Attributes:

volume_level: 0.23
is_volume_muted: false
media_content_type: music
media_duration: 256
media_position: 20
media_position_updated_at: 2019-12-08T22:43:51.978561+00:00
media_title: Bullet with Butterfly Wings
media_artist: The Smashing Pumpkins
media_album_name: Deezer
source: Local Speaker
source_list: Local Speaker,Pixel
available: true
last_called: true
friendly_name: Living Room Echo
entity_picture: https://cdns-images.dzcdn.net/images/cover/47b57429aca9ab083da83654f7a0529e/500x500-000000-80-0-0.jpg
supported_features: 56253

@alandtse
Copy link
Owner

Can you please confirm that it showed the right info before the news command and it then goes blank after the news command?

@Flavien
Copy link
Author

Flavien commented Dec 10, 2019

So while I am playing, it shows the song playing (if I pause, it shows the media as paused):

image

When I start the news update, the track doesn't disappear from the page by itself, but if I refresh the page, I get the screen with no media playing:

image

@alandtse
Copy link
Owner

Ok thanks. There's something the online player is able to check on the refresh that we're missing. I'll see if I can find it to replicate it. Our current behavior is the non refresh example.

@alandtse
Copy link
Owner

#491 may actually address this. Let me know if it does.

@Flavien
Copy link
Author

Flavien commented Jan 8, 2020

No that's not resolved.

alandtse added a commit that referenced this issue Jan 15, 2020
fix(media_player): fix clearing of data on state change
@Flavien
Copy link
Author

Flavien commented Feb 1, 2020

Just pointing out that this PR didn't solve the issue, so this should probably be reopen.

I think it would make sense that if playback is paused for over an hour (or some amount of time), the component should consider playback stopped. It's a bit irritating when the component shows as paused on the song I was playing 3 days ago.

@Flavien
Copy link
Author

Flavien commented Mar 29, 2020

@alandtse Can you reopen the issue, or should I create a duplicate? This is not resolved.

@alandtse
Copy link
Owner

You can recreate. However, this will be low priority since it's cosmetic.

@Flavien
Copy link
Author

Flavien commented Mar 29, 2020

Ok I've recreated #617. I'd argue it's not just cosmetic as the component is in the wrong state, which will cause problems for things like automation for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants