Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

JWPlayer getDuration() returns 0


I am trying to get the duration of an HLS video. From the documentation, I could understand that the getDuration() method returns the duration. But what I get is 0 as the response. I want to get the duration on loading the player(before the video starts running). Is there any solution for this?

1 Community Answers

George

JW Player Support Agent  
0 rated :

Hi,

There’s no way for us to know the duration of the video without loading it.

This question has received the maximum number of answers.