Browse Source

Extract movie view control panel to own view and controller.
Instead of using entirely different views for the panel based on orientation and interface idiom use a single wie and configure auto layout constraints based on the width of the panel.
In compact environments the volume slider moves below the playback controls instead of being on the left side.
fixes #15549

Tobias Conradi 10 years ago
parent
commit
46fd92898f

+ 233 - 0
Resources/VLCMovieViewControlPanel.xib

@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCMovieViewControlPanelViewController">
+            <connections>
+                <outlet property="bwdButton" destination="JDB-xi-tPg" id="PWa-6a-7nP"/>
+                <outlet property="fwdButton" destination="ebr-CU-0C0" id="6xF-al-DU2"/>
+                <outlet property="moreActionsButton" destination="JfQ-q3-fZH" id="47z-eO-7zE"/>
+                <outlet property="playPauseButton" destination="sWz-p2-OOq" id="uWM-TM-PRK"/>
+                <outlet property="playbackControls" destination="2cP-rW-fzM" id="wpr-p8-6Or"/>
+                <outlet property="playbackSpeedButton" destination="ihG-fo-m2Q" id="5y8-Eo-2xy"/>
+                <outlet property="trackSwitcherButton" destination="Ev9-Aj-Ysl" id="wpy-cc-ir4"/>
+                <outlet property="videoFilterButton" destination="wn4-Cf-Bor" id="gAq-me-PdK"/>
+                <outlet property="view" destination="xGq-of-vsu" id="fd9-4M-xqD"/>
+                <outlet property="volumeView" destination="0j8-jT-SDG" id="Nsm-zK-V0I"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view hidden="YES" opaque="NO" contentMode="scaleToFill" id="xGq-of-vsu" customClass="VLCFrostedGlasView">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="95"/>
+            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ihG-fo-m2Q" userLabel="Playback Speed Button">
+                    <rect key="frame" x="8" y="8" width="35" height="40"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="40" id="Een-T9-l4Q"/>
+                        <constraint firstAttribute="width" constant="35" id="VY6-bJ-OtU"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                    <state key="normal" image="speedIcon">
+                        <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>
+                    <variation key="widthClass=compact" fixedFrame="YES">
+                        <rect key="frame" x="11" y="6" width="19" height="27"/>
+                    </variation>
+                    <connections>
+                        <action selector="showPlaybackSpeedView" destination="-2" eventType="touchUpInside" id="0g6-YN-jtk"/>
+                    </connections>
+                </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ev9-Aj-Ysl" userLabel="track switcher button">
+                    <rect key="frame" x="51" y="8" width="35" height="40"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="40" id="9OZ-EG-hPx"/>
+                        <constraint firstAttribute="width" constant="35" id="jBS-11-dzh"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                    <state key="normal" image="audioTrackIcon">
+                        <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>
+                    <variation key="widthClass=compact" fixedFrame="YES">
+                        <rect key="frame" x="56" y="15" width="32" height="40"/>
+                    </variation>
+                    <connections>
+                        <action selector="switchTrack:" destination="-2" eventType="touchUpInside" id="DMb-OM-S3d"/>
+                    </connections>
+                </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wn4-Cf-Bor" userLabel="Video Filter Button">
+                    <rect key="frame" x="234" y="8" width="35" height="40"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="35" id="2g4-uD-jL2"/>
+                        <constraint firstAttribute="height" constant="40" id="qAx-hr-fm1"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                    <state key="normal" image="videoEffectsIcon">
+                        <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="videoFilterToggle:" destination="-2" eventType="touchUpInside" id="DMM-9Y-Eff"/>
+                    </connections>
+                </button>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JfQ-q3-fZH" userLabel="more actions button">
+                    <rect key="frame" x="277" y="8" width="35" height="40"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="40" id="Nay-FZ-Ucn"/>
+                        <constraint firstAttribute="width" constant="35" id="jMy-Wa-krc"/>
+                    </constraints>
+                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                    <state key="normal" image="More">
+                        <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>
+                    <variation key="widthClass=compact" fixedFrame="YES">
+                        <rect key="frame" x="280" y="15" width="32" height="40"/>
+                    </variation>
+                    <connections>
+                        <action selector="moreActions:" destination="-2" eventType="touchUpInside" id="uKo-wq-2SU"/>
+                    </connections>
+                </button>
+                <view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" placeholderIntrinsicWidth="infinite" placeholderIntrinsicHeight="30" translatesAutoresizingMaskIntoConstraints="NO" id="0j8-jT-SDG" customClass="VLCVolumeView">
+                    <rect key="frame" x="10" y="57" width="300" height="30"/>
+                    <constraints>
+                        <constraint firstAttribute="width" priority="250" constant="300" id="85a-bl-A1M"/>
+                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="150" id="UzA-DV-IRM"/>
+                        <constraint firstAttribute="width" relation="lessThanOrEqual" priority="900" constant="300" id="rkl-fF-S16"/>
+                    </constraints>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2cP-rW-fzM" userLabel="Playback controls">
+                    <rect key="frame" x="94" y="8" width="132" height="40"/>
+                    <subviews>
+                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JDB-xi-tPg" userLabel="bwd button">
+                            <rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="40" id="GWR-Ar-Rkq"/>
+                                <constraint firstAttribute="height" constant="40" id="Sm5-yS-Mhp"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                            <state key="normal" image="backIcon">
+                                <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="backward:" destination="-2" eventType="touchUpInside" id="Jci-SY-Oyo"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sWz-p2-OOq" userLabel="play pause button">
+                            <rect key="frame" x="46" y="0.0" width="40" height="40"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="40" id="AvI-sg-Cfg"/>
+                                <constraint firstAttribute="width" constant="40" id="dgQ-ny-i0B"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                            <state key="normal" image="playIcon">
+                                <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="playPause" destination="-2" eventType="touchUpInside" id="EOM-4b-iUz"/>
+                            </connections>
+                        </button>
+                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ebr-CU-0C0" userLabel="fwd button">
+                            <rect key="frame" x="92" y="0.0" width="40" height="40"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                            <constraints>
+                                <constraint firstAttribute="width" constant="40" id="3R8-m2-NES"/>
+                                <constraint firstAttribute="height" constant="40" id="cce-E1-xjV"/>
+                            </constraints>
+                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
+                            <state key="normal" image="forwardIcon">
+                                <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="forward:" destination="-2" eventType="touchUpInside" id="PEb-DG-gsL"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                    <constraints>
+                        <constraint firstItem="sWz-p2-OOq" firstAttribute="top" secondItem="2cP-rW-fzM" secondAttribute="top" id="1GA-3R-rNJ"/>
+                        <constraint firstItem="ebr-CU-0C0" firstAttribute="top" secondItem="2cP-rW-fzM" secondAttribute="top" id="4rg-xz-1ZA"/>
+                        <constraint firstItem="sWz-p2-OOq" firstAttribute="centerX" secondItem="2cP-rW-fzM" secondAttribute="centerX" id="AZ1-5b-Su4"/>
+                        <constraint firstItem="sWz-p2-OOq" firstAttribute="leading" secondItem="JDB-xi-tPg" secondAttribute="trailing" priority="750" constant="15" id="Aau-p6-v2m"/>
+                        <constraint firstItem="JDB-xi-tPg" firstAttribute="top" secondItem="2cP-rW-fzM" secondAttribute="top" id="Bb5-bY-0Mo"/>
+                        <constraint firstAttribute="bottom" secondItem="sWz-p2-OOq" secondAttribute="bottom" id="DoC-Pm-7fV"/>
+                        <constraint firstAttribute="bottom" secondItem="ebr-CU-0C0" secondAttribute="bottom" id="a11-IG-9Hf"/>
+                        <constraint firstItem="JDB-xi-tPg" firstAttribute="leading" secondItem="2cP-rW-fzM" secondAttribute="leading" id="aMc-E9-yjF"/>
+                        <constraint firstAttribute="bottom" secondItem="JDB-xi-tPg" secondAttribute="bottom" id="c0j-dl-pOQ"/>
+                        <constraint firstItem="ebr-CU-0C0" firstAttribute="leading" secondItem="sWz-p2-OOq" secondAttribute="trailing" priority="750" constant="15" id="cfF-Ax-geb"/>
+                        <constraint firstAttribute="trailing" secondItem="ebr-CU-0C0" secondAttribute="trailing" id="dyi-Jl-CkU"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <constraints>
+                <constraint firstItem="JfQ-q3-fZH" firstAttribute="leading" secondItem="wn4-Cf-Bor" secondAttribute="trailing" constant="8" id="BFe-d9-v0M"/>
+                <constraint firstItem="ihG-fo-m2Q" firstAttribute="leading" secondItem="xGq-of-vsu" secondAttribute="leading" constant="8" id="MoD-Bo-PaT"/>
+                <constraint firstAttribute="trailing" secondItem="JfQ-q3-fZH" secondAttribute="trailing" constant="8" id="O20-57-Kf4"/>
+                <constraint firstItem="2cP-rW-fzM" firstAttribute="leading" secondItem="Ev9-Aj-Ysl" secondAttribute="trailing" constant="8" id="Pe8-qK-NGa"/>
+                <constraint firstItem="2cP-rW-fzM" firstAttribute="centerX" secondItem="xGq-of-vsu" secondAttribute="centerX" id="Wb1-Bh-HRN"/>
+                <constraint firstItem="wn4-Cf-Bor" firstAttribute="leading" secondItem="2cP-rW-fzM" secondAttribute="trailing" constant="8" id="WhX-MM-w9S"/>
+                <constraint firstAttribute="bottom" secondItem="0j8-jT-SDG" secondAttribute="bottom" constant="8" id="bgI-Df-ZPx"/>
+                <constraint firstItem="0j8-jT-SDG" firstAttribute="centerX" secondItem="xGq-of-vsu" secondAttribute="centerX" id="eKd-It-BJV"/>
+                <constraint firstItem="wn4-Cf-Bor" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="eSw-0a-0Ae"/>
+                <constraint firstItem="JfQ-q3-fZH" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="eoS-6H-tER"/>
+                <constraint firstItem="2cP-rW-fzM" firstAttribute="top" secondItem="xGq-of-vsu" secondAttribute="top" constant="8" id="hcI-5g-0LY"/>
+                <constraint firstItem="2cP-rW-fzM" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="hnD-44-2fm"/>
+                <constraint firstItem="Ev9-Aj-Ysl" firstAttribute="centerY" secondItem="ihG-fo-m2Q" secondAttribute="centerY" id="pDl-On-k6L"/>
+                <constraint firstItem="Ev9-Aj-Ysl" firstAttribute="leading" secondItem="ihG-fo-m2Q" secondAttribute="trailing" constant="8" id="vj7-1I-YOd"/>
+            </constraints>
+            <nil key="simulatedStatusBarMetrics"/>
+            <nil key="simulatedTopBarMetrics"/>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="333" y="681.5"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="More" width="20" height="6"/>
+        <image name="audioTrackIcon" width="19" height="19"/>
+        <image name="backIcon" width="32" height="16"/>
+        <image name="forwardIcon" width="32" height="16"/>
+        <image name="playIcon" width="19" height="17"/>
+        <image name="speedIcon" width="19" height="19"/>
+        <image name="videoEffectsIcon" width="21" height="21"/>
+    </resources>
+</document>

