Just to be clear about your question, tho, you can choose to allow airplay or not in your app, but you can't control use of it outside of your app.
Thanks for your prompt reply.
My main focus is from within the App. What I understood from your response is that the app can choose to allow airplay in it.
My main concern is; can we programmatically
- enable (turn on) airplay mirroring within the app
- then, App will list available devices (TVs)
- User will tap on one so as to connect to TV and start mirrioring
- App can disconnect TV and stop mirrioring.
- (User should not turn Airplay ON/OFF from iOS settings panel)
See the documentation at the link, it explains how to use a picker in your to choose the device/TV, etc.