I am using JW (v 5.8) player to embed a video. And I want to do it so that autostart is enabled, allowing the video to start playing as soon as the page loads, the controlba
You can use the CSS property pointer-events on the #mediaplayer
to prevent the click event to go trough to the video:
#mediaplayer {
pointer-events: none;
}
You could also abuse the onPause
event as a fallback for older browsers
jwplayer('mediaplayer').setup({
flashplayer: 'player.swf',
file: 'video.mp4',
controlbar: 'none',
width: '1000',
height: '1000',
autostart: 'true',
events: {
onPause: function() {
this.play(true);
}
}
});