teodorpatras / Jukebox

Player for streaming local and remote audio files. Written in Swift.
MIT License
551 stars 122 forks source link

Upgrading From 0.1.1 to 0.1.3 stops Background Play #10

Closed singhdd93 closed 8 years ago

singhdd93 commented 8 years ago

I am unable to play the music in background. Once the app is hidden by pressing home button the music stops with fade effect.

Reverting back to 0.1.1 fixes it.

teodorpatras commented 8 years ago

yes, because now, the call to UIApplication.sharedApplication().beginReceivingRemoteControlEvents() has been removed from inside Jukebox. Since you(the client) handle the remote events by overriding remoteControlReceivedWithEvent(event:), it makes more sense to also call beginReceivingRemoteControlEvents(), checkout the Readme and the Example project for more info

singhdd93 commented 8 years ago

I am keeping jukebox variable in singleton and then Access remote events from my custom Navigation Controller. I have the UIApplication.sharedApplication().beginReceivingRemoteControlEvents() in viewDidLoad() and have overriden remoteControlReceivedWithEvent(event: UIEvent?) but it still happens.

Thanks alot