AFSoundManager icon indicating copy to clipboard operation
AFSoundManager copied to clipboard

can't get duration

Open taiwandao opened this issue 8 years ago • 2 comments

 NSURL *url = [NSURL URLWithString:@"http://222.186.15.28:8083/demo_store/2015/12/28/94ef7255caf8704acfa36fdf3d444052.mp3"];

NSURL *ceceurl = [NSURL URLWithString:@"http://www.cecesat.com/FileCenter/data/APS/TF/TPO-20-C1.mp3"];
AFSoundItem *item6 = [[AFSoundItem alloc] initWithStreamingURL:url ];
AFSoundItem *item7 = [[AFSoundItem alloc] initWithStreamingURL:ceceurl];

item6 is ok,but item7 cant get duration,Is mp3 file damaged? But the android is good

url1: 2016-01-14 10:39:45.454 AFSoundManager-Demo[22069:77459] Item duration: 73 - time elapsed: 20 2016-01-14 10:39:46.454 AFSoundManager-Demo[22069:77459] Item duration: 73 - time elapsed: 0

ceceurl: 2016-01-14 10:39:47.453 AFSoundManager-Demo[22069:77459] Item duration: 0 - time elapsed: 0 2016-01-14 10:39:47.453 AFSoundManager-Demo[22069:77459] Finished item, next one is (null) 2016-01-14 10:39:47.459 AFSoundManager-Demo[22069:77459] Item duration: 0 - time elapsed: 0 2016-01-14 10:39:47.459 AFSoundManager-Demo[22069:77459] Finished item, next one is (null) 2016-01-14 10:39:47.460 AFSoundManager-Demo[22069:77459] Item duration: 0 - time elapsed: 0

taiwandao avatar Jan 14 '16 02:01 taiwandao

I have the same problem. None of my files get the duration, and some files don't even get Metadata. Any update on this?

serjooo avatar May 18 '17 14:05 serjooo

Sometimes, the duration is wrong. It's longer

[_queue listenFeedbackUpdatesWithBlock:^(AFSoundItem *item) {

    //NSLog(@"AFSoundItem:%@",item.mj_keyValues);
} andFinishedBlock:^(AFSoundItem *nextItem) {
    //NSLog(@"Finished item, next one is %@", nextItem.title);
}];

ZRD1112 avatar Jun 28 '20 09:06 ZRD1112