Skip to content

Commit

Permalink
-Modify update-
Browse files Browse the repository at this point in the history
  • Loading branch information
zyprosoft committed Dec 18, 2016
1 parent 86fda7b commit cec765d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion ZYChat-EaseMob/ZYChat/MusicShare/GJGCMusicPlayerBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,18 @@ - (void)stopAction
#pragma mark - GJCFAudioPlayer Delegate
- (void)audioPlayer:(GJCFAudioPlayer *)audioPlay didFinishPlayAudio:(GJCFAudioModel *)audioFile
{
self.playButton.selected = !self.playButton.isSelected;
[self.titleLabel.layer removeAnimationForKey:@"moveX"];
}

- (void)audioPlayer:(GJCFAudioPlayer *)audioPlay didOccusError:(NSError *)error
{
self.playButton.selected = !self.playButton.isSelected;
[self.titleLabel.layer removeAnimationForKey:@"moveX"];
}
- (void)audioPlayer:(GJCFAudioPlayer *)audioPlay didUpdateSoundMouter:(CGFloat)soundMouter
{


}

+ (GJGCMusicPlayerBar *)currentMusicBar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ @interface GJGCMusicPlayingViewController ()

@property (nonatomic,strong)NSString *currentSongImgUrl;

@property (nonatomic,strong)NSString *currentSongId;

@property (nonatomic,strong)UIActivityIndicatorView *downloadIndicator;

@property (nonatomic,strong)UIButton *forwardButton;
Expand All @@ -57,6 +59,7 @@ - (instancetype)initWithMusicContent:(GJGCChatFriendContentModel*)contentModel
self.currentSongAuthor = contentModel.musicSongAuthor;
self.currentSongMp3Url = contentModel.musicSongUrl;
self.currentSongImgUrl = contentModel.musicSongImgUrl;
self.currentSongId = contentModel.musicSongId;

[self.albumImageView sd_setImageWithURL:[NSURL URLWithString:self.currentSongImgUrl]];
GJCFWeakSelf weakSelf = self;
Expand Down Expand Up @@ -186,19 +189,16 @@ - (void)viewWillAppear:(BOOL)animated

- (void)forwardAction
{
if (self.songList.count == 0) {
return;
}

GJGCRecentChatForwardContentModel *forwardContentModel = [[GJGCRecentChatForwardContentModel alloc]init];
forwardContentModel.title = self.nameLabel.text;
if (GJCFStringIsNull(self.currentSongAuthor)) {
self.currentSongAuthor = @"佚名";
}
forwardContentModel.sumary = self.currentSongAuthor;
forwardContentModel.webUrl = self.currentSongMp3Url;
forwardContentModel.songId = self.songList[self.currentIndex];
forwardContentModel.songId = self.currentSongId;
forwardContentModel.contentType = GJGCChatFriendContentTypeMusicShare;
forwardContentModel.imageUrl = self.currentSongImgUrl;

GJGCRecentContactListViewController *recentList = [[GJGCRecentContactListViewController alloc]initWithForwardContent:forwardContentModel];

Expand Down
5 changes: 5 additions & 0 deletions ZYChat-EaseMob/ZYChat/MusicShare/GJGCMusicSharePlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ - (void)removePlayObserver:(id<GJCFAudioPlayerDelegate>)observer
#pragma mark - GJCFAudioPlayer Delegate
- (void)audioPlayer:(GJCFAudioPlayer *)audioPlay didFinishPlayAudio:(GJCFAudioModel *)audioFile
{
self.musicChatId = nil;
self.musicMsgId = nil;

dispatch_async(dispatch_get_main_queue(), ^{

for (id<GJCFAudioPlayerDelegate> observer in self.observers) {
Expand All @@ -76,6 +79,8 @@ - (void)audioPlayer:(GJCFAudioPlayer *)audioPlay didFinishPlayAudio:(GJCFAudioMo
- (void)audioPlayer:(GJCFAudioPlayer *)audioPlay didOccusError:(NSError *)error
{
NSLog(@"play error:%@",error);
self.musicChatId = nil;
self.musicMsgId = nil;

dispatch_async(dispatch_get_main_queue(), ^{

Expand Down

0 comments on commit cec765d

Please sign in to comment.