+ 2 - 170
Resources/VLCMovieViewController~ipad.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="8164.2" systemVersion="15A235d" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8135.1"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCMovieViewController">
@@ -16,20 +16,14 @@
                 <outlet property="backButton" destination="102" id="111"/>
                 <outlet property="brightnessLabel" destination="148" id="165"/>
                 <outlet property="brightnessSlider" destination="147" id="163"/>
-                <outlet property="bwdButton" destination="276" id="284"/>
                 <outlet property="contrastLabel" destination="146" id="160"/>
                 <outlet property="contrastSlider" destination="145" id="161"/>
-                <outlet property="controllerPanel" destination="272" id="298"/>
                 <outlet property="currentScrubSpeedLabel" destination="244" id="246"/>
-                <outlet property="fwdButton" destination="274" id="286"/>
                 <outlet property="gammaLabel" destination="152" id="171"/>
                 <outlet property="gammaSlider" destination="151" id="169"/>
                 <outlet property="hueLabel" destination="143" id="158"/>
                 <outlet property="hueSlider" destination="144" id="157"/>
-                <outlet property="moreActionsButton" destination="o2v-AM-dqM" id="IzQ-ac-6DG"/>
                 <outlet property="movieView" destination="121" id="122"/>
-                <outlet property="playPauseButton" destination="275" id="282"/>
-                <outlet property="playbackSpeedButton" destination="278" id="295"/>
                 <outlet property="playbackSpeedIndicator" destination="179" id="193"/>
                 <outlet property="playbackSpeedLabel" destination="181" id="194"/>
                 <outlet property="playbackSpeedSlider" destination="180" id="191"/>
@@ -50,11 +44,8 @@
                 <outlet property="timeNavigationTitleView" destination="248" id="Ghx-eD-EQA"/>
                 <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"/>
-                <outlet property="volumeView" destination="281" id="299"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -376,158 +367,6 @@
                     <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
-                <view contentMode="scaleToFill" id="272" userLabel="Toolbar" customClass="VLCFrostedGlasView">
-                    <rect key="frame" x="0.0" y="974" width="768" height="50"/>
-                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
-                    <subviews>
-                        <view contentMode="scaleToFill" id="k3r-6B-CmK" userLabel="audioSwitcherContainer">
-                            <rect key="frame" x="241" 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="278">
-                                    <rect key="frame" x="9" y="0.0" width="32" height="40"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                    <animations/>
-                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                                    <state key="normal" image="speedIcon.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="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="294"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <animations/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                        </view>
-                        <view contentMode="scaleToFill" id="OCK-fG-mgo" userLabel="videoEffectsContainer">
-                            <rect key="frame" x="617" 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="279">
-                                    <rect key="frame" x="17" y="0.0" width="32" height="40"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                                    <animations/>
-                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                                    <state key="normal" image="videoEffectsIcon.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="videoFilterToggle:" destination="-1" eventType="touchUpInside" id="290"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <animations/>
-                            <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="535" y="5" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="audioTrackIcon.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="switchTrack:" destination="-1" eventType="touchUpInside" id="tWu-Jd-0k9"/>
-                            </connections>
-                        </button>
-                        <view contentMode="scaleToFill" id="281" customClass="MPVolumeView">
-                            <rect key="frame" x="32" y="14" width="177" height="22"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                        </view>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="274">
-                            <rect key="frame" x="421" y="5" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="forwardIcon.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="forward:" destination="-1" eventType="touchUpInside" id="287"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="276">
-                            <rect key="frame" x="319" y="5" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="backIcon.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="backward:" destination="-1" eventType="touchUpInside" id="285"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="275">
-                            <rect key="frame" x="372" y="5" width="28" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="playIcon.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="playPause" destination="-1" eventType="touchUpInside" id="283"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="o2v-AM-dqM">
-                            <rect key="frame" x="727" y="5" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="More.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="moreActions:" destination="-1" eventType="touchUpInside" id="ZhG-d9-vzl"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <animations/>
-                </view>
                 <view contentMode="scaleToFill" id="141" userLabel="Video Effects Panel" customClass="VLCFrostedGlasView">
                     <rect key="frame" x="470" y="782" width="298" height="192"/>
                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
@@ -638,16 +477,9 @@
         </view>
     </objects>
     <resources>
-        <image name="More.png" width="20" height="6"/>
         <image name="PlayingExternally.png" width="261" height="195"/>
-        <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="15" height="5"/>
-        <image name="playIcon.png" width="19" height="17"/>
         <image name="ratioIcon.png" width="15" height="15"/>
         <image name="resetIcon.png" width="24" height="30"/>
-        <image name="speedIcon.png" width="19" height="19"/>
-        <image name="videoEffectsIcon.png" width="21" height="21"/>
     </resources>
 </document>

+ 2 - 333
Resources/VLCMovieViewController~iphone.xib

@@ -16,25 +16,14 @@
                 <outlet property="backButton" destination="85" id="96"/>
                 <outlet property="brightnessLabel" destination="130" id="233"/>
                 <outlet property="brightnessSlider" destination="128" id="232"/>
-                <outlet property="bwdButton" destination="77" id="100"/>
-                <outlet property="bwdButtonLandscape" destination="pQj-0t-OnU" id="U8k-IC-a6H"/>
                 <outlet property="contrastLabel" destination="132" id="141"/>
                 <outlet property="contrastSlider" destination="131" id="142"/>
-                <outlet property="controllerPanel" destination="92" id="104"/>
-                <outlet property="controllerPanelLandscape" destination="e7l-vK-ape" id="uR7-Ks-KKV"/>
                 <outlet property="currentScrubSpeedLabel" destination="244" id="248"/>
