• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Question about Audio for iOS (SessionCategory?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about Audio for iOS (SessionCategory?)


  • Subject: Question about Audio for iOS (SessionCategory?)
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Fri, 18 Aug 2017 17:10:02 +0000

I have an application that plays snippets of audio - mainly targetted
towards BT headphones. It works, however it stops audio from other apps.

For instance, I am listening to some Apple Music on my phone over my
headphones. My app then plays some audio - which comes through the
headphones as expected, but when my audio is done, the Apple Music audio is
paused. I have to go back to Apple Music and play again. How can I avoid
this? This is my current setup.

let audioSession = AVAudioSession.sharedInstance()
        do {
            try audioSession.setCategory(AVAudioSessionCategoryPlayback,
with: [.allowBluetooth, .mixWithOthers])
            try audioSession.setActive(true)
        } catch {
            print("Error")
        }

My capabilities are: background modes: Audio, Airplay, and Picture in
Picture, Location Updates, Uses Bluetooth LE accessories, Background Fetch,
and Remote Notifications.

I was expecting that when my audio completes (mp4 followed by a bit of
AVSpeechSynthesizer), that the Apple Music would continue to play.

??

Thanks,
Eric
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Question about Audio for iOS (SessionCategory?)
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Question about NSObject based Class & delegates
  • Next by Date: Re: Question about Audio for iOS (SessionCategory?)
  • Previous by thread: Re: NSUserDefault controller bindings - observeValueForKeyPath called twice?
  • Next by thread: Re: Question about Audio for iOS (SessionCategory?)
  • Index(es):
    • Date
    • Thread