airplay

iOS AirPlay: my app is only notified of an external display when mirroring is ON?

喜夏-厌秋 提交于 2019-12-09 12:24:33
问题 I'm trying to enable AirPlay support in my app. I'm not doing video; I want to use the external display as a "second display". Here's my problem: if I choose "AppleTV" from my AirPlay button, my app doesn't get notified. The only time my app -does- get notified is when I leave my app, go to the OS-level AirPlay button, choose "AppleTV" there and turn on Mirroring. If I turn mirroring off, my app is then told that the external display is gone. So: Why doesn't my app get notified when I pick an

Purpose of mediaPlaybackAllowsAirPlay property on UIWebView

血红的双手。 提交于 2019-12-08 20:08:07
问题 The UIWebView Class Reference describes mediaPlaybackAllowsAirPlay as follows: A Boolean value that determines whether Air Play is allowed from this view. When the mediaPlaybackAllowsAirPlay is set to YES: If on my iPad I load a YouTube or Vimeo video to a UIWebView with this set to it's default value of YES and play the video while mirroring to an AirPlay device, the video signal is sent to the AirPlay device and takes over the AirPlay device screen and "TV Connected / This video is playing

iOS screen mirroring shows overscan borders on selected apps

落爺英雄遲暮 提交于 2019-12-08 19:15:57
问题 Problem: iPhone screen mirroring & a dedicated external view of my app show an inch of a black border on all sides. But: Some views display perfect without black borders on the full-screen, e.g., the Apple TV menu and the photo app. Tried already - with no effect: Disabled overscan on 1080p HD TV ("Disable 16:9 overscan") ( iPad Mirroring using 2 screens, does it support 1080 resolution? ) set UIScreenOverscanCompensation - has no effect ( IOS - External (hdmi) output fills only half the

Detecting iOS AirPlay screen mirroring capabilities

一曲冷凌霜 提交于 2019-12-08 11:03:56
问题 I've developed a user experience in my iOS app for displaying a different view on an external screen connected via AirPlay screen mirroring or HDMI out. I have a setting to enable/disable this feature, allowing the user to choose between this mode and true mirroring (i.e. same experience on both screens). Since many iOS devices don't even support external displays (iPhone 3GS and earlier, iPod touches) and some only support HDMI out (iPhone 4, iPad 1, iPad 2 with iOS4), I'd like to tailor the

UIScreen screens always return 1 screen

孤街醉人 提交于 2019-12-08 03:08:13
问题 I'm trying to display a picture on Apple TV with Airplay without mirroring mode. But [UIScreen screens] method always return 1 screen (main screen) when mirroring is OFF. I want my picture display same as Photo application (Airplay without mirroring). [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidConnect:) name:UIScreenDidConnectNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidDisconnect:) name

AirPlay Mirroring iPhone to Mac OS / using UIWebView + AirPlay

烈酒焚心 提交于 2019-12-07 11:21:16
问题 I need to live-demo a Mobile Safari browser app (iOS 5, iPhone 4S) on my Macbook and was wondering the best way to do this? One way I thought might be possible would be using AirPlay Mirroring, but there doesn't seem to be any Mac OS apps capable of showing my iPhone screen mirrored. I am an (beginner) iOS developer and wondered if there was anyway I could knock up a basic app with a UIWebView in it to somehow stream the contents of the web page and my interactions with it to my Mac. Any

How to support airplay in the background in iOS6

安稳与你 提交于 2019-12-07 06:43:22
问题 My app should stream video's to an AppleTV via Airplay, even when the app is in the background. Under iOS5 it worked perfectly. In iOS6 it does not. Xcode gives me a deprecated warning on this line of code: moviePlayerViewController.moviePlayer.useApplicationAudioSession = NO; Is this the reason why my app isn't functioning correctly anymore. What is the equivalent of this piece of code in iOS6? 回答1: Found the solution: this problem can be solved by setting the right AVAudioSessionCategory

UIScreen screens always return 1 screen

一世执手 提交于 2019-12-06 15:42:40
I'm trying to display a picture on Apple TV with Airplay without mirroring mode. But [UIScreen screens] method always return 1 screen (main screen) when mirroring is OFF. I want my picture display same as Photo application (Airplay without mirroring). [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidConnect:) name:UIScreenDidConnectNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenDidDisconnect:) name:UIScreenDidDisconnectNotification object:nil]; I used them, but they only work when Mirroring is ON.

iOS AirPlay Action Sheet for public app store publishing - like in Spotify

瘦欲@ 提交于 2019-12-06 14:57:37
问题 I've been working on a project that involves AirPlay endpoint selection and was wondering how the guys at Spotify had done the following in-app selection of the available AirPlay endpoints (you can see an AirPlay icon/message at the bottom of the app that when tapped brings up a similar Action Sheet to what you'd see via the Control Center): From what I know, the only "public" API one may use for this kind of thing is MPVolumeView which is not necessarily the same, as it'd show a volume

How to use iOS 5+ AirPlay for a second screen

时光毁灭记忆、已成空白 提交于 2019-12-06 10:29:02
I'm toying with AirPlay using an iPhone 4S and I'm having some trouble. I've updated my Apple TV 2 to the latest (4.4.3 I think? I forget, it's in the other room and I'm too lazy to check) and I have iOS 5.0 on my 4S while I use Xcode 4.2 Build 4D199. I wrote a simple UIView app that attempts to draw on a second screen when available. Here's what I have in my viewDidLoad: - (void)viewDidLoad { [super viewDidLoad]; [self.view addSubview:[[MPVolumeView alloc] initWithFrame:CGRectMake(0, 0, 320, 50)]]; NSLog(@"Registering for screen connect events..."); // Do any additional setup after loading