On the iPhone and iPod, if a YouTube video is embedded in a web page, the user can touch the video and the video will start playing—the iOS media player slides in and the vi
Hm, can't try that myself...but sure you've seen this?
http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html#//apple_ref/doc/uid/TP40009356
So, "webkitEnterFullScreen()" might be your friend (although the doc says its read-only):
http://nathanbuskirk.com/?p=1
Inline video is not possible on any iOS device beside iPad (so far).
Anyway, you may detect the end of a video in Javascript by using an Event Listener:
document.getElementById('video').addEventListener('ended',videoEndListener,false);
Cheers,
Jan
From the Safari documentation:
"Important: The webkitEnterFullscreen() method can be invoked only in response to a user action, such as clicking a button. You cannot invoke webkitEnterFullscreen() in response to an onload() event, for example."
That might explain why your webkitEnterFullscreen is always false.
http://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ControllingMediaWithJavaScript.html#//apple_ref/doc/uid/TP40009523-CH3-SW13
Jan's solution handling the 'ended' event is the best in your case.