|
@@ -16,6 +16,10 @@
|
|
|
#import "customDownloadCacheManager.h"
|
|
|
#import "CustomerWebViewController.h"
|
|
|
|
|
|
+#import "audioPlayingView.h"
|
|
|
+#import "DFPlayer.h"
|
|
|
+#import "audioPlayerViewController.h"
|
|
|
+
|
|
|
@interface mineViewController ()
|
|
|
@property(nonatomic,strong)UIButton *netButton;
|
|
|
@property(nonatomic,strong)UILabel *snLabel;
|
|
@@ -473,6 +477,8 @@
|
|
|
{
|
|
|
[super viewWillAppear:animated];
|
|
|
[self setDataFun];
|
|
|
+
|
|
|
+ [self handelAudioPlayingViewFun];
|
|
|
}
|
|
|
|
|
|
- (void)viewWillDisappear:(BOOL)animated{
|
|
@@ -485,4 +491,59 @@
|
|
|
[self.navigationController pushViewController:vc animated:animated];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+#pragma mark 处理音频播放中的视图状态
|
|
|
+- (void)handelAudioPlayingViewFun
|
|
|
+{
|
|
|
+ audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
|
|
|
+
|
|
|
+ if([DFPlayer sharedPlayer].state == DFPlayerStateBuffering
|
|
|
+ ||[DFPlayer sharedPlayer].state == DFPlayerStatePlaying
|
|
|
+ ||[DFPlayer sharedPlayer].state == DFPlayerStatePause){//播放中
|
|
|
+
|
|
|
+ [self showAudioPlayingViewFun];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [self hideAudioPlayingViewFun];
|
|
|
+ }
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ audioPlayingV.didClickButtonFun = ^(NSInteger tag) {
|
|
|
+ if(tag == 1){
|
|
|
+ [weakSelf hideAudioPlayingViewFun];
|
|
|
+ }
|
|
|
+ else if(tag == 5){
|
|
|
+ [weakSelf AudioPlayingGotoAudioPlayerVCFun];
|
|
|
+ }
|
|
|
+ };
|
|
|
+}
|
|
|
+
|
|
|
+- (void)AudioPlayingGotoAudioPlayerVCFun{
|
|
|
+ audioPlayerViewController *vc = [audioPlayerViewController new];
|
|
|
+ vc.isfirstEnterType = NO;
|
|
|
+ [self.navigationController pushViewController:vc animated:YES];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 显示音频播放中的视图
|
|
|
+- (void)showAudioPlayingViewFun
|
|
|
+{
|
|
|
+ audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
|
|
|
+ [self.view addSubview:audioPlayingV];
|
|
|
+
|
|
|
+ [audioPlayingV mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.height.mas_equalTo(49);
|
|
|
+ make.left.mas_equalTo(0);
|
|
|
+ make.right.mas_equalTo(0);
|
|
|
+ make.bottom.mas_equalTo(-TABBARHEIGHT);
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 隐藏音频播放中的视图
|
|
|
+- (void)hideAudioPlayingViewFun
|
|
|
+{
|
|
|
+// audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
|
|
|
+// [audioPlayingV removeFromSuperview];
|
|
|
+}
|
|
|
@end
|