Receiving PlayPause button during audio playback

Now I'm developing a tvOS app including audio playback feature,

and I have prepared pressesBegan method for receiving Play/Pause button in my ViewController.


The method is called on the simulator, but I found that there is a case when the method is not called on Apple TV.


  • Simulator: always OK
  • Apple TV:
    • When audio playback is paused: OK
    • When audio is being played: NG


Does anyone know about the above behavior and workaround ?

When your audio session is active it steals the playPause press. If when you're done you set your session as inactive you get the playPause back         try AVAudioSession.sharedInstance().setActive(false, options: [])

Receiving PlayPause button during audio playback
 
 
Q