-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Toggle autoplay in ConcatenatingAudioSource #917
Comments
I think it's a good idea. While there is a native API to achieve this on iOS, there isn't an API for this yet on Android. There is an ExoPlayer issue tracking this at google/ExoPlayer#5660 |
Ah I see, surprised to see that ExoPlayer does not have this functionality yet. |
Note that you can in theory emulate this behaviour quite accurately by using |
Sounds like an interesting solution as long as an accurate queue(i.e. items after the current index) does not need to be maintained. My UI needs to show the next items in the queue so I don't think it would work. |
Yes, the solution should definitely work but the key point is to use this API as an auto playback queue rather than a playlist. Once you do that, you should be aware that just_audio's state represents the state of that queue and does not represent the playlist state of your app. But accepting that, there is nothing preventing you from maintaining your own state for such purposes and only using just_audio to manage the auto playback queue. |
Seems like ExoPlayer supports pausing at the end of media items since v2.12. What it doesn't support is pausing at arbitrary frames. |
https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setPauseAtEndOfMediaItems(boolean) |
Thanks for noticing that. This issue therefore has no blockers - aside from just the fact that someone still needs to implement it ;-) |
This will help https://www.youtube.com/watch?v=IMQdSTlTXjA |
Hey @ryanheise @martinc2907 , Can you guys please give me a short example of pausing or stopping the player after current song in playlist is finished. |
Is your feature request related to a problem? Please describe.
The ConcatenatingAudioSource automatically skips to the next item when the previous item finishes playback. But I need a way to control this behavior by toggling 'autoplay' on/off.
Describe the solution you'd like
A way to toggle autoplay would be nice.
Describe alternatives you've considered
I have tried to manually pause the player when an item is nearing the end of its duration. This solution is not optimal as the pause method is async and playback may finish while the pause method is being processed. It is also not possible to pause at exactly the end of the audio.
Additional context
The text was updated successfully, but these errors were encountered: