AirPlayVideo property on iOS 6

Does anyone know what should be used, turn off video playback from AirPlay on iOS 6.0?

I tested on iOS 6.0 and 5.1 and still worked.

I'm currently using allowAirPlayVideo = NO, but on iOS 6 it is deprecated according to Apple's documentation:

Deprecated AVPlayer Methods

Thanks.

+4
source share
2 answers

Not the only thing missing in the online documentation! IOS 6 has three deprecated AVPlayer methods:

airPlayVideoActive allowsAirPlayVideo usesAirPlayVideoWhileAirPlayScreenIsActive 

It seems they have been replaced by:

 externalPlaybackActive allowsExternalPlayback usesExternalPlaybackWhileExternalScreenIsActive 

Information derived from this set of differences . (Hi, Apple? You could do it better!)

+11
source

The property you must set is allowsExternalPlayback in iOS 6 instead of allowsAirPlayVideo from iOS 5.

+4
source

Source: https://habr.com/ru/post/1437607/


All Articles