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
09e05855
Commit
09e05855
authored
Nov 14, 2015
by
Tobias
Browse files
workaround issue with [VLCMediaPlayer setTime:]
parent
6e7615b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Apple-TV/Playback/VLCFullscreenMovieTVViewController.m
View file @
09e05855
...
...
@@ -366,7 +366,7 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
VLCMediaPlayer
*
player
=
vpc
.
mediaPlayer
;
if
(
player
.
isPlaying
)
{
[
player
jumpForward
:
VLCJumpInterval
];
[
self
jumpInterval
:
VLCJumpInterval
];
}
else
{
[
self
scrubbingJumpInterval
:
VLCJumpInterval
];
}
...
...
@@ -377,12 +377,27 @@ static const NSInteger VLCJumpInterval = 10000; // 10 seconds
VLCMediaPlayer
*
player
=
vpc
.
mediaPlayer
;
if
(
player
.
isPlaying
)
{
[
player
jumpBackward
:
VLCJumpInterval
];
[
self
jumpInterval
:
-
VLCJumpInterval
];
}
else
{
[
self
scrubbingJumpInterval
:
-
VLCJumpInterval
];
}
}
-
(
void
)
jumpInterval
:(
NSInteger
)
interval
{
NSInteger
duration
=
[
VLCPlaybackController
sharedInstance
].
mediaDuration
;
if
(
duration
==
0
)
{
return
;
}
VLCPlaybackController
*
vpc
=
[
VLCPlaybackController
sharedInstance
];
VLCMediaPlayer
*
player
=
vpc
.
mediaPlayer
;
CGFloat
intervalFraction
=
((
CGFloat
)
interval
)
/
((
CGFloat
)
duration
);
CGFloat
currentFraction
=
player
.
position
;
currentFraction
+=
intervalFraction
;
player
.
position
=
currentFraction
;
}
-
(
void
)
scrubbingJumpInterval
:(
NSInteger
)
interval
{
NSInteger
duration
=
[
VLCPlaybackController
sharedInstance
].
mediaDuration
;
...
...
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