apache / apache/cordova-plugin-media

MEDIA.getDuration() returns -1 if MEDIA.play() never been called at least once

Open
#177 10 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
391
Forks
762
PR merge metrics
No merged PRs in 30d

Description

hi.
I had an issue as said in title : MEDIA.getDuration() returns -1 if MEDIA.play() never been called at least once
and only way i can fix it is play() and pause() media in background and then get duration !

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the MEDIA.getDuration() behavior when MEDIA.play() has never been called, then compare it with the play() and pause() workaround described in the issue. Identify which mobile platform is affected and determine the expected duration result before adding a regression test and confirming that duration is available without playback.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.