Skip to content
Advertisement

React JW player how to get current duration of video?

I am using React JW player.

My component

JavaScript

This is working well. I need to get the current duration of the playing video. How can I do that in reactjs?

Advertisement

Answer

You can access “raw” JW player by doing

JavaScript

To get current position of JW Player do

JavaScript

Expose JW Player instance | JW Player .getPosition()

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement