HTML5 video player behavior on iPhone and iPod in Safari Web Apps
Solution 1:
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
Solution 2:
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.