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
657c0923
Commit
657c0923
authored
Dec 20, 2013
by
Felix Paul Kühne
Browse files
playback: show album art if we don't have video but art. otherwise, fallback to meta data text
parent
a53eaf90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Resources/VLCMovieViewController~ipad.xib
View file @
657c0923
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"
4514
"
systemVersion=
"1
3A603
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB"
version=
"3.0"
toolsVersion=
"
5037
"
systemVersion=
"1
2F45
"
targetRuntime=
"iOS.CocoaTouch.iPad"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
defaultVersion=
"1552"
identifier=
"iOS"
/>
<development
version=
"5000"
identifier=
"xcode"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"37
47
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"37
33
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"VLCMovieViewController"
>
<connections>
<outlet
property=
"albumNameLabel"
destination=
"305"
id=
"308"
/>
<outlet
property=
"artistNameLabel"
destination=
"303"
id=
"306"
/>
<outlet
property=
"artworkImageView"
destination=
"g3j-bZ-K3S"
id=
"fPn-6f-Kez"
/>
<outlet
property=
"aspectRatioButton"
destination=
"198"
id=
"229"
/>
<outlet
property=
"audioSwitcherButton"
destination=
"277"
id=
"292"
/>
<outlet
property=
"audioSwitcherContainer"
destination=
"k3r-6B-CmK"
id=
"sr9-Hq-Iqu"
/>
...
...
@@ -118,6 +119,10 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"768"
height=
"1024"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
id=
"g3j-bZ-K3S"
>
<rect
key=
"frame"
x=
"84"
y=
"212"
width=
"600"
height=
"600"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
<label
opaque=
"NO"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
text=
"Artist Name"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
minimumFontSize=
"12"
adjustsLetterSpacingToFitWidth=
"YES"
id=
"303"
>
<rect
key=
"frame"
x=
"255"
y=
"356"
width=
"257"
height=
"28"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
...
...
@@ -524,4 +529,4 @@
<image
name=
"subtitleIcon.png"
width=
"19"
height=
"19"
/>
<image
name=
"videoEffectsIcon.png"
width=
"21"
height=
"21"
/>
</resources>
</document>
\ No newline at end of file
</document>
Resources/VLCMovieViewController~iphone.xib
View file @
657c0923
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"
4514
"
systemVersion=
"1
3A603
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"
5037
"
systemVersion=
"1
2F45
"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
>
<dependencies>
<deployment
defaultVersion=
"1552"
identifier=
"iOS"
/>
<development
version=
"5000"
identifier=
"xcode"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"37
47
"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"37
33
"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
customClass=
"VLCMovieViewController"
>
<connections>
<outlet
property=
"albumNameLabel"
destination=
"280"
id=
"285"
/>
<outlet
property=
"artistNameLabel"
destination=
"279"
id=
"283"
/>
<outlet
property=
"artworkImageView"
destination=
"yK6-Ph-SVE"
id=
"Cm9-7F-iYZ"
/>
<outlet
property=
"aspectRatioButton"
destination=
"202"
id=
"222"
/>
<outlet
property=
"audioSwitcherButton"
destination=
"78"
id=
"98"
/>
<outlet
property=
"audioSwitcherContainer"
destination=
"mKM-iB-gtC"
id=
"jf3-eu-m9Z"
/>
...
...
@@ -118,6 +119,10 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"320"
height=
"568"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFill"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
id=
"yK6-Ph-SVE"
>
<rect
key=
"frame"
x=
"40"
y=
"164"
width=
"240"
height=
"240"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMinX=
"YES"
flexibleMaxX=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
</imageView>
<label
opaque=
"NO"
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
text=
"Artist Name"
textAlignment=
"center"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
minimumFontSize=
"12"
adjustsLetterSpacingToFitWidth=
"YES"
id=
"279"
>
<rect
key=
"frame"
x=
"31"
y=
"137"
width=
"257"
height=
"28"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
flexibleMinY=
"YES"
flexibleMaxY=
"YES"
/>
...
...
@@ -534,4 +539,4 @@
<image
name=
"subtitleIcon.png"
width=
"19"
height=
"19"
/>
<image
name=
"videoEffectsIcon.png"
width=
"21"
height=
"21"
/>
</resources>
</document>
\ No newline at end of file
</document>
Sources/VLCMovieViewController.h
View file @
657c0923
...
...
@@ -71,6 +71,7 @@
@property
(
nonatomic
,
strong
)
IBOutlet
UILabel
*
artistNameLabel
;
@property
(
nonatomic
,
strong
)
IBOutlet
UILabel
*
albumNameLabel
;
@property
(
nonatomic
,
strong
)
IBOutlet
UILabel
*
trackNameLabel
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
artworkImageView
;
@property
(
nonatomic
,
strong
)
MLFile
*
mediaItem
;
@property
(
nonatomic
,
strong
)
NSURL
*
url
;
...
...
Sources/VLCMovieViewController.m
View file @
657c0923
...
...
@@ -21,6 +21,7 @@
#import <CommonCrypto/CommonDigest.h>
#import "UIDevice+SpeedCategory.h"
#import "VLCBugreporter.h"
#import "VLCThumbnailsCache.h"
#import "OBSlider.h"
#import "VLCStatusLabel.h"
...
...
@@ -354,9 +355,13 @@
item
.
unread
=
@
(
NO
);
if
(
item
.
isAlbumTrack
)
{
self
.
trackNameLabel
.
text
=
item
.
albumTrack
.
title
;
self
.
artistNameLabel
.
text
=
item
.
albumTrack
.
artist
;
self
.
albumNameLabel
.
text
=
item
.
albumTrack
.
album
.
name
;
self
.
artworkImageView
.
image
=
[
VLCThumbnailsCache
thumbnailForMediaFile
:
item
];
if
(
!
self
.
artworkImageView
.
image
)
{
self
.
trackNameLabel
.
text
=
item
.
albumTrack
.
title
;
self
.
artistNameLabel
.
text
=
item
.
albumTrack
.
artist
;
self
.
albumNameLabel
.
text
=
item
.
albumTrack
.
album
.
name
;
}
else
self
.
trackNameLabel
.
text
=
self
.
artistNameLabel
.
text
=
self
.
albumNameLabel
.
text
=
@""
;
}
}
else
{
media
=
[
VLCMedia
mediaWithURL
:
self
.
url
];
...
...
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