5

Is there any way to support AirPlay with AVPlayer? I know it can be done with MPMoviePlayerController, but I see no indication of AVPlayer support in the documentation.

Thanks!

Besi
  • 22,579
  • 24
  • 131
  • 223
tba
  • 6,229
  • 8
  • 43
  • 63
  • but what about this: http://stackoverflow.com/questions/6021175/airplay-meta-data-on-apple-tv-from-app-avplayer-mpvolumeview smb did it. – Greg Aug 31 '11 at 20:05
  • Did you get this to work? I am trying to use AVPlayer to play using AirPlay (without) mirroring and so far no luck. – Artilheiro Aug 11 '13 at 20:44

2 Answers2

5

It's not possible in iOS4, but will be in iOS5.

Tom Nys
  • 579
  • 6
  • 13
2

See: http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html

And specifically, set allowsAirPlayVideo to YES

quellish
  • 21,123
  • 4
  • 76
  • 83
  • 10
    If someone should stumble across this like I did, note that allowsAirPlayVideo has been deprecated in IOS 6 and replaced with allowsExternalPlayback. – emidander Dec 17 '12 at 17:01
  • 1
    allowsExternalPlayback does not showing AirPlay option. Any suggestion for me ? – Mitul Marsoniya Apr 06 '17 at 09:15