Why i am getting -1 audio duration using getDuration() ionic media plugin

Hello Guys,

Can you please let me know? And this is worked but it’s working in time interval function and if i am used in audio player it’s take more time and this is not good for users.