3

I'm working on an iOS app that, for reasons we won't get into here, wants to sometimes disable AirPlay playback on a remote device, and only play video locally on the iOS device, regardless of the user's settings.

I'm using AVPlayer to play the video, and that's currently non-negotiable.

I'm setting the iOS 5.0+ AVPlayer property allowsAirPlayVideo to NO, which prevents the video from playing remotely. But if the user has turned on AirPlay on the iOS device, the audio is still streamed through the remote device.

I don't see a comparable allowsAirPlayAudio flag in Apple's documentation, nor have I found mention of this issue anywhere else.

For example, this Stack Overflow question:

Audio Output Routes for AirPlay

talks about "audio output destinations in a USB audio accessory", which doesn't sound like what I need.

I don't want to just turn off audio, I want the audio to keep being played through my iOS device.

Am I missing something? Thanks!

Community
  • 1
  • 1
apontious
  • 31
  • 3

1 Answers1

0

Possible a duplicate of How to detect if a bluetooth headset plugged or not IOS 8?

I know it's an old question, but hey, it may help some one

Community
  • 1
  • 1
Gerrit Post
  • 1,129
  • 12
  • 25