Support landscape mode for HTML5 video in UIWebView in UITabBarController

I've got a UIWebView inside a UINavigationController in a UITabBarController. Sometimes the pages displayed by the UIWebView contains HTML5 video objects.

The video starts playing as expected, but doesn't support landscape mode.

I think that this might be since not all of my view controllers inside the UITabBarcontroller autorotates to landscape mode (I've heard about the "all view controllers inside a UITabBarController should support autorotation to landscape mode to make the UITabBarController autorotate).

Anyone that knows any workaround? Possibly some solution to open the video itself outside of the app?

Thanks!

UPDATE 2011-03-15

I'll rephrase myself a bit, but I didn't feel it was enough to create a new question. I've got the follow hierarchy:

UITabBarController
    UINavigationController (NC-A)
        UITableView
        UIWebView (pushed from UITableView)
    UINavigationController (NC-B)
        A number of UITableViews
    UINavigationController (NC-C)
        A number of UITableViews

I want the UIWebView (in NC-A), which sometimes contains HTML5 video objects (like mentioned above), to support landscape mode (and autorotate/-resize when the user flips the phone itself)

But I don't want to implement the autorotation in the views controlled by NC-B and NC-A

To support the autorotation in a UITabBarController, I've read that "all views currently 'on top' in each of the tabs have to implement the shoudAutorotateToInterfaceOrientation (and return YES for the orientation in question)".

Is there any way to solve this?

9
задан Manne W 15 March 2011 в 10:34
поделиться