|
If anyone wants a function that pauses the video if clicked anywhere on the video, copy this in the script:
var pauseClick = function()
{
moviePlayer.addEventListener('click', function(e)
{
if (e.layerY - moviePlayer.offsetTop >= moviePlayer.clientHeight - controllerHeight - 100) return;
var state = unsafeWindow._gel('movie_player').getPlayerState();
if(state==1) unsafeWindow._gel('movie_player').pauseVideo();
else if(state==2||state==-1||state==0) unsafeWindow._gel('movie_player').playVideo();
}, false);
};
And add pauseClick(); in the window object at the end of the script.
Thanks to http://userscripts.org/users/23652
|