-                <outlet property="fwdButton" destination="75" id="102"/>
-                <outlet property="fwdButtonLandscape" destination="jl2-cB-KOM" id="D5T-2S-hbf"/>
                 <outlet property="gammaLabel" destination="138" id="156"/>
                 <outlet property="gammaSlider" destination="137" id="144"/>
                 <outlet property="hueLabel" destination="134" id="234"/>
                 <outlet property="hueSlider" destination="133" id="235"/>
-                <outlet property="moreActionsButton" destination="w65-Hw-2aP" id="ax2-vA-Ngv"/>
                 <outlet property="movieView" destination="91" id="93"/>
-                <outlet property="playPauseButton" destination="76" id="101"/>
-                <outlet property="playPauseButtonLandscape" destination="nxS-aA-O6g" id="x1z-P6-yif"/>
-                <outlet property="playbackSpeedButton" destination="183" id="348-qM-uYE"/>
-                <outlet property="playbackSpeedButtonLandscape" destination="WXm-go-jev" id="TbP-eA-CzG"/>
                 <outlet property="playbackSpeedIndicator" destination="185" id="197"/>
                 <outlet property="playbackSpeedLabel" destination="167" id="198"/>
                 <outlet property="playbackSpeedSlider" destination="168" id="M6M-8F-t8T"/>
@@ -55,14 +44,8 @@
                 <outlet property="timeNavigationTitleView" destination="260" id="gcy-M6-dw8"/>
                 <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"/>
                 <outlet property="view" destination="1" id="105"/>
-                <outlet property="volumeView" destination="230" id="275"/>
-                <outlet property="volumeViewLandscape" destination="SX3-Kb-W8g" id="aoW-X9-hE3"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -238,7 +221,7 @@
                     <animations/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                 </view>
-                <view hidden="YES" contentMode="scaleToFill" id="241" userLabel="Controls panel" customClass="VLCFrostedGlasView">
+                <view hidden="YES" contentMode="scaleToFill" id="241" userLabel="scrubbing indicator view" customClass="VLCFrostedGlasView">
                     <rect key="frame" x="0.0" y="63" width="320" height="46"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
                     <subviews>
@@ -275,7 +258,7 @@
                         </navigationItem>
                     </items>
                 </navigationBar>
-                <view hidden="YES" contentMode="scaleToFill" id="117" userLabel="Controls panel" customClass="VLCFrostedGlasView">
+                <view hidden="YES" contentMode="scaleToFill" id="117" userLabel="video filters view" customClass="VLCFrostedGlasView">
                     <rect key="frame" x="0.0" y="342" width="320" height="198"/>
                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
                     <subviews>
@@ -488,330 +471,16 @@
                     </subviews>
                     <animations/>
                 </view>
-                <view hidden="YES" contentMode="scaleToFill" id="92" userLabel="Controls panel" customClass="VLCFrostedGlasView">
-                    <rect key="frame" x="0.0" y="478" width="320" height="90"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <subviews>
-                        <view contentMode="scaleToFill" id="mKM-iB-gtC">
-                            <rect key="frame" x="10" 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="183">
-                                    <rect key="frame" x="4" y="0.0" width="32" height="40"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                    <animations/>
-                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                                    <state key="normal" image="speedIcon.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="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="188"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <animations/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                        </view>
-                        <view contentMode="scaleToFill" id="iBJ-hE-7St">
-                            <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="159">
-                                    <rect key="frame" x="5" y="0.0" width="32" height="40"/>
-                                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                                    <animations/>
-                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                    <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                                    <state key="normal" image="videoEffectsIcon.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="videoFilterToggle:" destination="-1" eventType="touchUpInside" id="161"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <animations/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                        </view>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" 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"/>
-                            <animations/>
-                            <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="forwardIcon.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="forward:" destination="-1" eventType="touchUpInside" id="81"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="77">
-                            <rect key="frame" x="100" y="13" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="backIcon.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="backward:" destination="-1" eventType="touchUpInside" id="80"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="76">
-                            <rect key="frame" x="146" y="14" width="28" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="playIcon.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="playPause" destination="-2" eventType="touchUpInside" id="199"/>
-                            </connections>
-                        </button>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="78">
-                            <rect key="frame" x="52" y="15" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <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="audioTrackIcon.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="switchTrack:" destination="-1" eventType="touchUpInside" id="Y2B-uB-AIc"/>
-                            </connections>
-                        </button>
-                        <view contentMode="scaleToFill" id="230" customClass="MPVolumeView">
-                            <rect key="frame" x="22" y="61" width="282" height="22"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                        </view>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="w65-Hw-2aP">
-                            <rect key="frame" x="280" y="15" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                            <animations/>
-                            <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="More.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="moreActions:" destination="-1" eventType="touchUpInside" id="XV5-2d-iWF"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <animations/>
-                </view>
             </subviews>
             <animations/>
             <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
             <nil key="simulatedStatusBarMetrics"/>
         </view>
-        <view tag="1" contentMode="scaleToFill" id="e7l-vK-ape" userLabel="Controls panel" customClass="VLCFrostedGlasView">
-            <rect key="frame" x="0.0" y="0.0" width="480" height="50"/>
-            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <view contentMode="scaleToFill" id="hwg-8s-Ztc">
-                    <rect key="frame" x="379" y="5" width="40" height="40"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <subviews>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="v7P-Wn-QnX">
-                            <rect key="frame" x="7" y="0.0" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                            <state key="normal" image="videoEffectsIcon.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="videoFilterToggle:" destination="-1" eventType="touchUpInside" id="Hsi-PA-QI7"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <animations/>
-                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                </view>
-                <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" 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"/>
-                    <animations/>
-                    <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="forwardIcon.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="forward:" destination="-1" eventType="touchUpInside" id="h5v-TT-Axc"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="pQj-0t-OnU">
-                    <rect key="frame" x="176" y="5" width="32" height="40"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                    <animations/>
-                    <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="backIcon.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="backward:" destination="-1" eventType="touchUpInside" id="ngu-7R-uHn"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="nxS-aA-O6g">
-                    <rect key="frame" x="226" y="5" width="28" height="40"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                    <animations/>
-                    <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="playIcon.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="playPause" destination="-2" eventType="touchUpInside" id="ajc-gW-8UA"/>
-                    </connections>
-                </button>
-                <view contentMode="scaleToFill" id="SX3-Kb-W8g" customClass="MPVolumeView">
-                    <rect key="frame" x="20" y="16" width="105" height="22"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <animations/>
-                </view>
-                <view contentMode="scaleToFill" id="beR-yq-gJK">
-                    <rect key="frame" x="131" y="5" width="32" height="40"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <subviews>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="WXm-go-jev">
-                            <rect key="frame" x="0.0" y="0.0" width="32" height="40"/>
-                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                            <animations/>
-                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                            <inset key="contentEdgeInsets" minX="0.0" minY="4" maxX="0.0" maxY="4"/>
-                            <state key="normal" image="speedIcon.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="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="3KP-jS-fEF"/>
-                            </connections>
-                        </button>
-                    </subviews>
-                    <animations/>
-                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                </view>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="awR-Dt-S0B">
-                    <rect key="frame" x="329" y="6" width="32" height="40"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <animations/>
-                    <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="audioTrackIcon.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="switchTrack:" destination="-1" eventType="touchUpInside" id="M3v-tx-1MI"/>
-                    </connections>
-                </button>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="CTX-C4-0tv">
-                    <rect key="frame" x="441" y="6" width="32" height="40"/>
-                    <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
-                    <animations/>
-                    <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="More.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="moreActions:" destination="-1" eventType="touchUpInside" id="BJF-fx-pS9"/>
-                    </connections>
-                </button>
-            </subviews>
-            <animations/>
-            <color key="backgroundColor" red="0.1215686275" green="0.1215686275" blue="0.1215686275" alpha="1" colorSpace="calibratedRGB"/>
-            <nil key="simulatedStatusBarMetrics"/>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-        </view>
     </objects>
     <resources>
-        <image name="More.png" width="20" height="6"/>
         <image name="PlayingExternally.png" width="122" height="91"/>
-        <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="15" height="5"/>
-        <image name="playIcon.png" width="19" height="17"/>
         <image name="ratioIcon.png" width="15" height="15"/>
         <image name="resetIcon.png" width="24" height="30"/>
