Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Airplay Mirroring + External UIScreen = fullscreen UIWebView video playback??

Hello-
I'm currently playing around with some app 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") within a UIWebView (allowsInlineMediaPlayback=YES, mediaPlaybackAllowsAirPlay=NO) on my iPad in iOS 5.

Without Airplay, the content in the UIWebView renders inline on the iPad (as expected). Once Airplay Mirroring is enabled, the content always plays full screen on the Apple TV (obscuring the external screen's UI) and shows the "video playing on Apple TV" image in the UIWebView on the main screen:

image

Here's 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's the relevant snippet of my 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 to ignore all settings when mirroring is on:

image

(audio and video are transmitted to ATV via AirPlay with Mirroring as is not expected)

And acknowledges them partly (read below) when mirroring is off:

image

(audio is transmitted to ATV via AirPlay without Mirroring as is not expected - video is not as is expected)

I need the UIWebView content to always play inline on the main screen regardless of AirPlay Mirroring. Any ideas how I can get around this issue?

Thanks in advance!
Sign In or Register to comment.