NathanWalker / ShoutOutPlay

The mobile app that allows you to create and record personal dedications using your favorite music playlists for corporate events, parties, weddings and get togethers.
https://shoutoutplay.com
30 stars 7 forks source link

Implement Control Center (MPNowPlayingInfoCenter) apis to control player from iOS lock screen #30

Closed NathanWalker closed 8 years ago

NathanWalker commented 8 years ago

http://stackoverflow.com/questions/25845882/control-the-application-from-control-center-in-ios

http://stackoverflow.com/questions/20363058/avaudioplayer-on-lock-screen

https://github.com/jsagorin/iOSBackgroundAudioSwift/blob/master/BackgroundAudioSwift/Music/TestMusicPlayer.swift

NathanWalker commented 8 years ago

apple api docs: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPNowPlayingInfoCenter_Class/

NathanWalker commented 8 years ago

Experimenting here: https://github.com/NathanWalker/ShoutOutPlay/blob/development/app/shared/shoutoutplay/services/player.service.ts#L360 And here for wiring up buttons: https://github.com/NathanWalker/ShoutOutPlay/blob/development/app/shared/shoutoutplay/services/player.service.ts#L378-L387

NathanWalker commented 8 years ago

More interesting resources: https://github.com/spotify/ios-sdk/issues/354 (worth mentioning that getting MPNowPlayingInfoCenter working would be best to do in isolation in the spotify plugin repo alone: https://github.com/NathanWalker/nativescript-spotify since getting it to work there will be easier with less going on and once it works there, we can apply same to shoutoutplay)