خرید بک لینک

Vote count: 0

I am trying to play dropbox uploaded sound file with AVAudioPlayer with below code.

-(void)initPlayerWithStreamingAudio:(NSString *)strAudioURL{
     _audioPlayer = nil;
     _audioPlayer=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:strAudioURL] error:NULL];

     [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
     [[AVAudioSession sharedInstance] setActive: YES error: nil];

     [self setAudioPLayerVolume];
     _audioPlayer.numberOfLoops = 0;
     [_audioPlayer play];
}

but _audipPlayer is nil.

so how can i play dropbox sound file url with AVAudioPlayer?

Any help will we appreciated.

Thanks in Advance

asked 33 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 23 فروردين 1395 ساعت: 15:06

صفحه بندی