"Skip Intro" link over HTML5 video not working on iPad
I am 开发者_如何学Pythonusing the "Javascript Fake Click" script to autoplay an introductory HTML5 video on an iPad, which then directs to a landing page.
I have a simple "skip intro" link on top of the video element in a higher z-index. This link works in other browsers, but not on the iPad (iOS 3.2.2).
I think it may have to do with the click event on a video on the iPad defaulting to pause/play the video. Any ideas on how to get around this?
As far as I know, the javascript hack doesn't work on iOS 4 and above. Apple forces all videos on iOS to start only from user input, so "autoplay" doesn't work either. If you remove the "controls" attribute, the video won't even start playing. What you're trying to accomplish isn't acctually possible (considering all the iOS versions...)
This may be the same problem I had. The video tag will capture all the events when the controls attribute is added to the video tag.. Try removing the controls attribute...
I made something like that. I used this function:
function videoEnd() {
$('#mainVideo').fadeOut('slow');
window.location = "/home.aspx";
}
Works fine on the iPAD.
精彩评论