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
9b1a4ef2
Commit
9b1a4ef2
authored
Jul 06, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fullscreen playback: add minimize button so clicking 'Done' actually stops playback again
(cherry picked from commit
cbe45bc1
)
parent
e1c6db8b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
7 deletions
+59
-7
Resources/VLCMovieViewController~ipad.xib
Resources/VLCMovieViewController~ipad.xib
+20
-2
Resources/VLCMovieViewController~iphone.xib
Resources/VLCMovieViewController~iphone.xib
+20
-2
Sources/VLCMovieViewController.h
Sources/VLCMovieViewController.h
+1
-0
Sources/VLCMovieViewController.m
Sources/VLCMovieViewController.m
+9
-3
Sources/VLCTimeNavigationTitleView.h
Sources/VLCTimeNavigationTitleView.h
+1
-0
Sources/VLCTimeNavigationTitleView.m
Sources/VLCTimeNavigationTitleView.m
+8
-0
No files found.
Resources/VLCMovieViewController~ipad.xib
View file @
9b1a4ef2
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"7706"
systemVersion=
"14E
26a
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"7706"
systemVersion=
"14E
46
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<development
version=
"5100"
identifier=
"xcode"
/>
...
...
@@ -69,7 +69,7 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<slider
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
value=
"0.5"
minValue=
"0.0"
maxValue=
"1"
id=
"249"
userLabel=
"Position Slider"
customClass=
"VLCOBSlider"
>
<rect
key=
"frame"
x=
"
7
"
y=
"6"
width=
"5
62
"
height=
"29"
/>
<rect
key=
"frame"
x=
"
60
"
y=
"6"
width=
"5
09
"
height=
"29"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<accessibility
key=
"accessibilityConfiguration"
>
<accessibilityTraits
key=
"traits"
none=
"YES"
updatesFrequently=
"YES"
/>
...
...
@@ -115,11 +115,28 @@
<action
selector=
"toggleTimeDisplay:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"301"
/>
</connections>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"Fcw-5o-IdE"
>
<rect
key=
"frame"
x=
"10"
y=
"11"
width=
"30"
height=
"18"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"boldSystem"
pointSize=
"15"
/>
<inset
key=
"contentEdgeInsets"
minX=
"5"
minY=
"0.0"
maxX=
"5"
maxY=
"0.0"
/>
<state
key=
"normal"
image=
"minimizePlayback"
>
<color
key=
"titleColor"
red=
"0.19607843459999999"
green=
"0.30980393290000002"
blue=
"0.52156865600000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"titleShadowColor"
white=
"0.5"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<state
key=
"highlighted"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"minimizePlayback:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"jj8-Gc-Fqn"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"aspectRatioButton"
destination=
"198"
id=
"4dl-xe-M16"
/>
<outlet
property=
"minimizePlaybackButton"
destination=
"Fcw-5o-IdE"
id=
"s26-45-f9b"
/>
<outlet
property=
"positionSlider"
destination=
"249"
id=
"rvZ-Lz-yG8"
/>
<outlet
property=
"timeDisplayButton"
destination=
"300"
id=
"t3c-hv-XjU"
/>
</connections>
...
...
@@ -573,6 +590,7 @@
<image
name=
"audioTrackIcon.png"
width=
"19"
height=
"19"
/>
<image
name=
"backIcon.png"
width=
"32"
height=
"16"
/>
<image
name=
"forwardIcon.png"
width=
"32"
height=
"16"
/>
<image
name=
"minimizePlayback"
width=
"18"
height=
"10"
/>
<image
name=
"playIcon.png"
width=
"19"
height=
"17"
/>
<image
name=
"ratioIcon.png"
width=
"15"
height=
"15"
/>
<image
name=
"resetIcon.png"
width=
"24"
height=
"30"
/>
...
...
Resources/VLCMovieViewController~iphone.xib
View file @
9b1a4ef2
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"7706"
systemVersion=
"14E
26a
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"7706"
systemVersion=
"14E
46
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"7703"
/>
...
...
@@ -71,7 +71,7 @@
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<slider
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
value=
"0.5"
minValue=
"0.0"
maxValue=
"1"
id=
"262"
userLabel=
"Position Slider"
customClass=
"VLCOBSlider"
>
<rect
key=
"frame"
x=
"
2
"
y=
"7"
width=
"1
90
"
height=
"29"
/>
<rect
key=
"frame"
x=
"
44
"
y=
"7"
width=
"1
48
"
height=
"29"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMaxY=
"YES"
/>
<accessibility
key=
"accessibilityConfiguration"
>
<accessibilityTraits
key=
"traits"
none=
"YES"
updatesFrequently=
"YES"
/>
...
...
@@ -117,12 +117,29 @@
<action
selector=
"toggleTimeDisplay:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"278"
/>
</connections>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
id=
"1XT-gb-oGz"
>
<rect
key=
"frame"
x=
"8"
y=
"11"
width=
"30"
height=
"18"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
<fontDescription
key=
"fontDescription"
type=
"boldSystem"
pointSize=
"15"
/>
<inset
key=
"contentEdgeInsets"
minX=
"5"
minY=
"0.0"
maxX=
"5"
maxY=
"0.0"
/>
<state
key=
"normal"
image=
"minimizePlayback"
>
<color
key=
"titleColor"
red=
"0.19607843459999999"
green=
"0.30980393290000002"
blue=
"0.52156865600000002"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
<color
key=
"titleShadowColor"
white=
"0.5"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<state
key=
"highlighted"
>
<color
key=
"titleColor"
white=
"1"
alpha=
"1"
colorSpace=
"calibratedWhite"
/>
</state>
<connections>
<action
selector=
"minimizePlayback:"
destination=
"-1"
eventType=
"touchUpInside"
id=
"LBk-8c-yjG"
/>
</connections>
</button>
</subviews>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"calibratedWhite"
/>
<nil
key=
"simulatedStatusBarMetrics"
/>
<freeformSimulatedSizeMetrics
key=
"simulatedDestinationMetrics"
/>
<connections>
<outlet
property=
"aspectRatioButton"
destination=
"202"
id=
"IWW-5X-Bf0"
/>
<outlet
property=
"minimizePlaybackButton"
destination=
"1XT-gb-oGz"
id=
"BAx-Rb-ayD"
/>
<outlet
property=
"positionSlider"
destination=
"262"
id=
"UPM-uz-5Ix"
/>
<outlet
property=
"timeDisplayButton"
destination=
"276"
id=
"xvv-Ga-gWA"
/>
</connections>
...
...
@@ -725,6 +742,7 @@
<image
name=
"audioTrackIcon.png"
width=
"19"
height=
"19"
/>
<image
name=
"backIcon.png"
width=
"32"
height=
"16"
/>
<image
name=
"forwardIcon.png"
width=
"32"
height=
"16"
/>
<image
name=
"minimizePlayback"
width=
"18"
height=
"10"
/>
<image
name=
"playIcon.png"
width=
"19"
height=
"17"
/>
<image
name=
"ratioIcon.png"
width=
"15"
height=
"15"
/>
<image
name=
"resetIcon.png"
width=
"24"
height=
"30"
/>
...
...
Sources/VLCMovieViewController.h
View file @
9b1a4ef2
...
...
@@ -87,6 +87,7 @@
@property
(
nonatomic
,
weak
)
IBOutlet
VLCPlaybackController
*
playbackController
;
-
(
IBAction
)
closePlayback
:(
id
)
sender
;
-
(
IBAction
)
minimizePlayback
:(
id
)
sender
;
-
(
IBAction
)
positionSliderAction
:(
id
)
sender
;
-
(
IBAction
)
positionSliderTouchDown
:(
id
)
sender
;
...
...
Sources/VLCMovieViewController.m
View file @
9b1a4ef2
...
...
@@ -535,7 +535,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
return
;
if
(
recognizer
.
velocity
<
0
.)
[
self
clos
ePlayback
:
nil
];
[
self
minimiz
ePlayback
:
nil
];
}
-
(
BOOL
)
gestureRecognizer
:(
UIGestureRecognizer
*
)
gestureRecognizer
shouldReceiveTouch
:(
UITouch
*
)
touch
...
...
@@ -684,9 +684,15 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
-
(
IBAction
)
closePlayback
:(
id
)
sender
{
LOCKCHECK
;
[[
UIApplication
sharedApplication
]
sendAction
:
@selector
(
closeFullscreenPlayback
)
to
:
nil
from
:
self
forEvent
:
nil
];
[[
VLCPlaybackController
sharedInstance
]
stopPlayback
];
}
-
(
IBAction
)
minimizePlayback
:(
id
)
sender
{
LOCKCHECK
;
[[
UIApplication
sharedApplication
]
sendAction
:
@selector
(
closeFullscreenPlayback
)
to
:
nil
from
:
self
forEvent
:
nil
];
}
-
(
IBAction
)
positionSliderAction
:(
UISlider
*
)
sender
{
LOCKCHECK
;
...
...
@@ -840,7 +846,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
-
(
void
)
playbackDidStop
:(
NSNotification
*
)
notification
{
[
self
clos
ePlayback
:
nil
];
[
self
minimiz
ePlayback
:
nil
];
}
-
(
void
)
mediaPlayerStateChanged
:(
VLCMediaPlayerState
)
currentState
...
...
Sources/VLCTimeNavigationTitleView.h
View file @
9b1a4ef2
...
...
@@ -15,6 +15,7 @@
@class
VLCOBSlider
;
@interface
VLCTimeNavigationTitleView
:
UIView
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
minimizePlaybackButton
;
@property
(
weak
,
nonatomic
)
IBOutlet
VLCOBSlider
*
positionSlider
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
timeDisplayButton
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
aspectRatioButton
;
...
...
Sources/VLCTimeNavigationTitleView.m
View file @
9b1a4ef2
...
...
@@ -25,8 +25,12 @@
self
.
aspectRatioButton
.
accessibilityLabel
=
NSLocalizedString
(
@"VIDEO_ASPECT_RATIO_BUTTON"
,
nil
);
self
.
aspectRatioButton
.
isAccessibilityElement
=
YES
;
[
self
.
aspectRatioButton
setImage
:[
UIImage
imageNamed
:
@"ratioIcon"
]
forState
:
UIControlStateNormal
];
self
.
minimizePlaybackButton
.
accessibilityLabel
=
NSLocalizedString
(
@"MINIMIZE_PLAYBACK_VIEW"
,
nil
);
self
.
minimizePlaybackButton
.
isAccessibilityElement
=
YES
;
[
self
setNeedsLayout
];
}
...
...
@@ -36,6 +40,10 @@
CGRect
remainder
=
self
.
bounds
;
CGRect
slice
;
CGRectDivide
(
remainder
,
&
slice
,
&
remainder
,
CGRectGetWidth
(
self
.
minimizePlaybackButton
.
frame
),
CGRectMinXEdge
);
self
.
minimizePlaybackButton
.
frame
=
slice
;
if
(
!
self
.
aspectRatioButton
.
hidden
)
{
[
self
.
aspectRatioButton
sizeToFit
];
CGRectDivide
(
remainder
,
&
slice
,
&
remainder
,
CGRectGetWidth
(
self
.
aspectRatioButton
.
frame
),
CGRectMaxXEdge
);
...
...
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