|
@@ -63,6 +63,8 @@
|
|
|
|
|
|
//数据埋点
|
|
|
[[netWorkManager shareInstance] DataEmbeddingPointBy:4 withEventValue:@"Music_preview"];
|
|
|
+
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(LogoutByOtherFun) name:logoutByOtherNotification object:nil];
|
|
|
}
|
|
|
|
|
|
- (void)viewDidAppear:(BOOL)animated
|
|
@@ -100,6 +102,10 @@
|
|
|
[self setTitleFunByIndex];
|
|
|
[self handleSomeUIFun];
|
|
|
}
|
|
|
+
|
|
|
+ if([DFPlayer sharedPlayer].state == DFPlayerStatePause){
|
|
|
+ _playPauseBtn.selected = NO;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)viewDidDisappear:(BOOL)animated
|
|
@@ -246,12 +252,7 @@
|
|
|
[_playPauseBtn addTarget:self action:@selector(playOrPauseButtonDidClickFun:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
[self.view addSubview:_playPauseBtn];
|
|
|
|
|
|
- if([DFPlayer sharedPlayer].state == DFPlayerStatePause){
|
|
|
- _playPauseBtn.selected = NO;
|
|
|
- }
|
|
|
- else{
|
|
|
- _playPauseBtn.selected = YES;
|
|
|
- }
|
|
|
+ _playPauseBtn.selected = YES;
|
|
|
|
|
|
|
|
|
[_playPauseBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
@@ -388,14 +389,19 @@
|
|
|
[[DFPlayer sharedPlayer] df_play];
|
|
|
}
|
|
|
else{
|
|
|
- [self stopRotatingImage];
|
|
|
- [self stopPlayingRotateRightImage];
|
|
|
-
|
|
|
- playDelayed = 0;
|
|
|
- [[DFPlayer sharedPlayer] df_pause];
|
|
|
+ [self didClickPauseFun];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+- (void)didClickPauseFun
|
|
|
+{
|
|
|
+ [self stopRotatingImage];
|
|
|
+ [self stopPlayingRotateRightImage];
|
|
|
+
|
|
|
+ playDelayed = 0;
|
|
|
+ [[DFPlayer sharedPlayer] df_pause];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 按钮点击 播放模型
|
|
|
- (void)didClickPlayModelButtonFun:(UIButton*)but
|
|
|
{
|
|
@@ -1020,4 +1026,12 @@
|
|
|
view.center = CGPointMake (view.center.x - transition.x, view.center.y - transition.y);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+#pragma mark 被挤下线
|
|
|
+- (void)LogoutByOtherFun
|
|
|
+{
|
|
|
+ if(_playPauseBtn.selected){
|
|
|
+ [self playOrPauseButtonDidClickFun:_playPauseBtn];
|
|
|
+ }
|
|
|
+}
|
|
|
@end
|