|
@@ -10,6 +10,8 @@
|
|
|
#import <AVFoundation/AVFoundation.h>
|
|
|
#import <AudioToolbox/AudioToolbox.h>
|
|
|
|
|
|
+#import "DFPlayer.h"//这个播放音乐的第三方 这个播放静音会影响到音乐后台播放
|
|
|
+
|
|
|
@interface AudioSessionObject()
|
|
|
@property (strong, nonatomic) AVAudioPlayer *audioPlayer;
|
|
|
@property (strong,nonatomic) NSTimer *timer;
|
|
@@ -67,6 +69,11 @@
|
|
|
- (void)appDidEnterBackground {
|
|
|
NSLog(@"%@ appDidEnterBackground",NSStringFromClass([self class]));
|
|
|
|
|
|
+ if([DFPlayer sharedPlayer].state == DFPlayerStateBuffering
|
|
|
+ ||[DFPlayer sharedPlayer].state == DFPlayerStatePlaying){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
_isBackgroundType = YES;
|
|
|
|
|
|
BOOL isBackground = [HWDataManager getBoolWithKey:stringKeyAddSn(Const_file_Transfe_working_background)];
|