I have the following code and i want to get the time of my Video but it returns -1. Anyone know why?

```
long video= ourMediaPlayer.getMediaPlayer().getLength();

```

I have tried with getTime() instead of getLength but it returns -1.

Thanks for your help.