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

Want to show a Div on specific time for a specific duration


I setted up the jwplayer on an html page.
I would like to Show a div when the video is at 10 sec and untill it reaches 50 sec.

i try

jwplayer('video_background').onTime(function(){ var position = jwplayer('video_background').getPosition(20);
if (position >=20) {
document.getElementById('slide') (function {
(slide.style.display == 'none' || slide.style.display = '')
? slide.style.display = 'block'
: slide.style.display = 'none';
}, false);
};
});

what am i doing wrong?

3 Community Answers

Andrew

JW Player Support Agent  
0 rated :

You can do something a bit more simple like:
jwplayer(‘myElement’).onTime(function(event){
var position = event.position;
if (position >=10 && position <=50) {
//Show your div
} else {
//Don’t show your div
}
});

bzover

User  
0 rated :

tryied...i got the message...

"undefined in not a function...

Sigh.

Andrew

JW Player Support Agent  
0 rated :

Are you listing the correct player div here? Also, the desk formatting may have changed the quotes I’ve used to styled quotes. Please make sure to check for those as well and use normal quotes instead.

This question has received the maximum number of answers.