-        <image name="speedIcon.png" width="19" height="19"/>
-        <image name="videoEffectsIcon.png" width="21" height="21"/>
     </resources>
 </document>

+ 38 - 0
Sources/VLCMovieViewControlPanelViewController.h

@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * VLCMovieViewControlPanelViewController.h
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Tobias Conradi <videolan@tobias-conradi.de>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+
+#import <UIKit/UIKit.h>
+#import <MediaPlayer/MediaPlayer.h>
+#import "VLCPlaybackController.h"
+
+@interface VLCMovieViewControlPanelViewController : UIViewController
+
+@property (nonatomic, strong) IBOutlet UIButton *playbackSpeedButton;
+@property (nonatomic, strong) IBOutlet UIButton *trackSwitcherButton;
+
+@property (nonatomic, strong) IBOutlet UIButton *bwdButton;
+@property (nonatomic, strong) IBOutlet UIButton *playPauseButton;
+@property (nonatomic, strong) IBOutlet UIButton *fwdButton;
+
+@property (nonatomic, strong) IBOutlet UIButton *videoFilterButton;
+@property (nonatomic, strong) IBOutlet UIButton *moreActionsButton;
+
+@property (nonatomic, strong) IBOutlet MPVolumeView *volumeView;
+
+
+@property (nonatomic, weak) VLCPlaybackController *playbackController;
+
+
+- (void)updateButtons;
+
+@end

+ 204 - 0
Sources/VLCMovieViewControlPanelViewController.m

