Open JWLAZY opened 9 years ago
Hi, could you share more details about your problem? Logs, errors, crash messages, the file URL you're trying to play, etc.
thank you very much!
^_^
[[AFSoundManager sharedManager] startPlayingLocalFileWithName:@"1.mp3" andBlock:^(int percentage, CGFloat elapsedTime, CGFloat timeRemaining, NSError *error, BOOL finished) { _lab1.text = [NSString stringWithFormat:@"%d",percentage]; _lab2.text = [NSString stringWithFormat:@"%f",elapsedTime]; _lab3.text = [NSString stringWithFormat:@"%f",timeRemaining]; }];
this is ok,
but if i use cocoapad to install afsoundmanager ,and use the new method ,it didn't working
[[AFSoundManager sharedManager] startPlayingLocalFileWithName:@"1.mp3" atPath:nil withCompletionBlock:(progressBlock)block :^(int percentage, CGFloat elapsedTime, CGFloat timeRemaining, NSError *error, BOOL finished) { _lab1.text = [NSString stringWithFormat:@"%d",percentage]; _lab2.text = [NSString stringWithFormat:@"%f",elapsedTime]; _lab3.text = [NSString stringWithFormat:@"%f",timeRemaining]; }];
The first code no longer works since that method was changed in previous updates. The second code should work fine. Why it doesn't work? It crashes the app? The sound doesn't play? If it crashes, please post the crash message log.
i try your demo ,it is ok,but i used cocoapads ,it don't work and The program crash.