getDuration() not working
See original GitHub issueI am trying to use getDuration() to determine when the user is at the end of their playback, but it is returning incorrect values. For example I have a 7 minute 12 second recording for which it should be returning something in the vicinity of 432 seconds, but it is currently returning approximately 410.5. This is on iOS, have not tested on Android. I know for sure the recording is 7 minutes and 12 seconds because I can sit there and listen to it, and watch the timer based on getCurrentTime() count all the way up…
EDIT: To add some more context for this, I was playing an .aac audio file recorded using the package react-native-audio
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Android MediaPlayer seekTo() / getDuration() not working as ...
When I call mediaPlayer.seekTo(50000) the value that is outputted in the OnSeekCompleteListener using mediaPLayer.getCurrentPosition() is the ...
Read more >player.getDuration() is NOT working in YouTube Live ...
Hi, please be advised that if the currently playing video is a live event, getDuration() function will return the elapsed time since the...
Read more >Date.prototype.getTime() - JavaScript - MDN Web Docs - Mozilla
The getTime() method returns the number of milliseconds since the epoch, which is defined as the midnight at the beginning of January 1, ......
Read more >MediaPlayer - Android Developers
Calling stop() stops playback and causes a MediaPlayer in the Started, ... to allow configuration of the DRM properties before opening the DRM...
Read more >'sound.getDuration()' not working - Builder - PsychoPy Discourse
I want the mouse to get activated only after the sound has completed playing. ... I used a 'sound.getDuration()' and selected 'Condition' instead ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have this issue on Android. It works fine on iOS, but on Android the call to getDuration() is returning -0.001 seconds. Any idea why?
Seems it is still not resolved