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

Autostarting on page load with hidden controls (JW7)


On the JW Player support site is this article about “Autostarting on Page Load”: http://support.jwplayer.com/customer/portal/articles/1428525-autostarting-on-page-load

The video starts with visible controls but they won’t auto-hide until you hover over it for the first time. It would be nicer if the auto-hiding works right from the beginning without the need of a first hovering. The same behavior appear on my own testing page: http://temp.juergwaldmeier.ch/test

Is this a bug or a feature?

Is there even a way with JW7 that on an autostart the controls are hidden and then only show up when the user hovers over the video?

11 Community Answers

Cooper Reid

JW Player Support Agent  
-3 rated :

Hi Barry,

Yes, you can simply put autostart: true in the setup parameters -

jwplayer(“player”).setup({
file: ‘bunny.mp4’,
title: ‘Bunny’,
image: ‘bunny.jpg’,
width:‘100%’,
autostart: true
});

Kind Regards,
Cooper Reid
Technical Systems Engineer, JWPlayer

webmaster

User  
1 rated :

Hi Cooper

Sorry, but I think you didn't really answer my questions. The question was not how I can autostart a video. What's about the problem with the auto-hiding while autostarting a video?

Cooper Reid

JW Player Support Agent  
-3 rated :

You can try using either the setup param: {controls:false} or the API method jwplayer().setControl(false [or] true); to workaround this-
Cooper

webmaster

User  
3 rated :

Hi Cooper

I still feel misunderstood.

Again, I want a video that autostarts with no visible controls. As soon as I move the mouse pointer over the video, the controls should appear and if I move the mouse pointer out of the video, the controls should auto-hide.

I can’t use your suggested setup param (controls: false) because then the controls never show up.

On my testsite http://temp.juergwaldmeier.ch/test I use the following setup:

<div id="myElement">Loading the player...</div>
<script type="text/javascript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "media/auge.mp4",
image: "media/auge.jpg",
skin: { name: "five" },
width: 640,height: 360,
autostart: true,
controls: true
});
</script>

As I explained in my initial post, the behavior of JW Player 7 with an autostarting video and enabled controls is not what I want. The controls show up right from the beginning but don’t auto-hide before I move the mouse pointer for the first time over the video and out again. If I don’t hover the video at least once, the controls stay visible until the video has completed. Why does the auto-hiding not work right from the beginning? This isn’t nice and a bug for me.

I hope you understand now what I really want.

klopfer

User  
3 rated :

Same here. Also is a bug for me as it was for JWP 6, which was verified by JWP staff (even yourself Cooper) and was fixed in JWP 6:

http://support.jwplayer.com/customer/portal/questions/5405138-hide-controlbar-after-autoplay

http://support.jwplayer.com/customer/portal/questions/9764714-hide-controls-until-mouseover

http://support.jwplayer.com/customer/portal/questions/11388605-jwplayer-6-is-not-auto-hiding-control-bar-on-load-in-chrome-how-can-i-do-that-

Maybe a temporary workaround:
http://support.jwplayer.com/customer/portal/questions/6456375-video-controls-don-t-hide-at-the-start

Will there be a fix for JWP 7?

klopfer

User  
0 rated :

here is a live sample:
https://jsbin.com/nupabe/5/edit?html,js,output

Randy

JW Player Support Agent  
0 rated :

Hello,

I have replicated the issue on my end as the controls will only autohide after the mouse hovers over the player. I can raise this with our development team. If you place some code that potentially hides the controls after x amount of time does that work for you?

Randy

webmaster

User  
0 rated :

Hi Randy

Thanks for understanding the autohiding issue now. What code do you suggest? Do you have an example? Anyway, that code should be only a workaround. I just think that JWP's normal behaviour should be that the autohiding works without that first hover. Would be good if your development team took care about it.

But what's about my other question? I want a video that autostarts with no visible controls. As soon as I move the mouse pointer over the video, the controls should appear and if I move the mouse pointer out of the video, the controls should auto-hide. JWP's normal autostart behaviour is that it allways starts with visible controls.

Randy

JW Player Support Agent  
0 rated :

Hello,

At the moment we do not have a workaround but I have spoken with our development team and they would like to have this implemented in a potential future release of the player. I do not have a version number but in the near future.

Thanks,
Randy

webmaster

User  
1 rated :

Hi Randy

Thanks. Let's hope that the near future is close.

csg.support

User  
1 rated :

Here's a temporary workaround (copied loosely from a thread mentioned earlier). For some reason, I had to wrap the player in a container to get my mouserenter/leave events to fire - but this works for me. Hope it helps.

<div id="myPlayer-container">
<div id="myPlayer"></div>
</div>

jwplayer("myPlayer").setup({
...
autostart: true,
controls: false
});

$("myVideo-container").mouseenter(function() {
jwplayer("myPlayer").setControls(true);
}).mouseleave(function () {
jwplayer("myPlayer").setControls(false);
});

This question has received the maximum number of answers.