Restart playing sound when interrupted by phone calls

This commit is contained in:
Sebastián Katzer 2014-11-05 11:08:34 +00:00
parent 1edc29c6fb
commit b2ec730c88

View File

@ -143,18 +143,10 @@
};
/**
* Handle audio session interruption.
* Restart playing sound when interrupted by phone calls.
*/
- (void) handleAudioSessionInterruption:(NSNotification*)notification {
NSNumber* receivedType = [notification.userInfo
valueForKey:AVAudioSessionInterruptionTypeKey];
NSNumber* expectedType = [NSNumber numberWithInt:AVAudioSessionInterruptionTypeEnded];
if ([receivedType isEqualToNumber:expectedType]) {
[self configureAudioSession];
[self keepAwake];
}
[self keepAwake];
}
@end