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
ca30a29f
Commit
ca30a29f
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
parent
ad5e42ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Sources/VLCPlaybackController.m
View file @
ca30a29f
...
...
@@ -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
...
...
@@ -1130,7 +1127,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
]
...
...
Mike JS. Choi
@mkchoi212
mentioned in commit
a37bc071
·
Mar 09, 2018
mentioned in commit
a37bc071
mentioned in commit a37bc071cf95b631396be12ebe720bd63832b89d
Toggle commit list
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