Monday, June 3, 2013

UIWebView mediaPlaybackAllowsAirPlay example in Objective C (iOS).


UIWebView mediaPlaybackAllowsAirPlay

A Boolean value that determines whether Air Play is allowed from this view.

@property(nonatomic) BOOL mediaPlaybackAllowsAirPlay

Discussion of [UIWebView mediaPlaybackAllowsAirPlay]
The default value on both iPad and iPhone is YES.

UIWebView mediaPlaybackAllowsAirPlay example.
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];

End of UIWebView mediaPlaybackAllowsAirPlay example article.