|
@@ -85,6 +85,23 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
|
|
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
|
}
|
|
|
|
|
|
+- (instancetype)init
|
|
|
+{
|
|
|
+ self = [super init];
|
|
|
+ if (self) {
|
|
|
+ NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
|
|
|
+ [defaultCenter addObserver:self selector:@selector(audioSessionRouteChange:)
|
|
|
+ name:AVAudioSessionRouteChangeNotification object:nil];
|
|
|
+ [defaultCenter addObserver:self selector:@selector(applicationWillResignActive:)
|
|
|
+ name:UIApplicationWillResignActiveNotification object:nil];
|
|
|
+ [defaultCenter addObserver:self selector:@selector(applicationDidBecomeActive:)
|
|
|
+ name:UIApplicationDidBecomeActiveNotification object:nil];
|
|
|
+ [defaultCenter addObserver:self selector:@selector(applicationDidEnterBackground:)
|
|
|
+ name:UIApplicationDidEnterBackgroundNotification object:nil];
|
|
|
+ }
|
|
|
+ return self;
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark - playback management
|
|
|
|
|
|
- (BOOL)_blobCheck
|
|
@@ -197,16 +214,6 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
|
|
|
|
|
|
[[AVAudioSession sharedInstance] setDelegate:self];
|
|
|
|
|
|
- NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
|
|
|
- [defaultCenter addObserver:self selector:@selector(audioSessionRouteChange:)
|
|
|
- name:AVAudioSessionRouteChangeNotification object:nil];
|
|
|
- [defaultCenter addObserver:self selector:@selector(applicationWillResignActive:)
|
|
|
- name:UIApplicationWillResignActiveNotification object:nil];
|
|
|
- [defaultCenter addObserver:self selector:@selector(applicationDidBecomeActive:)
|
|
|
- name:UIApplicationDidBecomeActiveNotification object:nil];
|
|
|
- [defaultCenter addObserver:self selector:@selector(applicationDidEnterBackground:)
|
|
|
- name:UIApplicationDidEnterBackgroundNotification object:nil];
|
|
|
-
|
|
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
|
|
|
|
|
_aspectRatios = @[@"DEFAULT", @"FILL_TO_SCREEN", @"4:3", @"16:9", @"16:10", @"2.21:1"];
|