|
@@ -131,7 +131,10 @@ static BOOL loop_flag = NO;
|
|
|
|
|
|
- (void)playSendVoice:(MessageModel *)model {
|
|
|
[self stopNuisdkPlay];
|
|
|
- self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:model.voicePath] error:nil];
|
|
|
+ NSError *error;
|
|
|
+ NSString *urlStr = [model.voicePath componentsSeparatedByString:@"Documents"].lastObject;
|
|
|
+ NSString *voicePath = [YMPath_DOCUMENT stringByAppendingFormat:@"%@", urlStr];
|
|
|
+ self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:voicePath] error:&error];
|
|
|
self.audioPlayer.delegate = self;
|
|
|
[self.audioPlayer play];
|
|
|
}
|