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

Control bar will not hide while playing ads


I would like the player control bar to be hidden during ad playback and show it only if the user hovers or moves the cursor within the video container. It this possible during ad playback?


1 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Sure, just use some JavaScript.

Sample code:

<div id="wrapper" style="width:580px;height:370px;"> <div id="my-video"></div> </div> <script type="text/javascript"> jwplayer("my-video").setup({ file: "", image: "", width: "580", height: "370", primary: "flash", advertising: { client: "vast", schedule: { myAds: { offset: "pre", tag: ",test" } } } }); jwplayer().onAdImpression(function() { jwplayer().setControls(false); }); jwplayer().onAdComplete(function() { jwplayer().setControls(true); }); document.getElementById('wrapper').onmouseover=function(){ if(jwplayer().getControls() == false){ jwplayer().setControls(true); } }; document.getElementById('wrapper').onmouseout=function(){ if(jwplayer().getControls() == true){ jwplayer().setControls(false); } }; </script>

Formatted –

This question has received the maximum number of answers.