|
@@ -37,6 +37,7 @@ NSString *const VLCPlaybackControllerPlaybackDidFail = @"VLCPlaybackControllerPl
|
|
BOOL _playerIsSetup;
|
|
BOOL _playerIsSetup;
|
|
BOOL _playbackFailed;
|
|
BOOL _playbackFailed;
|
|
BOOL _shouldResumePlaying;
|
|
BOOL _shouldResumePlaying;
|
|
|
|
+ NSTimer *_sleepTimer;
|
|
|
|
|
|
NSArray *_aspectRatios;
|
|
NSArray *_aspectRatios;
|
|
NSUInteger _currentAspectRatioMask;
|
|
NSUInteger _currentAspectRatioMask;
|
|
@@ -931,6 +932,15 @@ setstuff:
|
|
forPlaybackController:self];
|
|
forPlaybackController:self];
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (void)scheduleSleepTimerWithInterval:(NSTimeInterval)timeInterval
|
|
|
|
+{
|
|
|
|
+ if (_sleepTimer) {
|
|
|
|
+ [_sleepTimer invalidate];
|
|
|
|
+ _sleepTimer = nil;
|
|
|
|
+ }
|
|
|
|
+ _sleepTimer = [NSTimer scheduledTimerWithTimeInterval:timeInterval target:self selector:@selector(stopPlayback) userInfo:nil repeats:NO];
|
|
|
|
+}
|
|
|
|
+
|
|
#pragma mark - remote events
|
|
#pragma mark - remote events
|
|
|
|
|
|
static inline NSArray * RemoteCommandCenterCommandsToHandle(MPRemoteCommandCenter *cc)
|
|
static inline NSArray * RemoteCommandCenterCommandsToHandle(MPRemoteCommandCenter *cc)
|