I am currently playing with some application ideas using AirPlay mirroring, and a second UIScreen (a la Real Racing) on my Apple TV2 along with HTML5 video content (x-webkit-airplay = "deny") in UIWebView (allowInlineMediaPlayback = YES, mediaPlaybackAllowsAirPlay = NO) on my iPad in iOS 5.
Without Airplay, the content in the UIWebView displays embedded on the iPad (as expected). After mirroring on air, the content is always played in full screen mode on the Apple TV (hiding the external interface of the screen) and shows the image "play video on the Apple TV" in UIWebView on the main screen:

Here is my HTML:
<html> <head> <title>HTML 5 Video</title> </head> <body> <video controls="controls" x-webkit-airplay="deny" width="280" height="200"> <source src="http://html5demos.com/assets/dizzy.mp4" type="video/mp4" /> <source src="http://html5demos.com/assets/dizzy.webm" type="video/webm" /> <source src="http://html5demos.com/assets/dizzy.ogv" type="video/ogv" /> </video> </body> </html>
Here is the relevant snippet of project code:
NSString *urlString = @"http://medialog.roamrlog.com/video.html"; NSURL *url = [NSURL URLWithString:urlString]; NSURLRequest *urlRequest = [[NSURLRequest alloc] initWithURL:url]; _webView = [[UIWebView alloc] initWithFrame:CGRectMake(50, 20, 280, 200)]; _webView.delegate = self; _webView.allowsInlineMediaPlayback = YES; _webView.mediaPlaybackAllowsAirPlay = NO; [_webView loadRequest:urlRequest];
It seems that all settings are ignored when mirroring is enabled:

(audio and video are transmitted to ATV via AirPlay with mirroring, as expected not )
And partially confirms them (see below) when mirroring is turned off:

(audio is transmitted to ATV via AirPlay without mirroring, as expected) video does not match )
I need UIWebView content to always play in line regardless of AirPlay Mirroring. Any ideas how I can get around this problem?
Thanks in advance!
source share