I'm building an audio application for iOS in Swift.
Every time I connect my bluetooth earphones, it automatically starts playing music from my Music (iTunes) app. I'm on iOS 14.4.
Is it possible to disable this behavior programatically? Or this behavior is preempted from my specific bluetooth earphones?
Is it related to AVAudioSession.RouteSharingPolicy?
I would like to launch audio control center from my application and switch audio output.
Music app has its function. How can I do it?
I am working on an iOS app with video streaming. My requirement is that I want to stream video content on Apple TV using Airplay, also streaming should continue even if my phone gets locked / app enters background state.
Thanks in advance.
I am using the ionic framework to record audio using the Media object. It was working fine but with recent iOS updates now after recording something and releasing the Media object, the sound is disabled in my app until I crash it. No sound will play form any other part of the app and the + - volume controls on the side of the phone produce no volume overlay. I don't understand enough about iOS to know what's going on.
Any help is appreciated.
I have an audio element in the UIWebView, but when I lock the screen, the audio will be paused. How can I continue to play it when the screen locked?
If you are talking about iOS devices, then as long as you do not bookmark the site to the home screen and Safari is open and playing the audio, it will continue to play when the screen locks. Only if you try to multi-task will it shut off the sound on your page.
You must ensure that background audio is enabled in your iOS app. You can find a sample project here https://github.com/jsagorin/iOSBackgroundAudio