RichieBBB

Q: AirPlay stops working when iPad screen blanks

I found that after upgrading my iPad 2 to iOS 5 and Apple TV to iOS 4.4 AirPlay video no longer continues in the background. When I move away from the iPad 2 app that is steaming to the TV or the iPad 2 locks itself (screen blanks), the Apple TV stops playing the video. This worked fine before the iOS updates.

AppleTV 2, iOS 5

Posted on Oct 23, 2011 12:55 AM

Close

Q: AirPlay stops working when iPad screen blanks

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by karimfrommoscow,

    karimfrommoscow karimfrommoscow Nov 23, 2011 6:26 AM in response to fghibli
    Level 1 (0 points)
    Nov 23, 2011 6:26 AM in response to fghibli

    can't see this update

  • by Sundog66,

    Sundog66 Sundog66 Nov 23, 2011 6:28 AM in response to fghibli
    Level 1 (95 points)
    Nov 23, 2011 6:28 AM in response to fghibli

    No luck on my end either. iPad is 5.0.1. Nothing for AppleTV.

  • by fghibli,

    fghibli fghibli Nov 23, 2011 6:43 AM in response to RichieBBB
    Level 1 (0 points)
    Nov 23, 2011 6:43 AM in response to RichieBBB

    Just re-checked my Apple TV firmware, and found it's back to 4.4.3 and the issue is happening again!

    I'm quite sure just a few hours ago the Apple TV firmware saids 5.0.1(9443), and it fixes the issues in this thread!

    This is weired.

     

    Good thing is that it's quite promising next Apple TV firmware update will fix this bug, however, the bad thing -  is Apple able to upgrade/downgrade or send patches to our system without any notification?

  • by Samertab,

    Samertab Samertab Dec 13, 2011 7:10 PM in response to RichieBBB
    Level 1 (4 points)
    Dec 13, 2011 7:10 PM in response to RichieBBB

    I just bought an Apple TV 2. When using Airplay with my iPad 2, the iPad locks after 2 minutes (as I set it) even if I m playing a movie on my TV using Airplay. Two way to fix this:

    1) set your iPad Auto Lock to "never". This will likley deplete your iPad battery.

    2) hook your iPad to a power supply !

     

    No problem since I used the second option.

  • by davidfromcarrabelle,

    davidfromcarrabelle davidfromcarrabelle Jan 14, 2012 5:57 AM in response to RichieBBB
    Level 1 (0 points)
    Jan 14, 2012 5:57 AM in response to RichieBBB

    yes, but that is such a silly workaround for a cool feature that already worked! anyone fixed this yet??

  • by davidfromcarrabelle,

    davidfromcarrabelle davidfromcarrabelle Jan 15, 2012 7:05 AM in response to fghibli
    Level 1 (0 points)
    Jan 15, 2012 7:05 AM in response to fghibli

    sure is disappointing that it used to work . just retread this thread. my apple tv just updated a few weeks ago to 4.4.4 it says that is the latest and the problem still exixts. do y'all think it's the tv or the iOS 5 ? I lean towards ios . and as I said above 5.01 didn't fix it

  • by Sheriff Woody,

    Sheriff Woody Sheriff Woody Jan 26, 2012 10:04 AM in response to virtualshock
    Level 1 (0 points)
    Jan 26, 2012 10:04 AM in response to virtualshock

    I'd agree with this being app specific.  Running BBC iPlayer app on my iPhone and air-playing to Apple TV2 works fine, but whilst using the 4oD app once the iPhone locks airplay stops with it.

     

    Based on this, I'd say it's definitely app specific.  Possibly e-mail the app creator or post reviews via iTunes?

  • by RichieBBB,

    RichieBBB RichieBBB Jan 26, 2012 10:27 AM in response to Sheriff Woody
    Level 1 (0 points)
    Jan 26, 2012 10:27 AM in response to Sheriff Woody

    I don't believe this is app specific. My apps were all fine when running on my iPad with iOS 4. Right after the upgrade to iOS 5 the problem started. Does the BBC iPlayer prevent the iPhone from locking during playback? Or does it really continue to play after the iPhone locks?

  • by ChrisCameo,

    ChrisCameo ChrisCameo Jan 27, 2012 10:03 PM in response to RichieBBB
    Level 1 (0 points)
    Jan 27, 2012 10:03 PM in response to RichieBBB

    Looks like the ios5 update caused an app specific problem. I can confirm that TED Safari BBC iplayer and AirVideo do not drop airplay when multitasking or when ipad/iphone/ipod go to sleep.

     

    Hopefully Apple can restore whatever caused most apps to break their airplay functionality. Or maybe it will be up to app developers to fix it themselves.

  • by ChrisCameo,

    ChrisCameo ChrisCameo Jan 27, 2012 10:15 PM in response to ChrisCameo
    Level 1 (0 points)
    Jan 27, 2012 10:15 PM in response to ChrisCameo

    I started a new thread to list the apps that do work properly as we find them. Hopefully it gets updated as this problem gets more attention from frustrated AppleTv users.

     

    https://discussions.apple.com/thread/3690923

  • by davidfromcarrabelle,

    davidfromcarrabelle davidfromcarrabelle Jan 28, 2012 6:13 AM in response to ChrisCameo
    Level 1 (0 points)
    Jan 28, 2012 6:13 AM in response to ChrisCameo

    thanks Chris i'll post there as well.   my experience is as chris said. It IS app specific. but the problem only  manifested itself after ios 5.

  • by davidfromcarrabelle,

    davidfromcarrabelle davidfromcarrabelle Jan 28, 2012 6:19 AM in response to davidfromcarrabelle
    Level 1 (0 points)
    Jan 28, 2012 6:19 AM in response to davidfromcarrabelle

    can anyone point me to a thread that discusses why the Apple TV requires that you turn on the video monitor at least initially before audio will stream? you can turn it off as soon as the audio starts but it is a pain if your receiver is already on.? thx

  • by cBroadbo,

    cBroadbo cBroadbo Feb 3, 2012 10:45 AM in response to RichieBBB
    Level 1 (0 points)
    Feb 3, 2012 10:45 AM in response to RichieBBB

    This issue is that starting with iOS 5, apps are put to the background when the device goes to sleep (even if your app was the forground app!!!).

     

    So the solution is to configure your app as one that can play audio in the background (works for video too).

     

    First you must add this to your info.plist:

    info.png

     

    Here is a very simple view controller that works with AirPlay when your app is put to sleep:

     

    BMTViewController.h:

    #import <UIKit/UIKit.h>

    #import <AVFoundation/AVFoundation.h>

    #import <MediaPlayer/MediaPlayer.h>

     

    @interface BMTViewController : MPMoviePlayerViewController

    {

    }

     

    @end


     

     

    BMTViewController.m:

    #import "BMTViewController.h"

     

    @implementation BMTViewController

     

    #pragma mark - View lifecycle

     

    - (void)viewDidLoad

    {

        [super viewDidLoad];

       

      self.moviePlayer.allowsAirPlay = YES;

              [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];

              [[AVAudioSession sharedInstance] setActive: YES error: nil];

              [self.moviePlayer prepareToPlay];

    }

     

    - (void)viewDidAppear:(BOOL)animated {

        [super viewDidAppear:animated];

       

        [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

        [self becomeFirstResponder];

    }

     

    - (void)viewWillDisappear:(BOOL)animated {

        [super viewWillDisappear:animated];

       

        //End recieving events

        [[UIApplication sharedApplication] endReceivingRemoteControlEvents];

        [self resignFirstResponder];

    }

     

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

    {

      return YES;

    }

     

    //Make sure we can recieve remote control events

    - (BOOL)canBecomeFirstResponder {

        return YES;

    }

     

    - (void)remoteControlReceivedWithEvent:(UIEvent *)event {

        //if it is a remote control event handle it correctly

        if (event.type == UIEventTypeRemoteControl) {

            if (event.subtype == UIEventSubtypeRemoteControlPlay) {

                [self.moviePlayer play];

            } else if (event.subtype == UIEventSubtypeRemoteControlPause) {

                [self.moviePlayer pause];

            } else if (event.subtype == UIEventSubtypeRemoteControlTogglePlayPause) {

      if(self.moviePlayer.playbackState  == MPMoviePlaybackStatePlaying)

                                            [self.moviePlayer play];

      else

                                            [self.moviePlayer pause];

            }

        }

    }

     

    @end

     

     

    Then just instantiate your view controller from your app delegate or however you like.  Here's how I'm doing it in this demo app:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

    {

        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

        // Override point for customization after application launch.

     

      NSURL* movieURL = [NSURL URLWithString:@"http://www.yourmovieurl"];

     

      self.viewController = [[BMTViewController alloc] initWithContentURL:movieURL];

     

     

      self.window.rootViewController = self.viewController;

        [self.window makeKeyAndVisible];

        return YES;

    }

     

     

     

     

    Hope this helps everyone struggling with this issue.  There is still one issue that many of you may encounter.  NSTimers are suspended when the device goes to sleep, even though the movie is still playing in AirPlay.  It isn't the end of the world, but I track progress of movie playback and report it back to a server periodically and I'm unable to accomplish this task with the NSTimers suspended.....sigh. 

     

    Craig

  • by notyou,

    notyou notyou Apr 2, 2012 6:20 PM in response to cBroadbo
    Level 1 (20 points)
    Apr 2, 2012 6:20 PM in response to cBroadbo

    Huh? For whom is this post intended? That's all jibberish to me.

  • by teknoman_,

    teknoman_ teknoman_ May 7, 2012 10:52 AM in response to RichieBBB
    Level 1 (0 points)
    iTunes
    May 7, 2012 10:52 AM in response to RichieBBB

    Hmm new iOS update 5.1.1 just came out today, which addresses bugs with AirPlay. So maybe Apple fixed it??

     

    "Fixes bugs that affected AirPlay video playback in some circumstances"

    http://www.macrumors.com/2012/05/07/apple-releases-ios-5-1-1-with-hdr-airplay-an d-safari-syncing-bug-fixes/

     

    I'll be able to check later tonight and test it out with my AppleTV. Unless someone can give it a try sooner.

Previous Page 2 of 3 last Next