android icon indicating copy to clipboard operation
android copied to clipboard

Allow notification media player controls

Open timkoers opened this issue 5 years ago • 12 comments

Is your feature request related to a problem? Please describe. No it is not related to a problem, I was just wondering about how I could integrate contextual locations/rooms into Home Assistant. In order to realise this, a few other things are needed, one of them is this feature request. It would be nice if a notify service call could make an media player notification show up on a device, and with that, specifying which media_player component should handle the play/pause back/next controls and which media_player component should handle the volume controls (which I think should replace the thumbs on the image below)

Describe the solution you'd like HomeAssistant should integrate the mediaplayer controls as seen in the image below, but then for specific media_player entities, one used for playback control and another one used for volume control.

Describe alternatives you've considered, if any None.

Additional context

An example of the mediaplayer controls I'm talking about

timkoers avatar Oct 05 '20 17:10 timkoers

Not quite a notification but #1005 would allow you to create home screen widgets, one for each media player.

dshokouhi avatar Oct 05 '20 17:10 dshokouhi

Guide on how it could be done: https://developer.android.com/guide/topics/media/media-controls. The PR that @dshokouhi mentioned has the service calls needed to hook up to the interface. The entities could be selected in the settings menus but I'm not sure how we would resurface the media player after it was dismissed.

JBassett avatar Oct 05 '20 17:10 JBassett

Guide on how it could be done: https://developer.android.com/guide/topics/media/media-controls. The PR that @dshokouhi mentioned has the service calls needed to hook up to the interface. The entities could be selected in the settings menus

I'd like to have it settings menu independend, so you provide the media_player entities as the data that will get send together with notification. Just like a picture notification, only now, a mediaplayer notification.

but I'm not sure how we would resurface the media player after it was dismissed.

You mean that when you swipe the notification away, how it comes back? Well, in my mind that should be done by a HomeAssistant automation, which pushes the notification to the device.

timkoers avatar Oct 05 '20 18:10 timkoers

Using the notification system is an interesting idea. That seems like a decent way to remove the need for more settings and a good way to resurface the media player.

JBassett avatar Oct 05 '20 18:10 JBassett

The only thing, is that when a user is streaming from the phone, to the media player, a media player notification for the same context gets shown twice. So I think it's good to have somekind of feedback to HomeAssistant if a media player notification is already being shown (from any app).

timkoers avatar Oct 05 '20 18:10 timkoers

Has this been implemented, or being considered?

ncodee avatar Mar 09 '21 21:03 ncodee

Has this been implemented, or being considered?

the enhancement request is still open so it has not been implemented yet, anyone who wants to implement it can pick it up

dshokouhi avatar Mar 09 '21 21:03 dshokouhi

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 09 '22 04:01 stale[bot]

Any chance this will ever be implemented? I want this so badly

TheWhiteGandalf avatar Jun 25 '23 10:06 TheWhiteGandalf

Same it would be a game changer if possible

dnestico avatar Jun 26 '23 03:06 dnestico

Would be awesome

eyal1izhaki avatar Dec 11 '23 07:12 eyal1izhaki