Assigning mediaPlaybackAllowsAirPlay to a UIWebView

The UIWebView class reference describes mediaPlaybackAllowsAirPlay as follows:

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

If MediaPlaybackAllowsAirPlay is set to YES: If on my iPad I upload YouTube or Vimeo videos to UIWebView with the default YES and play the video when mirroring on the AirPlay, the video is sent to the AirPlay and takes over the screen of the AirPlay and "TV Connected / This video plays on a TV" is displayed in UIWebView on AirPlay. This is the behavior that I would expect.

If MediaPlaybackAllowsAirPlay is set to NO: I get exactly the same behavior as above. I expected that if UIWebView mediaPlaybackAllowsAirPlay is set to NO, instead of sending a video signal to the AirPlay device, even if the iPad mirrors, the video will simply play inside the UIWebView on the iPad.

Has anyone used this property to create two different functional behaviors and what were they?

As far as I can tell, this property does not affect the playback of AirPlay media.

+7
source share
1 answer

It appears that the mirroring mode takes precedence over the mediaPlaybackAllowsAirPlay flag.

If I interpret the documentation correctly, mediaPlaybackAllowsAirPlay allows the user to send data only to a specific video-compatible playback. If it is disabled, the selector simply does not appear.

If this is a mistake for you, go to http://bugreporter.apple.com and tell Apple.

+1
source

All Articles