Commit 09afb4f3 authored by Tobias's avatar Tobias
Browse files

disable playback rate control for non-seekable playback

parent 1b61f0af
......@@ -66,12 +66,15 @@
- (void)updateSegmentedControl
{
float currentRate = [VLCPlaybackController sharedInstance].playbackRate;
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
float currentRate = vpc.playbackRate;
NSInteger currentIndex = [self.possibleRates indexOfObjectPassingTest:^BOOL(NSNumber * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
return ABS(obj.floatValue-currentRate)<0.2;
}];
self.segmentedControl.selectedSegmentIndex = currentIndex;
self.segmentedControl.enabled = vpc.mediaPlayer.isSeekable;
}
- (IBAction)segmentedControlChanged:(UISegmentedControl *)sender
......
Supports Markdown
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