Commit ee60ec4d authored by Carola Nitz's avatar Carola Nitz

VLCPlaybackInfoControllers+ VLCPlaybackController: remove knowledge of Mediaplayer

parent ffc13911
......@@ -33,7 +33,7 @@
+ (BOOL)shouldBeVisibleForPlaybackController:(VLCPlaybackController *)vpc
{
return vpc.mediaPlayer.isSeekable;
return [vpc isSeekable];
}
......@@ -94,7 +94,7 @@
}];
UISegmentedControl *rateControl = self.rateControl;
rateControl.selectedSegmentIndex = currentIndex;
rateControl.enabled = vpc.mediaPlayer.isSeekable;
rateControl.enabled = [vpc isSeekable];
}
- (IBAction)rateControlChanged:(UISegmentedControl *)sender
......
......@@ -117,7 +117,7 @@
{
[self stopActivity];
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
[vpc.mediaPlayer openVideoSubTitlesFromFile:pathToFile];
[vpc openVideoSubTitlesFromFile:pathToFile];
[self dismissViewControllerAnimated:YES completion:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:VLCPlaybackControllerPlaybackMetadataDidChange object:nil];
}
......
......@@ -77,6 +77,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
@property (readonly) NSInteger numberOfChaptersForCurrentTitle;
@property (nonatomic, readonly) BOOL currentMediaHasTrackToChooseFrom;
@property (nonatomic, readwrite) BOOL fullscreenSessionRequested;
@property (nonatomic, readonly) BOOL isSeekable;
@property (readonly) NSNumber *playbackTime;
@property (nonatomic, readonly) NSDictionary *mediaOptionsDictionary;
@property (nonatomic, readonly) NSTimer* sleepTimer;
......@@ -109,5 +110,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
- (void)scheduleSleepTimerWithInterval:(NSTimeInterval)timeInterval;
- (void)playMediaList:(VLCMediaList *)mediaList firstIndex:(NSInteger)index subtitlesFilePath:(NSString *)subsFilePath;
- (void)openVideoSubTitlesFromFile:(NSString *)pathToFile;
@end
......@@ -137,6 +137,11 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
}
#pragma mark - playback management
- (void)openVideoSubTitlesFromFile:(NSString *)pathToFile
{
[_mediaPlayer openVideoSubTitlesFromFile:pathToFile];
}
- (void)playMediaList:(VLCMediaList *)mediaList firstIndex:(NSInteger)index subtitlesFilePath:(NSString *)subsFilePath
{
self.mediaList = mediaList;
......@@ -449,6 +454,11 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
return [[_mediaPlayer audioTrackIndexes] count] > 2 || [[_mediaPlayer videoSubTitlesIndexes] count] > 1;
}
- (BOOL) isSeekable
{
return _mediaPlayer.isSeekable;
}
- (NSNumber *)playbackTime
{
return _mediaPlayer.time.value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment