I'm using JW Player 7 javsacript version. It is really nice. But my videos are hosted on Amazon S3. Now I'd like to know is there any way to detect how long has user played video or how many seconds the video was played?
Asked
Active
Viewed 412 times
1 Answers
1
Look at the API call, getPosition()
.
var currentPlayTime = jwplayer().getPosition();

TheCarver
- 19,391
- 25
- 99
- 149
-
With this code I could track that: jwplayer("mySingleVideoWrapper").onTime(function (event){ jQuery("#getCurrentPositionOfVideo").val(event.position);}). One question - how can I check if user played at least 30% of each video, how can I check this ? if(event.position = "what can I write here to check that" ) {} ? @PaparazzoKid – aiddev Nov 03 '15 at 12:18
-
@aidaghazaryan: there is another API call: `getDuration()`. With some basic math, you can get the percentage. – TheCarver Nov 03 '15 at 12:29