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

OnSeek event


Somebody can help me with the use of OnSeek event?
I need to trigger some code when the video actually playing reaches 10 minutes for example.
bc.. jwplayer("mediaplayer").setup({
autostart: true,
controlbar: "none",
width: 720,
height: 480,
flashplayer: "<?php echo $base.'jwplayer/player.swf';?>",
file: "<?php echo $base.'videos/video.mp4';?>",
image: "<?php echo $base.'images/preview.png';?>",
events: {
onComplete: function(e){} etc I need to add the onSeek event here.



Thank you

5 Community Answers

JW Player

User  
0 rated :

Nobody's knows how?

JW Player

User  
0 rated :

bc.. jwplayer(e.ref).onTime(function(event) {
if(event.position==10){
alert('gooo');
}
});

JW Player

User  
0 rated :

That is onTime, not onSeek. I'd also like to know how to use OnSeek.

I've tried

bc.. jwplayer().onSeek(function(event) {
document.getElementById("seekFrom").innerHTML = event.position;
document.getElementById("seekTo").innerHTML = event.offset;
}



However, this doesn't work.

JW Player

User  
1 rated :

Actually, that did just work for me. I don't know why it didn't the first time - but that function is working.

Ethan Feldman

JW Player Support Agent  
0 rated :

Glad you got it working.

This question has received the maximum number of answers.