-
Notifications
You must be signed in to change notification settings - Fork 363
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
Is there support of sleep timer? #1544
Comments
An implementation by an app sounds pretty straight-forward to me, where calling There isn't a way to let the player pause at a given time by API. There are APIs though that can help you do that.
to pause at the given position.
You may want to monitor other events, that cancel, send or update the message in case the user manipulates the player during 'sleeping'. Keep your message in case the user changes or cancels the timer. The you can call |
You can use CountDownTimer and a handler to handle the scenario. I have implemented using the same with 30, 45, 60 mins and an End of Episode sleep timer. When the timer runs out, an |
Most music players have the option of a sleep timer:
Since, the timer should work in background (MediaSessionService), I wanted to know if media3 supports sleep timers? If not, what is the preferred way for sleep timer to work with MediaSessionService?
The text was updated successfully, but these errors were encountered: