Skip to content

An online iOS audio player based on AVAudioStreamer with a custom UI.

Notifications You must be signed in to change notification settings

plzCall911/AudioPlayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioPlayer

An online iOS audio player based on AVAudioStreamer with a custom UI.

How to use

  1. link CFNetwork.framework, AudioToolbox.framework, QuartCore.framework
  2. import AudioPlayer floder
  3. create an instance of AudioPlayer with AudioButton and url, like below:
  - (void)playAudio:(AudioButton *)button
{    
    NSInteger index = button.tag;
    NSDictionary *item = [itemArray objectAtIndex:index];
    
    if (_audioPlayer == nil) {
        _audioPlayer = [[AudioPlayer alloc] init];
    }
        
    if ([_audioPlayer.button isEqual:button]) {
        [_audioPlayer play];
    } else {
        [_audioPlayer stop];
        
        _audioPlayer.button = button; 
        _audioPlayer.url = [NSURL URLWithString:[item objectForKey:@"url"]];

        [_audioPlayer play];
    }   
}

screenshots

About

An online iOS audio player based on AVAudioStreamer with a custom UI.

Resources

Stars

Watchers

Forks

Packages

No packages published