-
-
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 #1834
Comments
@arthurgeron-work please see this option https://react-native-track-player.js.org/docs/api/objects/android-options |
That API refers to a Android specific event based behaviour which depends on the app being killed, not a cross-platform on-demand solution (e.g. triggered via a JS method exported by the lib) or a behavior based on empty tracks queue as described. |
In that case please see this feature request #1786 its also possible But I don't think I know what you're trying to achieve. Are you trying to use this library as a way to headlessly control expoplayer being initialized in another app? That's not really what this project is designed to do. I'm not sure what the reference to AWS's native player means. I think I'm missing a link here. |
Yes, headless play of content was the intended use, the confusion here is that the lib we previously used, react-native-music-control, had that feature but was incompatible with android sdk 30+ (forcing us to migrate to another solution), that lib's readme tells devs to "use this lib instead" and neither lib's readme files mentions the change in how headless play is supported. Maybe it'd be interesting to add that to the read me file. Regarding the play/stop and forgetting about mixing other concepts (like ivs), the issue is that customers find deeply annoying to have a empty lockscreen player that can't be closed, specially for background apps that might stay running, which ultimately leads to the user being induced to always kill the app after playing some media content. Summing up, it'd be really nice if I could programatically remove the player from the notification center, or have it do that automatically when the track queue is empty. Reset only cleans the state but keeps the player in the notifications, as far as I understood about the
|
@arthurgeron-work this project does support headless control/playback. However, it's all based around controlling playback for tracks and audio that are managed by the library itself, not for generic purposes of controlling exoplayer/avplayer headlessly. Regarding having something that programmatically removes the notification, I agree with that usecase. My intuition is that
I'm going to add this issue to the issue backlog now that I understand the desire and use case. This is where all feature requests go that we'd like to get to eventually but aren't actively being worked on. @dcvz @puckey I'd be interested if you have thoughts or a preference on the following:
|
Sounds great, I appreciate it! That being the case I believe this issue should be left open right? |
It does have an interesting issue (#1653), however by programatically calling I don't think deprecating (#1909) |
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.
Describe the ideal solution
A clear and concise description of what you want to happen.
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: