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

Pause when click on video


Anyway for user to pause the video just by clicking on it and resume play by clicking on it again.

(Wthout having any controls visible.)

Please, I know about zero coding, so I basically need to be able to copy and paste this to work.

3 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Here is some sample code – https://gist.github.com/emaxsaun/dc3051698c3ceb4fc1cb

<!DOCTYPE html>
<script src="http://p.jwpcdn.com/6/9/jwplayer.js"></script>
<div id='my-video'></div>
<script type='text/javascript'> jwplayer('my-video').setup({ file: "http://content.bitsontherun.com/videos/i8oQD9zd-kNspJqnJ.mp4", image: "http://content.bitsontherun.com/thumbs/i8oQD9zd-640.jpg", controls:false }); jwplayer().onDisplayClick(function(event) { jwplayer().play(); }); </script>

contact

User  
0 rated :

Is there anyway I can have this code set a 700x400 on desktop and shrink to responsive size when viewed on mobile?

When I view on Desktop - it's good, but when I view on mobile - the video is much bigger than everything else (which is responsive)

Please paste the update example code.

Ethan Feldman

JW Player Support Agent  
0 rated :

Updated – https://gist.github.com/emaxsaun/2e846b9acf8c4c0be3d0

It is responsive now.

<!DOCTYPE html>
<script src="http://p.jwpcdn.com/6/9/jwplayer.js"></script>
<div id='my-video'></div>
<script type='text/javascript'> jwplayer('my-video').setup({ file: "http://content.bitsontherun.com/videos/i8oQD9zd-kNspJqnJ.mp4", image: "http://content.bitsontherun.com/thumbs/i8oQD9zd-640.jpg", controls:false, aspectratio:"16:9", width:"100%" }); jwplayer().onDisplayClick(function(event) { jwplayer().play(); }); </script>

This question has received the maximum number of answers.