|
@@ -793,32 +793,54 @@
|
|
|
|
|
|
//缓冲进度代理
|
|
//缓冲进度代理
|
|
- (void)df_player:(DFPlayer *)player bufferProgress:(CGFloat)bufferProgress{
|
|
- (void)df_player:(DFPlayer *)player bufferProgress:(CGFloat)bufferProgress{
|
|
- HLog(@"缓冲进度代理:%f",bufferProgress);
|
|
|
|
|
|
+ NSInteger index = player.currentAudioModel.audioId;
|
|
|
|
+ if(index >0 && index<_dataArray.count){
|
|
|
|
+ lastFileModel *lastFileMod = _allAudioDataArray[index];
|
|
|
|
+ HLog(@"缓冲进度代理:%f --- %@",bufferProgress,lastFileMod.name);
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ HLog(@"缓冲进度代理:%f",bufferProgress);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
//播放进度代理
|
|
//播放进度代理
|
|
- (void)df_player:(DFPlayer *)player progress:(CGFloat)progress currentTime:(CGFloat)currentTime{
|
|
- (void)df_player:(DFPlayer *)player progress:(CGFloat)progress currentTime:(CGFloat)currentTime{
|
|
- HLog(@"音频播放进度:%f --- %f",progress,currentTime);
|
|
|
|
|
|
+
|
|
|
|
+ NSInteger index = player.currentAudioModel.audioId;
|
|
|
|
+ if(index >0 && index<_dataArray.count){
|
|
|
|
+ lastFileModel *lastFileMod = _allAudioDataArray[index];
|
|
|
|
+ //HLog(@"音频播放进度:%f --- %f --- %@ ---inddex:%ld ---- %ld",progress,currentTime,lastFileMod.name,_lastAudioIndex,index);
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ //HLog(@"音频播放进度:%f --- %f",progress,currentTime);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
playDelayed ++;
|
|
playDelayed ++;
|
|
if(!_playPauseBtn.selected && playDelayed >= 3){
|
|
if(!_playPauseBtn.selected && playDelayed >= 3){
|
|
_playPauseBtn.selected = YES;
|
|
_playPauseBtn.selected = YES;
|
|
}
|
|
}
|
|
|
|
|
|
- HLog(@"df_player progress hxd _ind:%ld ---- %ld",_lastAudioIndex,player.currentAudioModel.audioId);
|
|
|
|
- //if(_lastAudioIndex != player.currentAudioModel.audioId)
|
|
|
|
- if(progress == 0)
|
|
|
|
|
|
+ //HLog(@"df_player progress hxd _ind:%ld ---- %ld",_lastAudioIndex,player.currentAudioModel.audioId);
|
|
|
|
+ if(_lastAudioIndex != player.currentAudioModel.audioId)
|
|
{
|
|
{
|
|
- _lastAudioIndex = player.currentAudioModel.audioId;
|
|
|
|
- _index = _lastAudioIndex;
|
|
|
|
- HLog(@"df_player progress hxd _ind:setTitleFunByIndex");
|
|
|
|
- [self setTitleFunByIndex];
|
|
|
|
|
|
+// _lastAudioIndex = player.currentAudioModel.audioId;
|
|
|
|
+// _index = _lastAudioIndex;
|
|
|
|
+// HLog(@"df_player progress hxd _ind:setTitleFunByIndex");
|
|
|
|
+// [self setTitleFunByIndex];
|
|
[self audioPlayerByIndex:_lastAudioIndex];
|
|
[self audioPlayerByIndex:_lastAudioIndex];
|
|
|
|
|
|
[self startRotatingImage];
|
|
[self startRotatingImage];
|
|
[self startPlayingRotateRightImage];
|
|
[self startPlayingRotateRightImage];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ _lastAudioIndex = player.currentAudioModel.audioId;
|
|
|
|
+ _index = _lastAudioIndex;
|
|
|
|
+ HLog(@"df_player progress hxd _ind:setTitleFunByIndex");
|
|
|
|
+ [self setTitleFunByIndex];
|
|
|
|
+
|
|
if(progress >= 1.0){
|
|
if(progress >= 1.0){
|
|
_lastAudioIndex = -1;
|
|
_lastAudioIndex = -1;
|
|
[self stopRotatingImage];
|
|
[self stopRotatingImage];
|
|
@@ -860,6 +882,7 @@
|
|
|
|
|
|
-(void)setTitleFunByIndex
|
|
-(void)setTitleFunByIndex
|
|
{
|
|
{
|
|
|
|
+ HLog(@"setTitleFunByIndex")
|
|
if(!_allAudioDataArray){
|
|
if(!_allAudioDataArray){
|
|
KWeakSelf
|
|
KWeakSelf
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|