cordova-plugin-media
cordova-plugin-media copied to clipboard
Android - seekTo when playing audio from internet URL seems to be unstable
Bug Report
Problem
There are instances when I load up media/audio to be played via passing in a URL from the internet, and when trying to perform a seekTo on the Media instance shortly after playing the media, going forward in time usually works (say going forward 3/4 of the entire audio clip) but then trying to seek back to the 1/2 mark causes the Media instance to crash or restart.
I have a feeling this has to do with the audio stream not having buffered at that time that you are trying to seek to.
Has anyone else had this issue before when streaming from a URL with the media plugin?
What is expected to happen?
The Audio will seek to this location, and then continue playing
What does actually happen?
The player seeks to this time, waits for a few seconds and either restarts the audio from the beginning, or stops completely returning a duration of -1
Environment, Platform, Device
Platform = Android
Version information
Android OS v8 Android Cordova platform v7.1.4 Cordova Media plugin v5.0.3
Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above