Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
09afb4f3
Commit
09afb4f3
authored
Nov 14, 2015
by
Tobias
Browse files
disable playback rate control for non-seekable playback
parent
1b61f0af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Apple-TV/Playback/Playback Info/VLCPlaybackInfoRateTVViewController.m
View file @
09afb4f3
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment