How to do screen mirroring using AirPlay from the application (not from control panel) in iOS?

后端 未结 4 2072

I am using MPVolumeView to show AirPlay button. I need to show a custom wallpaper to Apple TV through mirroring with audi

4条回答
  •  情书的邮戳
    2021-01-04 03:05

    You can screen mirroring within the app using AVPlayer property.

    That property is

    @property (nonatomic) BOOL usesAirPlayVideoWhileAirPlayScreenIsActive NS_DEPRECATED_IOS(5_0, 6_0);
    

    or

    @property (nonatomic) BOOL usesExternalPlaybackWhileExternalScreenIsActive NS_AVAILABLE_IOS(6_0);.
    

    The default value of usesAirPlayVideoWhileAirPlayScreenIsActive and usesExternalPlaybackWhileExternalScreenIsActive is NO.

    usesAirPlayVideoWhileAirPlayScreenIsActive is no effect if allowsAirPlayVideo is NO.

    And usesExternalPlaybackWhileExternalScreenIsActive is no effiect if allowsExternalPlayback is NO.

提交回复
热议问题