ios - Get information of currently playing tracks other than music app in native app objective c -
i want detect playing song in native app ether 1 audio session in app. implemented below , when song playing through phone music app, working fine.
-(void)checksession { bool isplayingwithothers = [[avaudiosession sharedinstance] isotheraudioplaying]; if(isplayingwithothers) { _controller = [mpmusicplayercontroller systemmusicplayer]; [_play setenabled:yes]; [_pause setenabled:yes]; [_next setenabled:yes]; [_prev setenabled:yes]; } }
but if song playing app pandora app, mpmusicplayercontroller not working. please suggest how can control next, prev, play , pause if song being played via apps rather phone music app.
any highly appreciated! in advance!
• cannot control playback of other apps own app unless has drastically changed in ios11.
• in same vein, cannot info on playing unless using 1 of built-in musicplayers (systemmusicplayer, , maybe applicationmusicplayer)
i have not looked on changes in ios11 see if has changed.
Comments
Post a Comment