Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): avoid seeking on media without duration (CB-11314) #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schoetty
Copy link

On Android >= 6.0, live streams do not start playing. This is because the onPrepared method of AudioPlayer invokes seekTo, what leads to an error because live streams have no duration and hence can not be seeked.

@cordova-qa
Copy link

Cordova CI Build has one or more failures.

Commit - Link
Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Mac Link Link Link

@ghenry22
Copy link
Contributor

This is also a problem with MP3 files where android (for whatever reason) cannot read the duration of the file. This could be some slight corruption to the file over time or it could be simply an encoding format that android doesn't like. This is pretty well documented with people having to work around the same issue in native audioplayers that use the same underlying frameworks.

I went insane trying to figure out why iOS would seek within a local file but Android intermittently wouldn't.

I'm definitely going to give this PR a test!

@janpio janpio added this to ⏳ Waiting for Review in Apache Cordova: Plugin Pull Requests Sep 16, 2018
@janpio
Copy link
Member

janpio commented Sep 16, 2018

There is a merge conflict now @schoetty. Could you maybe fix that please? Thanks.

@janpio janpio moved this from ⏳ Waiting for Review to 💥 Blocked: Conflict in Apache Cordova: Plugin Pull Requests Sep 16, 2018
@janpio janpio added the bug label Sep 17, 2018
@janpio janpio changed the title CB-11314 android: avoid seeking on media without duration fix(android): avoid seeking on media without duration (CB-11314) Jul 3, 2019
@janpio janpio moved this from 💥 Blocked: Conflict to ⏳ Ready for Review in Apache Cordova: Plugin Pull Requests Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants