|
@@ -218,6 +218,8 @@
|
|
name:UIApplicationDidBecomeActiveNotification object:nil];
|
|
name:UIApplicationDidBecomeActiveNotification object:nil];
|
|
[center addObserver:self selector:@selector(applicationDidEnterBackground:)
|
|
[center addObserver:self selector:@selector(applicationDidEnterBackground:)
|
|
name:UIApplicationDidEnterBackgroundNotification object:nil];
|
|
name:UIApplicationDidEnterBackgroundNotification object:nil];
|
|
|
|
+ [center addObserver:self selector:@selector(audioSessionRouteChange:)
|
|
|
|
+ name:AVAudioSessionRouteChangeNotification object:nil];
|
|
|
|
|
|
_playingExternallyTitle.text = NSLocalizedString(@"PLAYING_EXTERNALLY_TITLE", @"");
|
|
_playingExternallyTitle.text = NSLocalizedString(@"PLAYING_EXTERNALLY_TITLE", @"");
|
|
_playingExternallyDescription.text = NSLocalizedString(@"PLAYING_EXTERNALLY_DESC", @"");
|
|
_playingExternallyDescription.text = NSLocalizedString(@"PLAYING_EXTERNALLY_DESC", @"");
|
|
@@ -1377,6 +1379,15 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (void)audioSessionRouteChange:(NSNotification *)notification
|
|
|
|
+{
|
|
|
|
+ NSArray *outputs = [[AVAudioSession sharedInstance] currentRoute].outputs;
|
|
|
|
+ NSString *portName = [[outputs objectAtIndex:0] portName];
|
|
|
|
+
|
|
|
|
+ if (![portName isEqualToString:@"Headphones"])
|
|
|
|
+ [_listPlayer pause];
|
|
|
|
+}
|
|
|
|
+
|
|
- (void)mediaDidFinishParsing:(VLCMedia *)aMedia
|
|
- (void)mediaDidFinishParsing:(VLCMedia *)aMedia
|
|
{
|
|
{
|
|
[self _updateDisplayedMetadata];
|
|
[self _updateDisplayedMetadata];
|