@@ -0,0 +1,204 @@
+/*****************************************************************************
+ * VLCMovieViewControlPanelViewController.m
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Tobias Conradi <videolan@tobias-conradi.de>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+
+#import "VLCMovieViewControlPanelViewController.h"
+
+@interface VLCMovieViewControlPanelViewController ()
+
+@property (nonatomic, weak) IBOutlet UIView *playbackControls;
+@property (nonatomic, assign) BOOL compactMode;
+@end
+
+@implementation VLCMovieViewControlPanelViewController
+
+static const CGFloat maxCompactWidth = 400.0;
+
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    _playbackSpeedButton.accessibilityLabel = NSLocalizedString(@"PLAYBACK_SPEED", nil);
+    _playbackSpeedButton.isAccessibilityElement = YES;
+
+    _trackSwitcherButton.accessibilityLabel = NSLocalizedString(@"OPEN_TRACK_PANEL", nil);
+    _trackSwitcherButton.isAccessibilityElement = YES;
+
+    _bwdButton.accessibilityLabel = NSLocalizedString(@"BWD_BUTTON", nil);
+    _bwdButton.isAccessibilityElement = YES;
+
+
+    UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(playPauseLongPress:)];
+    [_playPauseButton addGestureRecognizer:longPressRecognizer];
+    _playPauseButton.accessibilityLabel = NSLocalizedString(@"PLAY_PAUSE_BUTTON", nil);
+    _playPauseButton.accessibilityHint = NSLocalizedString(@"LONGPRESS_TO_STOP", nil);
+    _playPauseButton.isAccessibilityElement = YES;
+
+    _fwdButton.accessibilityLabel = NSLocalizedString(@"FWD_BUTTON", nil);
+    _fwdButton.isAccessibilityElement = YES;
+
+
+    _videoFilterButton.accessibilityLabel = NSLocalizedString(@"VIDEO_FILTER", nil);
+    _videoFilterButton.isAccessibilityElement = YES;
+
+
+    // HACK: get the slider from volume view
+    UISlider *volumeSlider = nil;
+    for (id aView in self.volumeView.subviews){
+        if ([aView isKindOfClass:[UISlider class]]){
+            volumeSlider = (UISlider *)aView;
+            break;
+        }
+    }
+    [volumeSlider addTarget:nil action:@selector(volumeSliderAction:) forControlEvents:UIControlEventValueChanged];
+    [self.volumeView setVolumeThumbImage:[UIImage imageNamed:@"sliderKnob"] forState:UIControlStateNormal];
+
+    _compactMode = YES;
+    [self setupConstraints:YES];
+}
+
+- (void) viewWillLayoutSubviews {
+    [super viewWillLayoutSubviews];
+    [self.view setNeedsUpdateConstraints];
+}
+
+- (void) updateViewConstraints {
+
+    BOOL compactMode = CGRectGetWidth(self.view.frame) <= maxCompactWidth;
+    if (self.compactMode != compactMode) {
+        self.compactMode = compactMode;
+        [self setupConstraints:compactMode];
+    }
+    [super updateViewConstraints];
+}
+
+- (void) setupConstraints:(BOOL)compactMode {
+    UIView *superview = self.view.superview;
+    NSArray *oldConstraints = [self.view.constraints filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSLayoutConstraint * evaluatedObject, NSDictionary<NSString *,id> * _Nullable bindings) {
+        if (!superview) {
+            return YES;
+        }
+        return evaluatedObject.firstItem != superview && evaluatedObject.secondItem != superview;
+    }]];
+    [self.view removeConstraints:oldConstraints];
+
+    NSDictionary *viewsDict = @{@"speed" : self.playbackSpeedButton,
+                                @"track" : self.trackSwitcherButton,
+                                @"playback" : self.playbackControls,
+                                @"filter" : self.videoFilterButton,
+                                @"actions" : self.moreActionsButton,
+                                @"volume" : self.volumeView,
+                                };
+
+    NSMutableArray *constraints = [NSMutableArray array];
+    if (compactMode) {
+
+        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[speed]-8-[track]-(>=8)-[playback]-(>=8)-[filter]-8-[actions]-|"
+                                                                                 options:NSLayoutFormatAlignAllCenterY
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(>=10)-[volume]-(>=10)-|"
+                                                                                 options:0
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+
+        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-[playback]-[volume(==40)]-|"
+                                                                                 options:NSLayoutFormatAlignAllCenterX
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+    } else {
+        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-[volume]-(>=8)-[playback]-(>=8)-[speed]-8-[track]-8-[filter]-8-[actions]-|"
+                                                                                 options:NSLayoutFormatAlignAllCenterY
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+
+        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-[playback]-|"
+                                                                                 options:0
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+        [constraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[volume(==40)]"
+                                                                                 options:0
+                                                                                 metrics:nil
+                                                                                   views:viewsDict]];
+
+
+    }
+
+    [constraints addObject:[NSLayoutConstraint constraintWithItem:self.playbackControls
+                                                        attribute:NSLayoutAttributeCenterX
+                                                        relatedBy:NSLayoutRelationEqual
+                                                           toItem:self.view
+                                                        attribute:NSLayoutAttributeCenterX
+                                                       multiplier:1.0
+                                                         constant:0]];
+    
+    [self.view addConstraints:constraints];
+}
+
+
+// needed for < iOS 8
+- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+    [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
+    [self.view setNeedsUpdateConstraints];
+}
+
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
+    [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
+    [coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext>  _Nonnull context) {
+        [self.view setNeedsUpdateConstraints];
+    } completion:nil];
+}
+
+
+- (VLCPlaybackController *)playbackController
+{
+    if (!_playbackController) {
+        _playbackController = [VLCPlaybackController sharedInstance];
+    }
+    return _playbackController;
+}
+
+- (void)playPauseLongPress:(UILongPressGestureRecognizer *)recognizer
+{
+    switch (recognizer.state) {
+        case UIGestureRecognizerStateBegan:
+        {   UIImage *image = [UIImage imageNamed:@"stopIcon"];
+            [_playPauseButton setImage:image forState:UIControlStateNormal];
+        }
+            break;
+        case UIGestureRecognizerStateEnded:
+            [self.playbackController stopPlayback];
+            break;
+        case UIGestureRecognizerStateCancelled:
+        case UIGestureRecognizerStateFailed:
+            [self updatePlayPauseButton];
+            break;
+        default:
+            break;
+    }
+}
+
+- (void)updateButtons {
+    [self updatePlayPauseButton];
+
+    self.trackSwitcherButton.hidden = !self.playbackController.currentMediaHasTrackToChooseFrom;
+    self.videoFilterButton.hidden = self.playbackController.audioOnlyPlaybackSession;
+}
+
+- (void)updatePlayPauseButton
+{
+    const BOOL isPlaying = self.playbackController.isPlaying;
+    UIImage *playPauseImage = isPlaying ? [UIImage imageNamed:@"pauseIcon"] : [UIImage imageNamed:@"playIcon"];
+    [_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
+}
+
+@end

+ 3 - 17
Sources/VLCMovieViewController.h

@@ -20,35 +20,23 @@
 @class VLCHorizontalSwipeGestureRecognizer;
 @class VLCVerticalSwipeGestureRecognizer;
 @class VLCTimeNavigationTitleView;
+@class VLCMovieViewControlPanelViewController;
 
 @interface VLCMovieViewController : UIViewController <UIActionSheetDelegate, VLCPlaybackControllerDelegate>
 
 @property (nonatomic, strong) IBOutlet UIView *movieView;
 @property (nonatomic, strong) IBOutlet UIBarButtonItem *backButton;
 @property (nonatomic, strong) IBOutlet VLCTimeNavigationTitleView *timeNavigationTitleView;
-@property (nonatomic, strong) IBOutlet UIButton *playPauseButton;
-@property (nonatomic, strong) IBOutlet UIButton *playPauseButtonLandscape;
-@property (nonatomic, strong) IBOutlet UIButton *bwdButton;
-@property (nonatomic, strong) IBOutlet UIButton *bwdButtonLandscape;
-@property (nonatomic, strong) IBOutlet UIButton *fwdButton;
-@property (nonatomic, strong) IBOutlet UIButton *fwdButtonLandscape;
-@property (nonatomic, strong) IBOutlet UIButton *trackSwitcherButton;
-@property (nonatomic, strong) IBOutlet UIButton *trackSwitcherButtonLandscape;
 @property (nonatomic, strong) IBOutlet UIButton *sleepTimerButton;
 @property (nonatomic, strong) IBOutlet UINavigationBar *toolbar;
-@property (nonatomic, strong) IBOutlet VLCFrostedGlasView *controllerPanel;
-@property (nonatomic, strong) IBOutlet VLCFrostedGlasView *controllerPanelLandscape;
+@property (nonatomic, strong) IBOutlet UIView *controllerPanel;
 @property (nonatomic, strong) IBOutlet VLCStatusLabel *statusLabel;
-@property (nonatomic, strong) IBOutlet MPVolumeView *volumeView;
-@property (nonatomic, strong) IBOutlet MPVolumeView *volumeViewLandscape;
 
 @property (nonatomic, strong) IBOutlet UIView *playingExternallyView;
 @property (nonatomic, strong) IBOutlet UILabel *playingExternallyTitle;
 @property (nonatomic, strong) IBOutlet UILabel *playingExternallyDescription;
 
 @property (nonatomic, strong) IBOutlet VLCFrostedGlasView *videoFilterView;
-@property (nonatomic, strong) IBOutlet UIButton *videoFilterButton;
-@property (nonatomic, strong) IBOutlet UIButton *videoFilterButtonLandscape;
 @property (nonatomic, strong) IBOutlet UILabel *hueLabel;
 @property (nonatomic, strong) IBOutlet UISlider *hueSlider;
 @property (nonatomic, strong) IBOutlet UILabel *contrastLabel;
@@ -62,8 +50,6 @@
 @property (nonatomic, strong) IBOutlet UIButton *resetVideoFilterButton;
 
 @property (nonatomic, strong) IBOutlet VLCFrostedGlasView *playbackSpeedView;
-@property (nonatomic, strong) IBOutlet UIButton *playbackSpeedButton;
-@property (nonatomic, strong) IBOutlet UIButton *playbackSpeedButtonLandscape;
 @property (nonatomic, strong) IBOutlet UISlider *playbackSpeedSlider;
 @property (nonatomic, strong) IBOutlet UILabel *playbackSpeedLabel;
 @property (nonatomic, strong) IBOutlet UILabel *playbackSpeedIndicator;
@@ -73,7 +59,6 @@
 @property (nonatomic, strong) IBOutlet UISlider *spuDelaySlider;
 @property (nonatomic, strong) IBOutlet UILabel *spuDelayLabel;
 @property (nonatomic, strong) IBOutlet UILabel *spuDelayIndicator;
-@property (nonatomic, strong) IBOutlet UIButton *moreActionsButton;
 
 @property (nonatomic, strong) IBOutlet VLCFrostedGlasView *scrubIndicatorView;
 @property (nonatomic, strong) IBOutlet UILabel *currentScrubSpeedLabel;
@@ -85,6 +70,7 @@
 @property (nonatomic, strong) IBOutlet UIImageView *artworkImageView;
 
 @property (nonatomic, weak) IBOutlet VLCPlaybackController *playbackController;
+@property (nonatomic, weak) VLCMovieViewControlPanelViewController *controlPanelController;
 
 - (IBAction)closePlayback:(id)sender;
 - (IBAction)minimizePlayback:(id)sender;

+ 57 - 145
Sources/VLCMovieViewController.m

@@ -32,6 +32,7 @@
 #import "VLCPlayerDisplayController.h"
 #import "VLCAppDelegate.h"
 #import "VLCStatusLabel.h"
+#import "VLCMovieViewControlPanelViewController.h"
 
 #define FORWARD_SWIPE_DURATION 30
 #define BACKWARD_SWIPE_DURATION 10
@@ -173,38 +174,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     _spuDelaySlider.accessibilityLabel = _spuDelayLabel.text;
     _spuDelaySlider.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;
-    _playbackSpeedButtonLandscape.isAccessibilityElement = YES;
-    _videoFilterButton.accessibilityLabel = NSLocalizedString(@"VIDEO_FILTER", nil);
-    _videoFilterButton.isAccessibilityElement = YES;
-    _videoFilterButtonLandscape.accessibilityLabel = NSLocalizedString(@"VIDEO_FILTER", nil);
-    _videoFilterButtonLandscape.isAccessibilityElement = YES;
     _resetVideoFilterButton.accessibilityLabel = NSLocalizedString(@"VIDEO_FILTER_RESET_BUTTON", nil);
     _resetVideoFilterButton.isAccessibilityElement = YES;
-    UILongPressGestureRecognizer *longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(playPauseLongPress:)];
-    [_playPauseButton addGestureRecognizer:longPressRecognizer];
-    _playPauseButton.accessibilityLabel = NSLocalizedString(@"PLAY_PAUSE_BUTTON", nil);
-    _playPauseButton.accessibilityHint = NSLocalizedString(@"LONGPRESS_TO_STOP", nil);
-    _playPauseButton.isAccessibilityElement = YES;
-    UILongPressGestureRecognizer *longPressRecognizerLandscape = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(playPauseLongPress:)];
-    [_playPauseButton addGestureRecognizer:longPressRecognizerLandscape];
-    _playPauseButtonLandscape.accessibilityLabel = NSLocalizedString(@"PLAY_PAUSE_BUTTON", nil);
-    _playPauseButtonLandscape.accessibilityHint = NSLocalizedString(@"LONGPRESS_TO_STOP", nil);
-    _playPauseButtonLandscape.isAccessibilityElement = YES;
-    _bwdButton.accessibilityLabel = NSLocalizedString(@"BWD_BUTTON", nil);
-    _bwdButton.isAccessibilityElement = YES;
-    _bwdButtonLandscape.accessibilityLabel = NSLocalizedString(@"BWD_BUTTON", nil);
-    _bwdButtonLandscape.isAccessibilityElement = YES;
-    _fwdButton.accessibilityLabel = NSLocalizedString(@"FWD_BUTTON", nil);
-    _fwdButton.isAccessibilityElement = YES;
-    _fwdButtonLandscape.accessibilityLabel = NSLocalizedString(@"FWD_BUTTON", nil);
-    _fwdButtonLandscape.isAccessibilityElement = YES;
     _sleepTimerButton.accessibilityLabel = NSLocalizedString(@"BUTTON_SLEEP_TIMER", nil);
     _sleepTimerButton.isAccessibilityElement = YES;
     [_sleepTimerButton setTitle:NSLocalizedString(@"BUTTON_SLEEP_TIMER", nil) forState:UIControlStateNormal];
@@ -302,25 +273,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     rect.origin.y = 0;
     self.toolbar.frame = rect;
 
-    /* FIXME: there is a saner iOS 6+ API for this! */
-    /* this looks a bit weird, but we need to support iOS 5 and should show the same appearance */
-    void (^initVolumeSlider)(MPVolumeView *) = ^(MPVolumeView *volumeView){
-        UISlider *volumeSlider = nil;
-        for (id aView in volumeView.subviews){
-            if ([[[aView class] description] isEqualToString:@"MPVolumeSlider"]){
-                volumeSlider = (UISlider *)aView;
-                break;
-            }
-        }
-        [volumeView setVolumeThumbImage:[UIImage imageNamed:@"modernSliderKnob"] forState:UIControlStateNormal];
-        [volumeSlider addTarget:self
-                         action:@selector(volumeSliderAction:)
-               forControlEvents:UIControlEventValueChanged];
-    };
-
-    initVolumeSlider(self.volumeView);
-    initVolumeSlider(self.volumeViewLandscape);
-
     _playerIsSetup = NO;
 
     [self.movieView setAccessibilityLabel:NSLocalizedString(@"VO_VIDEOPLAYER_TITLE", nil)];
