You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 } });
The text was updated successfully, but these errors were encountered:
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 } });
The text was updated successfully, but these errors were encountered: