Thursday, August 5, 2010

iPhone: How to play a YouTube video in portrait mode when orientation lock is enabled

One of my favorite features of iOS 4 is orientation lock (double tap home button, swipe right, first icon). I can't stand the wide screen keyboard and hate when applications force you to use landscape mode. This is especially annoying when you are lying down and trying to use the phone. This new feature solves the problem in most applications. One application that doesn't handle it well, though, is YouTube.

YouTube allows you to view portrait videos, ironically though, for users that enable orientation lock (i.e. those that like portrait the most) it shows a landscape video. The problem lies in how Apple implemented orientation lock and in the fact that the YouTube app doesn't compensate for this. When orientation lock is enabled, it suppresses the events that are normally triggered when you rotate your device. This makes it much easier for apps to support this feature without having to write any logic. The problem with the YouTube app is that it starts every video in landscape, and because the event that tells it you are in portrait isn't triggered, it stays in landscape.

The way to fix it is to navigate away from the YouTube app and then back to it. Here are some of the ways to do that...

To force a YouTube video into portrait mode when orientation lock is enabled:
  1. Launch the video
  2. When the video is on the screen, do one of the following:
    • Double tap the home button (to show the running apps), then click on the video again.
    • Lock the screen, then unlock the screen.
    • Press the mail icon on the video, press cancel, and then delete draft.
    • Press the home button (to exit YouTube), then launch YouTube again (your device must support background apps so that the video is still open when you return to YouTube).

1 comment:

  1. Wow that's great for Iphone. Now tell me how to do this with my LAPTOP so I don't have to twist my head everytime someone post to youtube in the wrong orientation.