apache / apache/cordova-plugin-media
Android - seekTo when playing audio from internet URL seems to be unstable
- Dominant language
- JavaScript
- Stars
- 391
- Forks
- 762
- PR merge metrics
- No merged PRs in 30d
Description
# 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
Contributor guide
Research direction
No source files, tests, or entry points are named. Start by reproducing the reported seekTo failure with an internet audio URL on Android OS 8 using Cordova Media plugin 5.0.3, especially seeking backward shortly after playback begins. Done means seeking reliably reaches the requested position and playback continues without restarting, stopping, or returning duration -1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100