Android Question Exoplayer Duration negative number

jcesar

Active Member
Licensed User
Longtime User
Hi

I'm trying get the lenght of a mp3 file with exoplayer.Duration, but this method return a negative number.

Its a bug ? Or I'm doing something wrong ?
 

MarcoRome

Expert
Licensed User
Longtime User
 
Upvote 0

Ronomega73

Member
Licensed User
Longtime User
I read somewhere that a negative value is returned for Exoplayer duration if it is yet unset (kind of). I put a Wait For exoplayer ready event (Ex. Wait For Exoplayer1_Ready) before reading the duration value and I think the problem was solved.
 
Upvote 0
Top