Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
9d0c8e90
Commit
9d0c8e90
authored
Oct 26, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playback: uncustomize forward/backward swipe durations
parent
1b7dffb1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
AspenProject/VLCMovieViewController.m
AspenProject/VLCMovieViewController.m
+7
-16
No files found.
AspenProject/VLCMovieViewController.m
View file @
9d0c8e90
...
...
@@ -19,6 +19,8 @@
#import "VLCStatusLabel.h"
#define INPUT_RATE_DEFAULT 1000.
#define FORWARD_SWIPE_DURATION 30
#define BACKWARD_SWIPE_DURATION 10
@interface
VLCMovieViewController
()
<
UIGestureRecognizerDelegate
,
AVAudioSessionDelegate
>
{
...
...
@@ -45,8 +47,6 @@
BOOL
_isScrubbing
;
BOOL
_swipeGesturesEnabled
;
int
_forwardDuration
;
int
_backwardDuration
;
NSString
*
panType
;
UIView
*
_rootView
;
UIView
*
_splashView
;
...
...
@@ -196,9 +196,6 @@
_swipeGesturesEnabled
=
YES
;
if
(
_swipeGesturesEnabled
)
{
_forwardDuration
=
30
;
_backwardDuration
=
10
;
_tapRecognizer
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapRecognized
)];
[
_tapRecognizer
setNumberOfTouchesRequired
:
2
];
_panRecognizer
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
panRecognized
:
)];
...
...
@@ -992,23 +989,17 @@
double
timeRemainingDouble
=
(
-
_mediaPlayer
.
remainingTime
.
intValue
*
0
.
001
);
int
timeRemaining
=
timeRemainingDouble
;
if
(
_forwardDuration
<
timeRemaining
)
{
[
_mediaPlayer
jumpForward
:
_forwardDuration
];
hudString
=
[
NSString
stringWithFormat
:
@" >> %is "
,
_forwardDuration
];
if
(
_forwardDuration
==
60
)
hudString
=
@" >>1min "
;
if
(
FORWARD_SWIPE_DURATION
<
timeRemaining
)
{
[
_mediaPlayer
jumpForward
:
FORWARD_SWIPE_DURATION
];
hudString
=
[
NSString
stringWithFormat
:
@" >> %is "
,
FORWARD_SWIPE_DURATION
];
}
else
{
[
_mediaPlayer
jumpForward
:(
timeRemaining
-
5
)];
hudString
=
[
NSString
stringWithFormat
:
@" >> %is "
,(
timeRemaining
-
5
)];
}
}
else
if
(
swipeRecognizer
.
direction
==
UISwipeGestureRecognizerDirectionLeft
)
{
[
_mediaPlayer
jumpBackward
:
_backwardDuration
];
hudString
=
[
NSString
stringWithFormat
:
@" << %is "
,
_backwardDuration
];
if
(
_backwardDuration
==
60
)
hudString
=
@" <<1min "
;
[
_mediaPlayer
jumpBackward
:
BACKWARD_SWIPE_DURATION
];
hudString
=
[
NSString
stringWithFormat
:
@" << %is "
,
BACKWARD_SWIPE_DURATION
];
}
if
(
swipeRecognizer
.
state
==
UIGestureRecognizerStateEnded
)
{
...
...
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