Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: click in mp4 Date: Tue, 09 Dec 2014 10:51:08 +0000 Organization: A noiseless patient Spider Lines: 16 Message-ID: <874mt5m6zn.fsf@bsb.me.uk> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="9907"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qrDH6cbQwjnb0t49+WwtPSNW/MUtxtgw=" Cancel-Lock: sha1:ROquVJsS9L+HShSC8m6ABcyAjaY= sha1:PbzroxI0CUwtyJ3BZUAxY4zxnRQ= X-BSB-Auth: 1.ed8ab7774f0d0e5634d8.20141209105108GMT.874mt5m6zn.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:26288 Andrew Poulos writes: > Is it possible for an mp4 video that is running natively in a HTML 5 > capable browser to pass the coordinates of the cursor when the video > is clicked on? I want to use JavaScript to control what "chapters" in > a video are played and I don't want "external" buttons. I hope you won't mind my re-wording this. Do you mean you want a client-side function to called, with the mouse position being passed, every time the user clicks on an HTML5 video element? I ask this because it works (as far as I know) the same as for any other element: add an even listener for the element, and it will be called with the event as an argument. -- Ben.