AFSoundManager
AFSoundManager copied to clipboard
can't get duration
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
I have the same problem. None of my files get the duration, and some files don't even get Metadata. Any update on this?
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);
}];