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

disable pause when click on screen


I used follow codes to disable click on screen as Ethan mentioned on bellow thread, but still got paused after click on screen.

I'm using Jwplayer 7.0.1.

Am I right?

http://support.jwplayer.com/customer/portal/questions/6562608-how-to-disable-pause-completely-

var playerInstance = jwplayer("videoarea");
playerInstance.setup({
...
});
playerInstance.on('displayClick', function () {
return false;
});

3 Community Answers

Randy

JW Player Support Agent  
0 rated :

Hello,

I think your on the right track. I tried the following code which seemed to work for me:

<!DOCTYPE html>
<html>
<head>
<script src="http://p.jwpcdn.com/player/v/7.1.4/jwplayer.js"></script>

</head> <body>

<div id= "myEmbed">Loading Your Player…</div>
<script> jwplayer.key="YOUR KEY"; var playerInstance = jwplayer('myEmbed'); playerInstance.setup({ file: 'bunny.mp4', }); jwplayer().onDisplayClick(function(){ jwplayer().play("false"); }); </script>

</body> </html>

Does it work on your end?

Randy

jason

User  
1 rated :

Thanks Randy!

Still not work. I also tried:

jwplayer().onDisplayClick(function(){ jwplayer().play(false); });

and

playerInstance.on('displayClick',function(){return false;});

and

playerInstance.on('displayClick',function(){return "false";});

But none of them works, it still stopped playing after click on the screen.

Any other solution?

Randy

JW Player Support Agent  
0 rated :

Hello Jason,

Do you have a sample link?

Randy

This question has received the maximum number of answers.