Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't play loaction mp3 file #28

Open
JWLAZY opened this issue Jan 16, 2015 · 3 comments
Open

can't play loaction mp3 file #28

JWLAZY opened this issue Jan 16, 2015 · 3 comments

Comments

@JWLAZY
Copy link

JWLAZY commented Jan 16, 2015

i try your demo ,it is ok,but i used cocoapads ,it don't work and The program crash.

@AlvaroFranco
Copy link
Owner

Hi, could you share more details about your problem? Logs, errors, crash messages, the file URL you're trying to play, etc.

@JWLAZY
Copy link
Author

JWLAZY commented Jan 17, 2015

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];
    }];

@AlvaroFranco
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants