hiteshtr
hiteshtr

Reputation: 563

how to get current playback time in video.js

I am using video.js project to play videos on my web page. I implemented it perfectly on my web page but i required to retrieve the video's current playing time how can i do that ?

Upvotes: 14

Views: 33483

Answers (2)

joncys
joncys

Reputation: 1350

var whereYouAt = myPlayer.currentTime();

https://docs.videojs.com/player#currentTime

Upvotes: 32

petereneric
petereneric

Reputation: 127

For me it worked using the method call not calling the attribute:

var whereYouAt = myPlayer.currentTime();

I just wanted to add this for anyone else having the same issue, even though this answer refers clearly to the accepted one.

Upvotes: 2

Related Questions