views:

41

answers:

1

I am using HTML5 video tags in a UIWebview on the iPad, and positioning them as needed using CSS. The key part of these videos is that they are designed to take up part, but not all, of the visible area on the page. When I'm doing this in the "normal" mode of displaying content only to the primary UIScreen, everything works great.

However, when an external VGA projector is hooked up as a second UIScreen, the video tag content immediately becomes FULL SCREEN. This seems to also happen in Safari when looking at, for example, YouTube videos. In searching the docs, there seems to be no way to stop / control this behavior.

Is there any way to stop a video tag from forcing its content to go to full screen when a second display is connected?

A: 

Unfortunately, using a UIWebView iOS 3.2 doesn't offer any way to do this. Video in a UIWebView always plays fullscreen on an external display using the TV out feature.

However, the good news is that iOS 4 does offer a solution. UIWebView has a couple of new properties:

allowsInlineMediaPlayback http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW32

mediaPlaybackRequiresUserAction http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW33

The former will allow the videos to remain 'inline' as opposed to using the full-screen player.

Jeffrey Meyer