You might set your app to check Reachability
status and then send a "pause" NSNotification
when the network status changes and the network is unreachable (and, likewise, a "play" NSNotification
when the network status changes, and the network is now again reachable):
[[Reachability sharedReachability] setNetworkStatusNotificationsEnabled:YES];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reachabilityChanged:) name:@"kNetworkReachabilityChangedNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pauseStreaming:) name:@"kPauseAudioStreamingIfPlaying" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pauseStreaming:) name:@"kPlayAudioStreamingIfPaused" object:nil];
- (void) reachabilityChanged:(id)sender {
NetworkStatus reachabilityStatus = [[Reachability sharedReachability] internetConnectionStatus];
if (reachabilityStatus == NotReachable)
[[NSNotificationCenter defaultCenter] postNotificationName:@"kPauseAudioStreamingIfPlaying" object:nil];
else
[[NSNotificationCenter defaultCenter] postNotificationName:@"kPlayAudioStreamingIfPaused" object:nil];
}