Custom audio call sounds

This commit is contained in:
giomfo
2016-09-01 09:19:54 +02:00
parent dd9e0c0811
commit d79a7f53f2
7 changed files with 49 additions and 0 deletions
@@ -216,6 +216,27 @@
self.gradientMaskContainerView.hidden = self.overlayContainerView.isHidden;
}
#pragma mark - Sounds
- (NSURL*)audioURLWithName:(NSString*)soundName
{
NSURL *audioUrl;
NSString *path = [[NSBundle mainBundle] pathForResource:soundName ofType:@"mp3"];
if (path)
{
audioUrl = [NSURL fileURLWithPath:path];
}
// Use by default the matrix kit sounds.
if (!audioUrl)
{
audioUrl = [super audioURLWithName:soundName];
}
return audioUrl;
}
#pragma mark - Actions
- (IBAction)onButtonPressed:(id)sender