In my app, user clicks the button to play an audio file (a 3gp file, in my android tablet).
I’d like to disable the button during the playback and enable it again when done.
I considered to get the file duration like below, then
getCurrentPosition() to compare the two value.
duration value is -1. What can I do to achieve the desire?
// get file duration
let audioObject: MediaObject = this.media.create(fileURI);
let duration = audioObject.getDuration();