Skip to content
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

Media isPlaying() does not return false when end of audio reached #2466

Closed
tikiwade opened this issue Jul 3, 2018 · 0 comments
Closed

Media isPlaying() does not return false when end of audio reached #2466

tikiwade opened this issue Jul 3, 2018 · 0 comments
Assignees
Milestone

Comments

@tikiwade
Copy link

tikiwade commented Jul 3, 2018

I am using a UITimer to show the progress when playing an audio from a URL (https). I am checking the media.isPlaying() method so that when the end of the audio has been reached I can stop the timer and switch the pause button to a play button. When the end of the audio has been reached, the media.isPlaying() is still returning true, leaving me without any way of knowing to stop the timer.

UITimer playbackTimer = new UITimer(() -> { Log.p("timer event"); audioTime.setText(audioTimeFormat.format(new Date(media.getTime()))); if (!media.isPlaying()) { playbackTimer.cancel(); // change button from pause icon to play icon } });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants