I'm working on App that uses Airplay. As part of the requirements, I need to detect if a video is playing on the device to stop the Airplay streaming.
Is there any way to achieve this?
You can use;
A Boolean value that indicates whether another app is playing audio.
AVAudioSession.sharedInstance().isOtherAudioPlaying
or
secondaryAudioShouldBeSilencedHint
A Boolean value that indicates whether another application is playing audio.
AVAudioSession.sharedInstance().secondaryAudioShouldBeSilencedHint
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.