Commit 82cfc8b9 authored by Felix Paul Kühne's avatar Felix Paul Kühne

ATV: make sure the user can reveal the track selector and info panel during...

ATV: make sure the user can reveal the track selector and info panel during playback without pausing first

This is a regression from 41504492 and made quite a few users believe that we killed the track switcher..
parent fdb40227
......@@ -214,10 +214,6 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
}
}
if (!self.canScrub) {
return;
}
switch (panGestureRecognizer.state) {
case UIGestureRecognizerStateCancelled:
case UIGestureRecognizerStateFailed:
......@@ -230,10 +226,11 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
UIView *view = self.view;
CGPoint translation = [panGestureRecognizer translationInView:view];
BOOL canScrub = self.canScrub;
if (!bar.scrubbing) {
if (ABS(translation.x) > 150.0) {
if (self.isSeekable) {
if (self.isSeekable && canScrub) {
[self startScrubbing];
} else {
return;
......@@ -248,16 +245,17 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
}
}
if (!canScrub) {
return;
}
[self showPlaybackControlsIfNeededForUserInteraction];
[self setScanState:VLCPlayerScanStateNone];
const CGFloat scaleFactor = 8.0;
CGFloat fractionInView = translation.x/CGRectGetWidth(view.bounds)/scaleFactor;
CGFloat fractionInView = translation.x / CGRectGetWidth(view.bounds) / scaleFactor;
CGFloat scrubbingFraction = MAX(0.0, MIN(bar.scrubbingFraction + fractionInView,1.0));
if (ABS(scrubbingFraction - bar.playbackFraction)<0.005) {
scrubbingFraction = bar.playbackFraction;
} else {
......
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