Monday 15 September 2014

jquery - Detect touch on a video element on iphone -


I currently have a video using html5 video tags on a webpage. I have to find a user touching anywhere on the video tag I am using the jquery library but it is detecting any touch even though I do this on whole body tags, it will not be redeemed. I have used the following:

  $ (document) .ready (function () {$ ('video'). Bind ("touchstart", function (e) {alert ('video Clicked! ')});});   

Any ideas about how to respond to the video for a touch on the iPhone?

I'm able to do it! Short answer iOS prevents any element overlaying a video tag, clicking on the method of function above it (the panel at the function will be ignored). The solution is not to use a video tag at the beginning, rather to create its own digital tag with the data tag elements on it. Once you click on this diagram, you must inject all the important values ​​in the video tag when you fly. Once this is done, you can run your own video player script (I support jade on video). I have an example of a work zip folder based on BBC iPlayer =

Is there a way to spread it around? It has taken me a lot of time, from which I hope you find it useful.

No comments:

Post a Comment