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

Capture mouse click coordinates

Hi all !.

I need to capture the mouse coordinates when the user executes a click over the player window in order to pause the video.

This is easy to do for example within an image onClick event (if the user clicks over an image or div element):

bc.. var xPos = event.pageX;
var yPos = event.pageY

But the same thing doesn't work within the onPause method of the jwplayer:

bc.. jwplayer().onPause( function(event){
var xPos = event.pageX;
var yPos = event.pageY;

//the values are undefined

In this link:

They talk about the ClickProxy plugin, but I don't want to install or add more complexity to my code.

Is there a way to do this?, as additional information I'm using JWPlayer 6.7.4071 and Google Chrome 31.0.1650.57 m.

Any help will be appreciated.

Best regards.

3 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have an example of where you tried this?

JW Player

0 rated :

Hi Ethan.

This application requirement has changed, so... I don't have this need anymore.


Best regards.

Ethan Feldman

JW Player Support Agent  
0 rated :


This question has received the maximum number of answers.