|
|
@@ -24,7 +24,7 @@
|
|
|
#import "ZFPlayerConst.h"
|
|
|
#import "ZFUtilities.h"
|
|
|
#import "lastFileManager.h"
|
|
|
-
|
|
|
+#import "DFPlayer.h"
|
|
|
|
|
|
@interface videoPlayByAVPlayerViewController ()
|
|
|
@property (nonatomic, strong) ZFPlayerController *player;
|
|
|
@@ -44,6 +44,7 @@
|
|
|
@property (nonatomic, strong)previewVideoLandscapeTopMoreView *previewVideoLandscapeTopMoreV;
|
|
|
@property(nonatomic,strong) editShareView *editShareV;
|
|
|
@property(nonatomic,assign) BOOL isPortraitType;//竖屏状态
|
|
|
+@property(nonatomic,assign) BOOL isCodeSuspendAudioType;//手动暂停播放音乐
|
|
|
@end
|
|
|
|
|
|
@implementation videoPlayByAVPlayerViewController
|
|
|
@@ -100,6 +101,12 @@
|
|
|
|
|
|
//数据埋点
|
|
|
[[netWorkManager shareInstance] DataEmbeddingPointBy:4 withEventValue:@"Video_preview"];
|
|
|
+
|
|
|
+ if([DFPlayer sharedPlayer].state == DFPlayerStateBuffering
|
|
|
+ ||[DFPlayer sharedPlayer].state == DFPlayerStatePlaying){
|
|
|
+ _isCodeSuspendAudioType = YES;
|
|
|
+ [[DFPlayer sharedPlayer] df_pause];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)viewDidAppear:(BOOL)animated
|
|
|
@@ -429,6 +436,11 @@
|
|
|
- (void)didClickBackBtnFun
|
|
|
{
|
|
|
[self.player stop];
|
|
|
+
|
|
|
+ if(_isCodeSuspendAudioType){
|
|
|
+ [[DFPlayer sharedPlayer] df_play];
|
|
|
+ }
|
|
|
+
|
|
|
[self.navigationController popViewControllerAnimated:YES];
|
|
|
}
|
|
|
|