@@ -363,11 +315,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     [self.view addSubview:_trackSelectorContainer];
 
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
-        _equalizerView = [[VLCEqualizerView alloc] initWithFrame:CGRectMake((rect.size.width - 450.) / 2., self.controllerPanel.frame.origin.y - 200., 450., 240.)];
-    } else {
-        _equalizerView = [[VLCEqualizerView alloc] initWithFrame:CGRectMake((rect.size.width - 450.) / 2., self.controllerPanel.frame.origin.y - 240., 450., 240.)];
-    }
+    _equalizerView = [[VLCEqualizerView alloc] initWithFrame:CGRectMake(0, 0, 450., 240.)];
     _equalizerView.delegate = self.playbackController;
     _equalizerView.UIdelegate = self;
     _equalizerView.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin;
@@ -416,6 +364,29 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     [self.view addSubview:_sleepTimerContainer];
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackDidStop:) name:VLCPlaybackControllerPlaybackDidStop object:nil];
+
+
+    VLCMovieViewControlPanelViewController *panelVC = [[VLCMovieViewControlPanelViewController alloc] initWithNibName:@"VLCMovieViewControlPanel"
+                                                                                                               bundle:nil];
+    [self addChildViewController:panelVC];
+    [self.view addSubview:panelVC.view];
+    panelVC.view.translatesAutoresizingMaskIntoConstraints = NO;
+    NSArray *hConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[panel]|"
+                                                                    options:0
+                                                                    metrics:nil
+                                                                      views:@{@"panel":panelVC.view}];
+
+    NSArray *vConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:[panel]|"
+                                                                    options:0
+                                                                    metrics:nil
+                                                                      views:@{@"panel":panelVC.view}];
+    [self.view addConstraints:hConstraints];
+    [self.view addConstraints:vConstraints];
+
+
+    [panelVC didMoveToParentViewController:self];
+    self.controlPanelController = panelVC;
+    self.controllerPanel = panelVC.view;
 }
 
 - (void)viewWillAppear:(BOOL)animated
@@ -452,13 +423,18 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     vpc.videoOutputView = self.movieView;
 }
 
-- (void)viewWillLayoutSubviews
+- (void)viewDidLayoutSubviews
 {
+
+    CGRect equalizerRect = _equalizerView.frame;
+    equalizerRect.origin.x = CGRectGetMidX(self.view.bounds) - CGRectGetWidth(equalizerRect)/2.0;
+    equalizerRect.origin.y = CGRectGetMidY(self.view.bounds) - CGRectGetHeight(equalizerRect)/2.0;
+    _equalizerView.frame = equalizerRect;
+
     CGRect multiSelectionFrame;
-    CGRect controllerPanelFrame;
+    CGRect controllerPanelFrame = _controllerPanel.frame;;
 
     if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone) {
-        controllerPanelFrame = _controllerPanel.frame;
         multiSelectionFrame = (CGRect){CGPointMake(0., 0.), [_multiSelectionView proposedDisplaySize]};
         multiSelectionFrame.origin.x = controllerPanelFrame.size.width - multiSelectionFrame.size.width;
         multiSelectionFrame.origin.y = controllerPanelFrame.origin.y - multiSelectionFrame.size.height;
@@ -467,28 +443,17 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         return;
     }
 
-    CGSize viewSize = self.view.frame.size;
-
     if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) {
-        [_controllerPanel removeFromSuperview];
-        controllerPanelFrame = (CGRect){CGPointMake(0, viewSize.height - _controllerPanelLandscape.frame.size.height), CGSizeMake(viewSize.width, _controllerPanelLandscape.frame.size.height)};
-        _controllerPanelLandscape.frame = controllerPanelFrame;
-        [self.view addSubview:_controllerPanelLandscape];
         _multiSelectionView.showsEqualizer = YES;
         multiSelectionFrame = (CGRect){CGPointMake(0., 0.), [_multiSelectionView proposedDisplaySize]};
         multiSelectionFrame.origin.x = controllerPanelFrame.size.width - multiSelectionFrame.size.width;
         multiSelectionFrame.origin.y = controllerPanelFrame.origin.y - multiSelectionFrame.size.height;
     } else {
-        [_controllerPanelLandscape removeFromSuperview];
-        controllerPanelFrame = (CGRect){CGPointMake(0, viewSize.height - _controllerPanel.frame.size.height), CGSizeMake(viewSize.width, _controllerPanel.frame.size.height)};
-        _controllerPanel.frame = controllerPanelFrame;
-        [self.view addSubview:_controllerPanel];
         _multiSelectionView.showsEqualizer = NO;
         multiSelectionFrame = (CGRect){CGPointMake(0., 0.), [_multiSelectionView proposedDisplaySize]};
         multiSelectionFrame.origin.x = controllerPanelFrame.size.width - multiSelectionFrame.size.width;
         multiSelectionFrame.origin.y = controllerPanelFrame.origin.y - multiSelectionFrame.size.height;
     }
-
     _multiSelectionView.frame = multiSelectionFrame;
 }
 
@@ -560,8 +525,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     if (!_controlsHidden) {
         _controllerPanel.alpha = 0.0f;
         _controllerPanel.hidden = !_videoFiltersHidden;
-        _controllerPanelLandscape.alpha = 0.0f;
-        _controllerPanelLandscape.hidden = !_videoFiltersHidden;
         _toolbar.alpha = 0.0f;
         _toolbar.hidden = NO;
         _videoFilterView.alpha = 0.0f;
@@ -586,7 +549,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     void (^animationBlock)() = ^() {
         _controllerPanel.alpha = alpha;
-        _controllerPanelLandscape.alpha = alpha;
         _toolbar.alpha = alpha;
         _videoFilterView.alpha = alpha;
         _playbackSpeedView.alpha = alpha;
@@ -604,7 +566,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     void (^completionBlock)(BOOL finished) = ^(BOOL finished) {
         _controllerPanel.hidden = _videoFiltersHidden ? _controlsHidden : NO;
-        _controllerPanelLandscape.hidden = _videoFiltersHidden ? _controlsHidden : NO;
         _toolbar.hidden = _controlsHidden;
         _videoFilterView.hidden = _videoFiltersHidden;
         _playbackSpeedView.hidden = _playbackSpeedViewHidden;
@@ -624,8 +585,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
     [[UIApplication sharedApplication] setStatusBarHidden:_viewAppeared ? _controlsHidden : NO withAnimation:animationType];
     [UIView animateWithDuration:animationDuration animations:animationBlock completion:completionBlock];
-
-    _volumeView.hidden = _volumeViewLandscape.hidden = _controllerPanel.hidden;
 }
 
 - (void)toggleControlsVisible
@@ -767,34 +726,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
     [self _resetIdleTimer];
 }
 
-- (void)playPauseLongPress:(UILongPressGestureRecognizer *)recognizer
-{
-    switch (recognizer.state) {
-        case UIGestureRecognizerStateBegan:
-        {   UIImage *image = [UIImage imageNamed:@"stopIcon"];
-            [_playPauseButton setImage:image forState:UIControlStateNormal];
-            [_playPauseButtonLandscape setImage:image forState:UIControlStateNormal];
-        }
-            break;
-        case UIGestureRecognizerStateEnded:
-            [self.playbackController stopPlayback];
-            break;
-        case UIGestureRecognizerStateCancelled:
-        case UIGestureRecognizerStateFailed:
-            [self updatePlayPauseButton];
-            break;
-        default:
-            break;
-    }
-}
 
-- (void)updatePlayPauseButton
-{
-    const BOOL isPlaying = self.playbackController.isPlaying;
-    UIImage *playPauseImage = isPlaying ? [UIImage imageNamed:@"pauseIcon"] : [UIImage imageNamed:@"playIcon"];
-    [_playPauseButton setImage:playPauseImage forState:UIControlStateNormal];
-    [_playPauseButtonLandscape setImage:playPauseImage forState:UIControlStateNormal];
-}
 
 - (void)updateTimeDisplayButton
 {
@@ -886,20 +818,9 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (currentState == VLCMediaPlayerStateError)
         [self.statusLabel showStatusMessage:NSLocalizedString(@"PLAYBACK_FAILED", nil)];
 
-    [self updatePlayPauseButton];
-
-    if (currentMediaHasTrackToChooseFrom) {
-        self.trackSwitcherButton.hidden = NO;
-        self.trackSwitcherButtonLandscape.hidden = NO;
-    } else {
-        self.trackSwitcherButton.hidden = YES;
-        self.trackSwitcherButtonLandscape.hidden = YES;
-    }
+    [self.controlPanelController updateButtons];
 
-    if (currentMediaHasChapters)
-        _multiSelectionView.mediaHasChapters = YES;
-    else
-        _multiSelectionView.mediaHasChapters = NO;
+    _multiSelectionView.mediaHasChapters = currentMediaHasChapters;
 }
 
 - (void)showStatusMessage:(NSString *)statusMessage forPlaybackController:(VLCPlaybackController *)controller
@@ -928,8 +849,8 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     self.timeNavigationTitleView.hideAspectRatio = audioOnly;
     self.timeNavigationTitleView.positionSlider.hidden = NO;
 
-    self.videoFilterButton.hidden = audioOnly;
-
+    [[self controlPanelController] updateButtons];
+    
     _audioOnly = audioOnly;
 }
 
