How can we handle enable/disable background audio abilities at runtime on iOS devices?

后端 未结 2 848
再見小時候
再見小時候 2021-01-17 05:02

I know how to set up my iOS application to make it playing audio in background (= when another application is used on the iOS device) using the plist.

Some applicati

2条回答
  •  被撕碎了的回忆
    2021-01-17 05:54

    In your AppDeletate:

    - (void)applicationDidEnterBackground:(UIApplication *)application {
        [[YouPlayerClass sharedInstance] stop];
    }
    

    Thus The audio stops at app entering background.

提交回复
热议问题