Commit 6afa2b42 authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: unify SPU and audio track selection in a single button

parent a5bdb95c
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="6249" systemVersion="14A379a" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="6254" systemVersion="14B25" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<development version="5100" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6243"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCMovieViewController">
......@@ -15,7 +15,6 @@
<outlet property="audioDelayIndicator" destination="FYO-Rd-Vjg" id="FVE-DI-BJ2"/>
<outlet property="audioDelayLabel" destination="bQc-dz-mB8" id="69P-Q3-3l3"/>
<outlet property="audioDelaySlider" destination="ahb-li-nqH" id="tQp-Zu-Sqd"/>
<outlet property="audioSwitcherButton" destination="277" id="292"/>
<outlet property="backButton" destination="102" id="111"/>
<outlet property="brightnessLabel" destination="148" id="165"/>
<outlet property="brightnessSlider" destination="147" id="163"/>
......@@ -50,11 +49,10 @@
<outlet property="spuDelayLabel" destination="NX8-Zc-K6Y" id="WLd-cA-fUn"/>
<outlet property="spuDelaySlider" destination="juX-HR-PqD" id="x4D-ki-Lwk"/>
<outlet property="statusLabel" destination="205" id="206"/>
<outlet property="subtitleContainer" destination="dvM-AB-hFc" id="5hO-zx-4tG"/>
<outlet property="subtitleSwitcherButton" destination="273" id="288"/>
<outlet property="timeDisplay" destination="300" id="302"/>
<outlet property="toolbar" destination="256" id="260"/>
<outlet property="trackNameLabel" destination="304" id="307"/>
<outlet property="trackSwitcherButton" destination="277" id="4wh-dZ-qaR"/>
<outlet property="videoFilterButton" destination="279" id="291"/>
<outlet property="videoFilterView" destination="141" id="156"/>
<outlet property="view" destination="8" id="120"/>
......@@ -345,30 +343,6 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="dvM-AB-hFc" userLabel="subtitleContainer">
<rect key="frame" x="542" y="5" width="50" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="273">
<rect key="frame" x="17" y="0.0" width="28" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
<state key="normal" image="subtitleIcon.png">
<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="switchSubtitleTrack:" destination="-1" eventType="touchUpInside" id="289"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="277">
<rect key="frame" x="493" y="5" width="32" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
......@@ -383,7 +357,7 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="switchAudioTrack:" destination="-1" eventType="touchUpInside" id="293"/>
<action selector="switchTrack:" destination="-1" eventType="touchUpInside" id="tWu-Jd-0k9"/>
</connections>
</button>
<view contentMode="scaleToFill" id="281" customClass="MPVolumeView">
......@@ -561,7 +535,6 @@
<image name="repeat.png" width="23" height="18"/>
<image name="resetIcon.png" width="24" height="30"/>
<image name="speedIcon.png" width="19" height="19"/>
<image name="subtitleIcon.png" width="19" height="19"/>
<image name="videoEffectsIcon.png" width="21" height="21"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
......
......@@ -15,8 +15,6 @@
<outlet property="audioDelayIndicator" destination="SDv-JW-DMi" id="Krq-0k-T6o"/>
<outlet property="audioDelayLabel" destination="8cb-fw-YeF" id="KWQ-n9-3mr"/>
<outlet property="audioDelaySlider" destination="oQe-Uu-1HY" id="6Me-OE-Dpl"/>
<outlet property="audioSwitcherButton" destination="78" id="98"/>
<outlet property="audioSwitcherButtonLandscape" destination="awR-Dt-S0B" id="SSl-4q-pof"/>
<outlet property="backButton" destination="85" id="96"/>
<outlet property="brightnessLabel" destination="130" id="233"/>
<outlet property="brightnessSlider" destination="128" id="232"/>
......@@ -57,13 +55,11 @@
<outlet property="spuDelayLabel" destination="KeW-Xp-9I6" id="LMS-pz-Ajj"/>
<outlet property="spuDelaySlider" destination="JRI-0m-C0M" id="f8j-Iq-sH3"/>
<outlet property="statusLabel" destination="210" id="211"/>
<outlet property="subtitleContainer" destination="umS-fw-84Z" id="cbT-b6-hSn"/>
<outlet property="subtitleContainerLandscape" destination="cvq-YB-u9T" id="Qgb-5z-1Ij"/>
<outlet property="subtitleSwitcherButton" destination="74" id="103"/>
<outlet property="subtitleSwitcherButtonLandscape" destination="R1Z-5y-cee" id="4TF-nd-xx3"/>
<outlet property="timeDisplay" destination="276" id="277"/>
<outlet property="toolbar" destination="250" id="272"/>
<outlet property="trackNameLabel" destination="282" id="284"/>
<outlet property="trackSwitcherButton" destination="78" id="GJo-Ha-dd9"/>
<outlet property="trackSwitcherButtonLandscape" destination="awR-Dt-S0B" id="U5x-pn-nVU"/>
<outlet property="videoFilterButton" destination="159" id="160"/>
<outlet property="videoFilterButtonLandscape" destination="v7P-Wn-QnX" id="fMG-Mv-Poa"/>
<outlet property="videoFilterView" destination="117" id="147"/>
......@@ -380,30 +376,6 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="umS-fw-84Z">
<rect key="frame" x="232" y="14" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="74">
<rect key="frame" x="7" y="0.0" width="28" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
<state key="normal" image="subtitleIcon.png">
<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="switchSubtitleTrack:" destination="-1" eventType="touchUpInside" id="79"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="75">
<rect key="frame" x="187" y="13" width="32" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
......@@ -469,7 +441,7 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="switchAudioTrack:" destination="-1" eventType="touchUpInside" id="83"/>
<action selector="switchTrack:" destination="-1" eventType="touchUpInside" id="Y2B-uB-AIc"/>
</connections>
</button>
<view contentMode="scaleToFill" id="230" customClass="MPVolumeView">
......@@ -588,30 +560,6 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="cvq-YB-u9T">
<rect key="frame" x="388" y="6" width="40" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="R1Z-5y-cee">
<rect key="frame" x="12" y="0.0" width="28" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
<state key="normal" image="subtitleIcon.png">
<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="switchSubtitleTrack:" destination="-1" eventType="touchUpInside" id="BsU-q4-2dQ"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="jl2-cB-KOM">
<rect key="frame" x="269" y="5" width="32" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
......@@ -715,7 +663,7 @@
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="switchAudioTrack:" destination="-1" eventType="touchUpInside" id="YjO-LC-Ome"/>
<action selector="switchTrack:" destination="-1" eventType="touchUpInside" id="M3v-tx-1MI"/>
</connections>
</button>
</subviews>
......@@ -733,7 +681,6 @@
<image name="repeat.png" width="23" height="18"/>
<image name="resetIcon.png" width="24" height="30"/>
<image name="speedIcon.png" width="19" height="19"/>
<image name="subtitleIcon.png" width="19" height="19"/>
<image name="videoEffectsIcon.png" width="21" height="21"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
......
B"CHOOSE_AUDIO_TRACK"="Choose Audio Track";
......
......@@ -31,12 +31,8 @@
@property (nonatomic, strong) IBOutlet UIButton *bwdButtonLandscape;
@property (nonatomic, strong) IBOutlet UIButton *fwdButton;
@property (nonatomic, strong) IBOutlet UIButton *fwdButtonLandscape;
@property (nonatomic, strong) IBOutlet UIView *subtitleContainer;
@property (nonatomic, strong) IBOutlet UIView *subtitleContainerLandscape;
@property (nonatomic, strong) IBOutlet UIButton *subtitleSwitcherButton;
@property (nonatomic, strong) IBOutlet UIButton *subtitleSwitcherButtonLandscape;
@property (nonatomic, strong) IBOutlet UIButton *audioSwitcherButton;
@property (nonatomic, strong) IBOutlet UIButton *audioSwitcherButtonLandscape;
@property (nonatomic, strong) IBOutlet UIButton *trackSwitcherButton;
@property (nonatomic, strong) IBOutlet UIButton *trackSwitcherButtonLandscape;
@property (nonatomic, strong) IBOutlet UIButton *repeatButton;
@property (nonatomic, strong) IBOutlet UIButton *repeatButtonLandscape;
@property (nonatomic, strong) IBOutlet UINavigationBar *toolbar;
......@@ -107,8 +103,7 @@
- (IBAction)backward:(id)sender;
- (IBAction)forward:(id)sender;
- (IBAction)toggleRepeatMode:(id)sender;
- (IBAction)switchAudioTrack:(id)sender;
- (IBAction)switchSubtitleTrack:(id)sender;
- (IBAction)switchTrack:(id)sender;
- (IBAction)videoFilterToggle:(id)sender;
- (IBAction)videoFilterSliderAction:(id)sender;
......
......@@ -183,14 +183,10 @@
_positionSlider.isAccessibilityElement = YES;
_timeDisplay.isAccessibilityElement = YES;
_audioSwitcherButton.accessibilityLabel = NSLocalizedString(@"CHOOSE_AUDIO_TRACK", nil);
_audioSwitcherButton.isAccessibilityElement = YES;
_audioSwitcherButtonLandscape.accessibilityLabel = NSLocalizedString(@"CHOOSE_AUDIO_TRACK", nil);
_audioSwitcherButtonLandscape.isAccessibilityElement = YES;
_subtitleSwitcherButton.accessibilityLabel = NSLocalizedString(@"CHOOSE_SUBTITLE_TRACK", nil);
_subtitleSwitcherButton.isAccessibilityElement = YES;
_subtitleSwitcherButtonLandscape.accessibilityLabel = NSLocalizedString(@"CHOOSE_SUBTITLE_TRACK", nil);
_subtitleSwitcherButtonLandscape.isAccessibilityElement = YES;
_trackSwitcherButton.accessibilityLabel = NSLocalizedString(@"OPEN_TRACK_PANEL", nil);
_trackSwitcherButton.isAccessibilityElement = YES;
_trackSwitcherButtonLandscape.accessibilityLabel = NSLocalizedString(@"OPEN_TRACK_PANEL", nil);
_trackSwitcherButtonLandscape.isAccessibilityElement = YES;
_playbackSpeedButton.accessibilityLabel = _playbackSpeedLabel.text;
_playbackSpeedButton.isAccessibilityElement = YES;
_playbackSpeedButtonLandscape.accessibilityLabel = _playbackSpeedLabel.text;
......@@ -1049,20 +1045,12 @@
[_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
[_playPauseButtonLandscape setImage:playPauseImage forState:UIControlStateNormal];
if ([[_mediaPlayer audioTrackIndexes] count] > 2) {
self.audioSwitcherButton.hidden = NO;
self.audioSwitcherButtonLandscape.hidden = NO;
if ([[_mediaPlayer audioTrackIndexes] count] > 2 || [[_mediaPlayer videoSubTitlesIndexes] count] > 1) {
self.trackSwitcherButton.hidden = NO;
self.trackSwitcherButtonLandscape.hidden = NO;
} else {
self.audioSwitcherButton.hidden = YES;
self.audioSwitcherButtonLandscape.hidden = YES;
}
if ([[_mediaPlayer videoSubTitlesIndexes] count] > 1) {
self.subtitleContainer.hidden = NO;
self.subtitleContainerLandscape.hidden = NO;
} else {
self.subtitleContainer.hidden = YES;
self.subtitleContainerLandscape.hidden = YES;
self.trackSwitcherButton.hidden = YES;
self.trackSwitcherButtonLandscape.hidden = YES;
}
}
......@@ -1103,7 +1091,7 @@
}
}
- (IBAction)switchAudioTrack:(id)sender
- (IBAction)switchTrack:(id)sender
{
[_trackSelectorTableView reloadData];
_trackSelectorContainer.hidden = NO;
......@@ -1121,11 +1109,6 @@
self.videoFilterView.hidden = _videoFiltersHidden = YES;
}
- (IBAction)switchSubtitleTrack:(id)sender
{
[self switchAudioTrack:sender];
}
- (IBAction)toggleTimeDisplay:(id)sender
{
_displayRemainingTime = !_displayRemainingTime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment