You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can see all of the messages printing out in the console but music is not resume for some reason. Is there something that I can do here to fix it? Thanks a lot
The text was updated successfully, but these errors were encountered:
Currently, I'm using the following code but it doesn't seem to work at all.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioInterruptionNotification:) name:AVAudioSessionInterruptionNotification object:nil];
DLog(@"Interrupt %@", aNotification);
NSDictionary *dict = [aNotification userInfo];
NSUInteger typeKey = [[dict objectForKey:@"AVAudioSessionInterruptionTypeKey"] unsignedIntegerValue];
DLog(@"%d", typeKey == AVAudioSessionInterruptionTypeBegan);
if (typeKey == AVAudioSessionInterruptionTypeBegan) {
[_player pause];
} else {
[_player resume];
}
}
I can see all of the messages printing out in the console but music is not resume for some reason. Is there something that I can do here to fix it? Thanks a lot
The text was updated successfully, but these errors were encountered: