|
@@ -77,10 +77,9 @@
|
|
|
|
|
|
//if(_isfirstEnterType){
|
|
|
KWeakSelf
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
[weakSelf playAudioFun];
|
|
|
});
|
|
|
- //}
|
|
|
}
|
|
|
else{//点击playingview 进来的
|
|
|
|
|
@@ -806,9 +805,13 @@
|
|
|
_playPauseBtn.selected = YES;
|
|
|
}
|
|
|
|
|
|
- if(_lastAudioIndex != player.currentAudioModel.audioId){
|
|
|
+ HLog(@"df_player progress hxd _ind:%ld ---- %ld",_lastAudioIndex,player.currentAudioModel.audioId);
|
|
|
+ //if(_lastAudioIndex != player.currentAudioModel.audioId)
|
|
|
+ if(progress == 0)
|
|
|
+ {
|
|
|
_lastAudioIndex = player.currentAudioModel.audioId;
|
|
|
_index = _lastAudioIndex;
|
|
|
+ HLog(@"df_player progress hxd _ind:setTitleFunByIndex");
|
|
|
[self setTitleFunByIndex];
|
|
|
[self audioPlayerByIndex:_lastAudioIndex];
|
|
|
|
|
@@ -818,7 +821,6 @@
|
|
|
|
|
|
if(progress >= 1.0){
|
|
|
_lastAudioIndex = -1;
|
|
|
-
|
|
|
[self stopRotatingImage];
|
|
|
}
|
|
|
}
|
|
@@ -843,7 +845,8 @@
|
|
|
HLog(@"状态码:%lu",(unsigned long)statusCode);
|
|
|
[[iToast makeText:NSLocalizedString(@"play_video_fail_tip",nil)] show];
|
|
|
|
|
|
- if(_dataArray.count == 1){//只有一首的时间
|
|
|
+ _lastAudioIndex = -1;
|
|
|
+ if(_dataArray.count == 1){//只有一首的情况
|
|
|
[self stopRotatingImage];
|
|
|
[self stopPlayingRotateRightImage];
|
|
|
_playPauseBtn.selected = NO;
|
|
@@ -873,8 +876,8 @@
|
|
|
if(_audioPlayListV){
|
|
|
_audioPlayListV.playingIndex = _index;
|
|
|
}
|
|
|
-
|
|
|
- //[self downloadAudiodBy:dataModel];
|
|
|
+
|
|
|
+ HLog(@"hxd _index:%ld name:%@",_index,dataModel.name)
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -978,28 +981,4 @@
|
|
|
view.center = CGPointMake (view.center.x - transition.x, view.center.y - transition.y);
|
|
|
}
|
|
|
|
|
|
-#pragma mark 下载音频文件到缓存
|
|
|
-- (void)downloadAudiodBy:(lastFileModel*)model
|
|
|
-{
|
|
|
- if(model.isDownDoneType){
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if(!model.localPath || model.localPath.length ==0){
|
|
|
- model.localPath = [[audioPlayListManager shareManager] getAudioCacheFullPathBy:model.path];
|
|
|
- }
|
|
|
-
|
|
|
- NSString *filePath = model.path;
|
|
|
- NSString *urlStr = ksharedAppDelegate.NASFileByBoxService;
|
|
|
-
|
|
|
- NSString *filePathBase64 = [iTools base64UrlEncoder:filePath];
|
|
|
-
|
|
|
- NSString *fileUrl = [[NSString alloc] initWithFormat:@"%@getFiles/%@",urlStr,filePathBase64];
|
|
|
-
|
|
|
- [[netWorkManager shareInstance] cloudPhoneDownloadAudioByCode:fileUrl withSavePath:model.localPath success:^(id _Nonnull responseObject) {
|
|
|
- HLog(@"responseObject:%@",responseObject);
|
|
|
- } failure:^(NSError * _Nonnull error) {
|
|
|
-
|
|
|
- }];
|
|
|
-}
|
|
|
@end
|