Skip to content

Fix media_player alexa power control bug#23537

Merged
pvizeli merged 1 commit intodevfrom
Fix-Alexa-media-player-control
Apr 29, 2019
Merged

Fix media_player alexa power control bug#23537
pvizeli merged 1 commit intodevfrom
Fix-Alexa-media-player-control

Conversation

@pvizeli
Copy link
Copy Markdown
Member

@pvizeli pvizeli commented Apr 29, 2019

Description:

With new strict media control handling on 0.92 not all media player support now the power control.

@andrewsayre
Copy link
Copy Markdown
Member

I assume this code is called during setup of the Alexa integration?

The thing to keep in mind is that supported_features in media_player are not static today--they change throughout the entity lifetime. Some platforms even return 0 when the entity isn't available and others will always return a base set of features and then change certain flags based on state.

I think we're not going to get a reliable set of capabilities for Alexa if this code runs this way... but not sure there's a way around it until we fix this issue with the media player platform....

@emontnemery
Copy link
Copy Markdown
Contributor

not sure there's a way around it until we fix this issue with the media player platform

Does that imply the supported_features should not be allowed to change?

@pvizeli
Copy link
Copy Markdown
Member Author

pvizeli commented Apr 29, 2019

Yes. This code is called on the discovery of devices from alexa itself.

@pvizeli pvizeli merged commit 4c4f0e3 into dev Apr 29, 2019
@delete-merged-branch delete-merged-branch Bot deleted the Fix-Alexa-media-player-control branch April 29, 2019 20:41
@balloob
Copy link
Copy Markdown
Member

balloob commented Apr 30, 2019

@emontnemery correct. Supported features is supposed to be static. For Media Player we need to introduce a new flag attribute of the currently supported features (repeat, prev, next etc).

@balloob balloob mentioned this pull request May 2, 2019
@emontnemery
Copy link
Copy Markdown
Contributor

@balloob OK, so the integration (say cast) should statically support some features, but it's still possible to flag the currently supported features depending on what media is playing. That makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants