Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
bb5b5ab5
Commit
bb5b5ab5
authored
Mar 03, 2018
by
Mike JS. Choi
Committed by
Carola
Mar 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Playback] Update initial control center playback position
(cherry picked from commit
68d279d7
)
parent
93169d9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Sources/VLCPlaybackController.m
Sources/VLCPlaybackController.m
+5
-3
No files found.
Sources/VLCPlaybackController.m
View file @
bb5b5ab5
...
@@ -1110,8 +1110,10 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
...
@@ -1110,8 +1110,10 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
CGFloat
lastPosition
=
.
0
;
CGFloat
lastPosition
=
.
0
;
NSInteger
duration
=
0
;
NSInteger
duration
=
0
;
if
(
item
.
lastPosition
)
if
(
item
.
lastPosition
)
{
lastPosition
=
item
.
lastPosition
.
floatValue
;
lastPosition
=
item
.
lastPosition
.
floatValue
;
}
duration
=
item
.
duration
.
intValue
;
duration
=
item
.
duration
.
intValue
;
if
(
lastPosition
<
.
95
&&
_mediaPlayer
.
position
<
lastPosition
)
{
if
(
lastPosition
<
.
95
&&
_mediaPlayer
.
position
<
lastPosition
)
{
...
@@ -1122,7 +1124,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
...
@@ -1122,7 +1124,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
continuePlayback
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
kVLCSettingContinuePlayback
]
integerValue
];
continuePlayback
=
[[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
kVLCSettingContinuePlayback
]
integerValue
];
if
(
continuePlayback
==
1
)
{
if
(
continuePlayback
==
1
)
{
_mediaPlayer
.
posi
tion
=
lastPosition
;
[
self
jumpForward
:(
dura
tion
*
lastPosition
)
/
1000
.]
;
}
else
if
(
continuePlayback
==
0
)
{
}
else
if
(
continuePlayback
==
0
)
{
VLCAlertView
*
alert
=
[[
VLCAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"CONTINUE_PLAYBACK"
,
nil
)
VLCAlertView
*
alert
=
[[
VLCAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"CONTINUE_PLAYBACK"
,
nil
)
message:
[
NSString
stringWithFormat
:
NSLocalizedString
(
@"CONTINUE_PLAYBACK_LONG"
,
nil
),
item
.
title
]
message:
[
NSString
stringWithFormat
:
NSLocalizedString
(
@"CONTINUE_PLAYBACK_LONG"
,
nil
),
item
.
title
]
...
@@ -1131,7 +1133,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
...
@@ -1131,7 +1133,7 @@ typedef NS_ENUM(NSUInteger, VLCAspectRatio) {
otherButtonTitles:
NSLocalizedString
(
@"BUTTON_CONTINUE"
,
nil
),
nil
];
otherButtonTitles:
NSLocalizedString
(
@"BUTTON_CONTINUE"
,
nil
),
nil
];
alert
.
completion
=
^
(
BOOL
cancelled
,
NSInteger
buttonIndex
)
{
alert
.
completion
=
^
(
BOOL
cancelled
,
NSInteger
buttonIndex
)
{
if
(
!
cancelled
)
{
if
(
!
cancelled
)
{
_mediaPlayer
.
p
osition
=
lastPosition
;
[
self
setPlaybackP
osition
:
lastPosition
]
;
}
}
};
};
[
alert
show
];
[
alert
show
];
...
...
Write
Preview
Markdown
is supported
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