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
a37bc071
Commit
a37bc071
authored
Mar 09, 2018
by
Mike JS. Choi
Committed by
Carola
Mar 09, 2018
Browse files
Remove hacks and use mediaplayer.position to change the position
(cherry picked from commit
ca30a29f
)
parent
907261df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaybackController.m
View file @
a37bc071
...
...
@@ -508,10 +508,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
-
(
void
)
setPlaybackPosition
:(
float
)
position
{
#warning Should use `position` to change position. This is a hack!
float
oldPosition
=
_mediaPlayer
.
position
;
float
diff
=
position
-
oldPosition
;
[
_mediaPlayer
jumpForward
:(
diff
*
self
.
mediaDuration
)
/
1000
.];
_mediaPlayer
.
position
=
position
;
}
-
(
void
)
setSubtitleDelay
:(
float
)
subtitleDeleay
...
...
@@ -1127,7 +1124,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
continuePlayback
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
kVLCSettingContinuePlayback
]
integerValue
];
if
(
continuePlayback
==
1
)
{
[
self
jumpForward
:(
dura
tion
*
lastPosition
)
/
1000
.
];
[
self
setPlaybackPosi
tion
:
lastPosition
];
}
else
if
(
continuePlayback
==
0
)
{
VLCAlertView
*
alert
=
[[
VLCAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"CONTINUE_PLAYBACK"
,
nil
)
message:
[
NSString
stringWithFormat
:
NSLocalizedString
(
@"CONTINUE_PLAYBACK_LONG"
,
nil
),
item
.
title
]
...
...
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