@@ -975,7 +896,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
             if (!_controlsHidden) {
                 self.controllerPanel.hidden = _controlsHidden = YES;
-                self.controllerPanelLandscape.hidden = YES;
                 self.toolbar.hidden = YES;
             }
         }
@@ -1013,7 +933,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
         if (!_controlsHidden) {
             self.controllerPanel.hidden = _controlsHidden = YES;
-            self.controllerPanelLandscape.hidden = YES;
         }
     }
 
@@ -1036,7 +955,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     }
 }
 
-- (void)moreActions:(id)sender
+- (void)moreActions:(UIButton *)sender
 {
     if (_multiSelectionView.hidden == NO) {
         [UIView animateWithDuration:.3
@@ -1057,7 +976,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 
     CGRect workFrame = _multiSelectionView.frame;
     workFrame.size = [_multiSelectionView proposedDisplaySize];
-    workFrame.origin.x = self.toolbar.frame.size.width - workFrame.size.width;
+    workFrame.origin.x = CGRectGetMaxX(sender.frame) - workFrame.size.width;
 
     _multiSelectionView.alpha = 1.0f;
 
@@ -1099,7 +1018,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
             if (!_controlsHidden) {
                 self.controllerPanel.hidden = _controlsHidden = YES;
-                self.controllerPanelLandscape.hidden = YES;
                 self.toolbar.hidden = YES;
             }
         }
@@ -1133,7 +1051,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
         if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
             if (!_controlsHidden) {
                 self.controllerPanel.hidden = _controlsHidden = YES;
-                self.controllerPanelLandscape.hidden = YES;
             }
         }
 
@@ -1371,19 +1288,12 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 - (VLCPanType)detectPanTypeForPan:(UIPanGestureRecognizer*)panRecognizer
 {
     NSString *deviceType = [[UIDevice currentDevice] model];
-    CGPoint location = [panRecognizer locationInView:self.view];
-    CGFloat position = location.x;
-
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
-    CGRect screenRect = [[UIScreen mainScreen] bounds];
-    CGFloat screenWidth = .0;
-    if (orientation == UIDeviceOrientationPortrait)
-        screenWidth = screenRect.size.width;
-    else
-        screenWidth = screenRect.size.height;
+    UIWindow *window = [[UIApplication sharedApplication] keyWindow];
+    CGFloat windowWidth = CGRectGetWidth(window.bounds);
+    CGPoint location = [panRecognizer locationInView:window];
 
     VLCPanType panType = VLCPanTypeVolume; // default or right side of the screen
-    if (position < screenWidth / 2)
+    if (location.x < windowWidth / 2)
         panType = VLCPanTypeBrightness;
 
     // only check for seeking gesture if on iPad , will overwrite last statements if true
@@ -1525,7 +1435,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
         if (!_controlsHidden) {
             self.controllerPanel.hidden = _controlsHidden = YES;
-            self.controllerPanelLandscape.hidden = YES;
         }
     }
 
@@ -1608,23 +1517,26 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
 
 - (IBAction)videoDimensionAction:(id)sender
 {
+    if (sender == self.timeNavigationTitleView.aspectRatioButton) {
+        [self.playbackController switchAspectRatio];
+    }
+}
+
+- (IBAction)showPlaybackSpeedView {
     LOCKCHECK;
 
-    if (sender == self.playbackSpeedButton || sender == self.playbackSpeedButtonLandscape) {
-        if (!_videoFiltersHidden)
-            self.videoFilterView.hidden = _videoFiltersHidden = YES;
+    if (!_videoFiltersHidden)
+        self.videoFilterView.hidden = _videoFiltersHidden = YES;
 
-        if (_equalizerView.hidden == NO)
-            _equalizerView.hidden = YES;
+    if (_equalizerView.hidden == NO)
+        _equalizerView.hidden = YES;
 
-        self.playbackSpeedView.hidden = !_playbackSpeedViewHidden;
-        _playbackSpeedViewHidden = self.playbackSpeedView.hidden;
-        [self _resetIdleTimer];
-    } else if (sender == self.timeNavigationTitleView.aspectRatioButton) {
-        [self.playbackController switchAspectRatio];
-    }
+    self.playbackSpeedView.hidden = !_playbackSpeedViewHidden;
+    _playbackSpeedViewHidden = self.playbackSpeedView.hidden;
+    [self _resetIdleTimer];
 }
 
+
 #pragma mark - autorotation
 
 - (BOOL)rotationIsDisabled

+ 21 - 0
Sources/VLCVolumeView.h

@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * VLCVolumeView.h
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Author: Tobias Conradi <videolan # tobias-conradi.de>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+#import <MediaPlayer/MediaPlayer.h>
+
+// overrides the rect methods of MPVolumeView to fix the slider and button
+// hanging at the top of the view when the volume view has not the "original" size
+
+@interface VLCVolumeView : MPVolumeView
+- (CGRect)volumeSliderRectForBounds:(CGRect)bounds;
+- (CGRect)routeButtonRectForBounds:(CGRect)bounds;
+@end

+ 35 - 0
Sources/VLCVolumeView.m

@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * VLCVolumeView.h
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Author: Tobias Conradi <videolan # tobias-conradi.de>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+#import "VLCVolumeView.h"
+
+@implementation VLCVolumeView
+
+- (CGRect)volumeSliderRectForBounds:(CGRect)bounds
+{
+    CGRect rect = [super volumeSliderRectForBounds:bounds];
+    // fix height and y origin
+    rect.size.height = bounds.size.height;
+    rect.origin.y = bounds.origin.y;
+    return rect;
+}
+
+- (CGRect)routeButtonRectForBounds:(CGRect)bounds
+{
+    CGRect rect = [super routeButtonRectForBounds:bounds];
+    // fix height and y origin
+    rect.size.height = bounds.size.height;
+    rect.origin.y = bounds.origin.y;
+    return rect;
+}
+
+@end

+ 16 - 0
VLC for iOS.xcodeproj/project.pbxproj

@@ -224,6 +224,8 @@
 		CCE2A22E17A5859E00D9EAAD /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCE2A22D17A5859E00D9EAAD /* CoreText.framework */; };
 		D9C52A9E9D4D5AFA7EF1B45A /* libPods-vlc-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DAF8927B0BE9C328466C0EA7 /* libPods-vlc-ios.a */; };
 		DD1A45FD1B676BAC00086F57 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DDE1BCE41B676B8800A4B9CE /* Localizable.strings */; };
+		DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */; settings = {ASSET_TAGS = (); }; };
+		DD1CB05A1BBAC549006EDDE6 /* VLCVolumeView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD1CB0591BBAC549006EDDE6 /* VLCVolumeView.m */; settings = {ASSET_TAGS = (); }; };
 		DD2789DD1B67A5C400CED769 /* VLCThumbnailsCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D37849D183A98DD009EE944 /* VLCThumbnailsCache.m */; };
 		DD2789DE1B67A5CD00CED769 /* VLCWatchMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EA6301AF50CFE007FF096 /* VLCWatchMessage.m */; };
 		DD2789E21B67A7BE00CED769 /* VLCWatchCommunication.m in Sources */ = {isa = PBXBuildFile; fileRef = DD2789E11B67A7BE00CED769 /* VLCWatchCommunication.m */; };
