-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Feature Request] Close track player and remove from notifications #2415
Comments
i felt this is a niche use - the notification panel is meant to resume playback, and if playback resumption is no longer needed, the app/service should be terminated. my gut feeling is this creates instability if users are releasing/recreating MediaSession or MediaLibraryService. Alternatively we can post a custom notification and clear it accordingly. its quite simple to implement, as the current repo implements it this way. though this implementation will be plagued by various ServiceStartNotAllowed exceptions reported in the issue tracker |
For us the use case was that we wanted to call However, if reset can be fixed that would be fine too. |
forgot to mention im strictly talking about android only, im not an ios
person
this is expected as the media session is not released upon tp.reset. i
believe removing the notification would require the foreground service to
be stopped, which could be an instability factor to be constantly started
and closed, or not, i do not know. it might be robust enough to not care.
could u try manually calling stop foreground, then start later when u start
playvack and let us know if it works
…On Tue, Dec 3, 2024, 9:35 AM Adrian Carolli ***@***.***> wrote:
i felt this is a niche use - the notification panel is meant to resume
playback, and if playback resumption is no longer needed, the app/service
should be terminated. my gut feeling is this creates instability if users
are releasing/recreating MediaSession or MediaLibraryService.
Alternatively we can post a custom notification and clear it accordingly.
its quite simple to implement, as the current repo implements it this way.
though this implementation will be plagued by various
ServiceStartNotAllowed exceptions reported in the issue tracker
For us the use case was that we wanted to call reset() but it did not
clear the notification metadata which felt weird because nothing was
playing. Yet it was showing in the notification tray.
—
Reply to this email directly, view it on GitHub
<#2415 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZMOVVRDKJ3KMZ2LPE5NE432DXTWRAVCNFSM6AAAAABS6IRSN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMJVGE4DQMRQGQ>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Context
Since
clearNowPlayingMetadata
is being removed. This feature has been removed, so I'm adding this as a feature request again.What is the need and use case of this feature?
When a user is playing a content through other means (e.g. a ultra low latency stream using aws's react-native player) it's misleading to show media controls in the notification center.
Edit:
reset
is not clearing the notification metadata and thats why we needed it in our app. However, if reset can be fixed that would be fine too.Describe the ideal solution
Having a clear method to close and remove track player from notification center, which would then open again if "setup" is called. Better still would be if I could pass an argument during it's initial setup so that it'd automatically close if nothing is being streamed/played.
The text was updated successfully, but these errors were encountered: