|
|
@ -3,6 +3,7 @@
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#import "OWSAudioAttachmentPlayer.h"
|
|
|
|
#import "OWSAudioAttachmentPlayer.h"
|
|
|
|
|
|
|
|
#import "Signal-Swift.h"
|
|
|
|
#import "TSAttachment.h"
|
|
|
|
#import "TSAttachment.h"
|
|
|
|
#import "TSAttachmentStream.h"
|
|
|
|
#import "TSAttachmentStream.h"
|
|
|
|
#import "TSVideoAttachmentAdapter.h"
|
|
|
|
#import "TSVideoAttachmentAdapter.h"
|
|
|
@ -111,6 +112,14 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
if (error) {
|
|
|
|
if (error) {
|
|
|
|
DDLogError(@"%@ error: %@", self.tag, error);
|
|
|
|
DDLogError(@"%@ error: %@", self.tag, error);
|
|
|
|
[self stop];
|
|
|
|
[self stop];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ([error.domain isEqualToString:NSOSStatusErrorDomain]
|
|
|
|
|
|
|
|
&& (error.code == kAudioFileInvalidFileError || error.code == kAudioFileStreamError_InvalidFile)) {
|
|
|
|
|
|
|
|
[OWSAlerts showAlertWithTitle:NSLocalizedString(@"ALERT_ERROR_TITLE", @"")
|
|
|
|
|
|
|
|
message:NSLocalizedString(@"INVALID_AUDIO_FILE_ALERT_ERROR_MESSAGE",
|
|
|
|
|
|
|
|
@"Message for the alert indicating that an audio file is invalid.")];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
self.audioPlayer.delegate = self;
|
|
|
|
self.audioPlayer.delegate = self;
|
|
|
|