apache / apache/cordova-plugin-media
getDuration() returns -1, then 0 on some remote MP3 files
- Dominant language
- JavaScript
- Stars
- 391
- Forks
- 762
- PR merge metrics
- No merged PRs in 30d
Description
I'm on iOS (using Ionic) and start playing remote files (hosted on AWS). I set a timer to get the duration. If getDuration() returns -1, I call the timer again. On most of the files, the audio starts playing and eventually, I get the correct duration of the MP3 .
However, on some files, it will eventually return 0 for the duration and the audio never plays. If I download that same file first and then play it, there is no problem playing or getting the duration.
All files are 64bit encoded MP3.
What would cause a remote file not to play and return 0 for getDuration()?
Contributor guide
Research direction
Start at the getDuration() call path on iOS and reproduce with the same remote MP3 versus a downloaded copy. Done means identifying why the remote case reaches 0 and documenting or fixing the plugin behavior, with a regression check for the affected playback path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, ios, javascript
- Domain
- audio-video-rtc, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100