Commit 87191105 authored by Carola Nitz's avatar Carola Nitz

VLCWatchCommunication: remove knowledge of mediaPlayer and add method for playbacktime instead

parent 24762a2f
......@@ -70,6 +70,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
@property (nonatomic, readonly) BOOL currentMediaHasChapters;
@property (nonatomic, readonly) BOOL currentMediaHasTrackToChooseFrom;
@property (nonatomic, readwrite) BOOL fullscreenSessionRequested;
@property (readonly) NSNumber *playbackTime;
@property (nonatomic, readonly) NSDictionary *mediaOptionsDictionary;
@property (nonatomic, readonly) NSTimer* sleepTimer;
......@@ -77,7 +78,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
- (void)startPlayback;
- (void)stopPlayback;
- (void)playPause;
- (void)forward;
- (void)backward;
......
......@@ -443,6 +443,11 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
return [[_mediaPlayer audioTrackIndexes] count] > 2 || [[_mediaPlayer videoSubTitlesIndexes] count] > 1;
}
- (NSNumber *)playbackTime
{
return _mediaPlayer.time.value;
}
- (float)playbackRate
{
return _mediaPlayer.rate;
......@@ -468,6 +473,7 @@ VLCMediaDelegate, VLCRemoteControlServiceDelegate>
{
_mediaPlayer.currentVideoSubTitleDelay = 1000000.*subtitleDeleay;
}
- (float)subtitleDelay
{
return _mediaPlayer.currentVideoSubTitleDelay/1000000.;
......
......@@ -155,7 +155,7 @@ static VLCWatchCommunication *_singeltonInstance = nil;
- (NSDictionary *)nowPlayingResponseDict {
NSMutableDictionary *response = [NSMutableDictionary new];
NSMutableDictionary *nowPlayingInfo = [[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo mutableCopy];
NSNumber *playbackTime = [VLCPlaybackController sharedInstance].mediaPlayer.time.value;
NSNumber *playbackTime = [[VLCPlaybackController sharedInstance] playbackTime];
if (playbackTime) {
nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = @(playbackTime.floatValue/1000);
}
......
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