Commit 34bd28f5 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Movie View: always set a start time for sakes of simplicity

parent 947455e1
......@@ -316,13 +316,13 @@
- (void)_playNewMedia
{
NSNumber *playbackPositionInTime = @(0);
if (self.mediaItem.lastPosition && [self.mediaItem.lastPosition floatValue] < .95) {
if (self.mediaItem.duration.intValue != 0) {
NSNumber *playbackPositionInTime = @(self.mediaItem.lastPosition.floatValue * (self.mediaItem.duration.intValue / 1000.));
[_mediaPlayer.media addOptions:@{@"start-time": playbackPositionInTime}];
APLog(@"set starttime to %i", playbackPositionInTime.intValue);
}
if (self.mediaItem.duration.intValue != 0)
playbackPositionInTime = @(self.mediaItem.lastPosition.floatValue * (self.mediaItem.duration.intValue / 1000.));
}
[_mediaPlayer.media addOptions:@{@"start-time": playbackPositionInTime}];
APLog(@"set starttime to %i", playbackPositionInTime.intValue);
[_mediaPlayer play];
......
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