@@ -252,6 +254,7 @@
 		DD7BA2631B680C8E002D9F54 /* MediaLibraryKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD7BA2601B680C1B002D9F54 /* MediaLibraryKit.framework */; };
 		DD7BA2641B680C8E002D9F54 /* MediaLibraryKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DD7BA2601B680C1B002D9F54 /* MediaLibraryKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		DD8F84311B00EB3B0009138A /* VLCPlaybackController+MediaLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = DD8F84301B00EB3B0009138A /* VLCPlaybackController+MediaLibrary.m */; };
+		DDAD5C2B1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */; settings = {ASSET_TAGS = (); }; };
 		DDB7C6A41BAEB28200E6570E /* WKInterfaceController+VLCConnectionAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = DD9FBE761BAD6BB600FFE77A /* WKInterfaceController+VLCConnectionAlert.m */; settings = {ASSET_TAGS = (); }; };
 		DDB959421AFBB30500BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel in Sources */ = {isa = PBXBuildFile; fileRef = DDB959411AFBB30500BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel */; };
 		DDC10BE41AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = DDC10BE31AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m */; };
@@ -729,6 +732,8 @@
 		CCE2A22D17A5859E00D9EAAD /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
 		DAF8927B0BE9C328466C0EA7 /* libPods-vlc-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-vlc-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		DD1A45FC1B676BAC00086F57 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
+		DD1CB0581BBAC549006EDDE6 /* VLCVolumeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCVolumeView.h; path = Sources/VLCVolumeView.h; sourceTree = SOURCE_ROOT; };
+		DD1CB0591BBAC549006EDDE6 /* VLCVolumeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCVolumeView.m; path = Sources/VLCVolumeView.m; sourceTree = SOURCE_ROOT; };
 		DD2789E01B67A7BE00CED769 /* VLCWatchCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCWatchCommunication.h; path = Sources/VLCWatchCommunication.h; sourceTree = SOURCE_ROOT; };
 		DD2789E11B67A7BE00CED769 /* VLCWatchCommunication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCWatchCommunication.m; path = Sources/VLCWatchCommunication.m; sourceTree = SOURCE_ROOT; };
 		DD2789E31B67A88600CED769 /* WatchConnectivity.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WatchConnectivity.framework; path = System/Library/Frameworks/WatchConnectivity.framework; sourceTree = SDKROOT; };
@@ -788,6 +793,9 @@
 		DD9FBE751BAD6BB600FFE77A /* WKInterfaceController+VLCConnectionAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WKInterfaceController+VLCConnectionAlert.h"; sourceTree = "<group>"; };
 		DD9FBE761BAD6BB600FFE77A /* WKInterfaceController+VLCConnectionAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "WKInterfaceController+VLCConnectionAlert.m"; sourceTree = "<group>"; };
 		DD9FBE791BADA8E300FFE77A /* VLC WatchKit Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "VLC WatchKit Extension.entitlements"; sourceTree = "<group>"; };
+		DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = VLCMovieViewControlPanel.xib; path = Resources/VLCMovieViewControlPanel.xib; sourceTree = SOURCE_ROOT; };
+		DDAD5C2C1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCMovieViewControlPanelViewController.h; path = Sources/VLCMovieViewControlPanelViewController.h; sourceTree = SOURCE_ROOT; };
+		DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCMovieViewControlPanelViewController.m; path = Sources/VLCMovieViewControlPanelViewController.m; sourceTree = SOURCE_ROOT; };
 		DDB959411AFBB30500BB8CFF /* MappingModel_2_5_to_2_6.xcmappingmodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcmappingmodel; name = MappingModel_2_5_to_2_6.xcmappingmodel; path = ImportedSources/MediaLibraryKit/MappingModel_2_5_to_2_6.xcmappingmodel; sourceTree = "<group>"; };
 		DDC10BE21AEE8EA700890DC3 /* VLCTimeNavigationTitleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCTimeNavigationTitleView.h; path = Sources/VLCTimeNavigationTitleView.h; sourceTree = SOURCE_ROOT; };
 		DDC10BE31AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCTimeNavigationTitleView.m; path = Sources/VLCTimeNavigationTitleView.m; sourceTree = SOURCE_ROOT; };
@@ -1139,6 +1147,8 @@
 				7D9CB9DB1A4C55EF00BB74B4 /* VLCPlaybackNavigationController.m */,
 				DDC10BE21AEE8EA700890DC3 /* VLCTimeNavigationTitleView.h */,
 				DDC10BE31AEE8EA700890DC3 /* VLCTimeNavigationTitleView.m */,
+				DD1CB0581BBAC549006EDDE6 /* VLCVolumeView.h */,
+				DD1CB0591BBAC549006EDDE6 /* VLCVolumeView.m */,
 			);
 			name = "UI Elements";
 			sourceTree = "<group>";
@@ -1219,6 +1229,8 @@
 				7D5CAA8B1A4AD8E5003F2CBC /* VLCTrackSelectorHeaderView.m */,
 				7D1276601AADA0E600F0260C /* VLCMultiSelectionMenuView.h */,
 				7D1276611AADA0E600F0260C /* VLCMultiSelectionMenuView.m */,
+				DDAD5C2C1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.h */,
+				DDAD5C2D1BB9A1E6006AFD3B /* VLCMovieViewControlPanelViewController.m */,
 			);
 			name = Playback;
 			sourceTree = "<group>";
@@ -1427,6 +1439,7 @@
 				7D6BEF1D19E027A100DF3972 /* Cloud */,
 				7D6BEF1F19E027DA00DF3972 /* Download & Network */,
 				7D6BEF1E19E027BE00DF3972 /* Library */,
+				DDAD5C2A1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib */,
 				7DBBF190183AB4300009A339 /* VLCMovieViewController~ipad.xib */,
 				7DBBF191183AB4300009A339 /* VLCMovieViewController~iphone.xib */,
 				7D27EB9319DEE11900EF0370 /* Launch Screen.xib */,
@@ -1991,6 +2004,7 @@
 				7D2AC5D11B67746700A8D9DD /* LiveAuthDialog_iPhone.xib in Resources */,
 				7D27EC2B19DF310300EF0370 /* VLCFirstStepsSecondPageViewController~ipad.xib in Resources */,
 				7DBBF1A0183AB4300009A339 /* VLCPlaylistCollectionViewCell.xib in Resources */,
+				DDAD5C2B1BB999CA006AFD3B /* VLCMovieViewControlPanel.xib in Resources */,
 				7D711ADA18227A490094E4F0 /* GTMOAuth2ViewTouch.xib in Resources */,
 				417CDA241A48D1F300D9ACE7 /* VLCCloudServicesTableViewController.xib in Resources */,
 				7D9870671A3E03D5009CF27D /* papasscode_failed_bg@2x.png in Resources */,
@@ -2077,6 +2091,7 @@
 				4144C4661A0ED6C700918C89 /* Reachability.m in Sources */,
 				4184AA151A5492070063DF5A /* VLCCloudStorageController.m in Sources */,
 				9BE4D1CE183D76950006346C /* VLCCloudStorageTableViewCell.m in Sources */,
+				DD1CB0321BB9E005006EDDE6 /* VLCMovieViewControlPanelViewController.m in Sources */,
 				2915540117490A1E00B86CAD /* DDData.m in Sources */,
 				2915540217490A1E00B86CAD /* DDNumber.m in Sources */,
 				7D92897A1877467E009108FD /* VLCFirstStepsFourthPageViewController.m in Sources */,
@@ -2165,6 +2180,7 @@
 				41273A3C1A955C4100A2EF77 /* VLCMigrationViewController.m in Sources */,
 				7D30F3C4183AB24C00FFC021 /* VLCHTTPUploaderController.m in Sources */,
 				7D30F3C7183AB26F00FFC021 /* VLCOpenNetworkStreamViewController.m in Sources */,
+				DD1CB05A1BBAC549006EDDE6 /* VLCVolumeView.m in Sources */,
 				7D5CAA8C1A4AD8E5003F2CBC /* VLCTrackSelectorHeaderView.m in Sources */,
 				4171D35018A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m in Sources */,
 				7D30F3CA183AB27A00FFC021 /* VLCDownloadViewController.m in Sources */,