Commit 857f410d authored by Carola Nitz's avatar Carola Nitz

VLCMovieViewcontroller: move navigationbar into Movieviewcontroller to use...

VLCMovieViewcontroller: move navigationbar into Movieviewcontroller to use autolayoutconstraints and use the presenting navigationbar instead of creating a new one. This removes a lot of unnecessary code and fixes an issue where the navigation bar was colliding with the statusbar (closes #34)
parent 529bf307
Pipeline #123 failed with stage
in 0 seconds
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="13178.6" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" colorMatched="YES">
<device id="ipad9_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13156.2"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -17,7 +17,6 @@
<outlet property="audioDelayIndicator" destination="FYO-Rd-Vjg" id="FVE-DI-BJ2"/>
<outlet property="audioDelayLabel" destination="bQc-dz-mB8" id="69P-Q3-3l3"/>
<outlet property="audioDelaySlider" destination="ahb-li-nqH" id="tQp-Zu-Sqd"/>
<outlet property="backButton" destination="102" id="111"/>
<outlet property="brightnessLabel" destination="148" id="165"/>
<outlet property="brightnessSlider" destination="147" id="163"/>
<outlet property="contrastLabel" destination="146" id="160"/>
......@@ -45,97 +44,12 @@
<outlet property="spuDelayLabel" destination="NX8-Zc-K6Y" id="WLd-cA-fUn"/>
<outlet property="spuDelaySlider" destination="juX-HR-PqD" id="x4D-ki-Lwk"/>
<outlet property="statusLabel" destination="205" id="206"/>
<outlet property="timeNavigationTitleView" destination="248" id="Ghx-eD-EQA"/>
<outlet property="toolbar" destination="256" id="260"/>
<outlet property="trackNameLabel" destination="304" id="307"/>
<outlet property="videoFilterView" destination="141" id="156"/>
<outlet property="view" destination="8" id="120"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<barButtonItem systemItem="done" id="102">
<connections>
<action selector="closePlayback:" destination="-1" id="134"/>
</connections>
</barButtonItem>
<view contentMode="scaleToFill" id="248" userLabel="Time view" customClass="VLCTimeNavigationTitleView">
<rect key="frame" x="0.0" y="0.0" width="700" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<slider opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" id="249" userLabel="Position Slider" customClass="VLCOBSlider">
<rect key="frame" x="60" y="6" width="509" height="29"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" updatesFrequently="YES"/>
</accessibility>
<connections>
<action selector="positionSliderAction:" destination="-1" eventType="valueChanged" id="255"/>
<action selector="positionSliderDrag:" destination="-1" eventType="touchDragOutside" id="252"/>
<action selector="positionSliderDrag:" destination="-1" eventType="touchDragInside" id="253"/>
<action selector="positionSliderTouchDown:" destination="-1" eventType="touchDown" id="250"/>
<action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpInside" id="251"/>
<action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpOutside" id="254"/>
</connections>
</slider>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="198">
<rect key="frame" x="642" y="6" width="50" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" image="ratioIcon.png">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="203"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="300">
<rect key="frame" x="571" y="6" width="66" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" title="--:--">
<color key="titleColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="toggleTimeDisplay:" destination="-1" eventType="touchUpInside" id="301"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Fcw-5o-IdE">
<rect key="frame" x="10" y="11" width="30" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" image="minimizePlayback">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="minimizePlayback:" destination="-1" eventType="touchUpInside" id="jj8-Gc-Fqn"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="aspectRatioButton" destination="198" id="4dl-xe-M16"/>
<outlet property="minimizePlaybackButton" destination="Fcw-5o-IdE" id="s26-45-f9b"/>
<outlet property="positionSlider" destination="249" id="rvZ-Lz-yG8"/>
<outlet property="timeDisplayButton" destination="300" id="t3c-hv-XjU"/>
</connections>
</view>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="8">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
......@@ -175,18 +89,6 @@
<bool key="isElement" value="YES"/>
</accessibility>
</view>
<navigationBar contentMode="scaleToFill" barStyle="blackTranslucent" id="256">
<rect key="frame" x="0.0" y="18" width="768" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<items>
<navigationItem title="Title" id="257">
<connections>
<outlet property="leftBarButtonItem" destination="102" id="258"/>
<outlet property="titleView" destination="248" id="259"/>
</connections>
</navigationItem>
</items>
</navigationBar>
<view hidden="YES" contentMode="scaleToFill" id="242" userLabel="Scrubbing info" customClass="VLCFrostedGlasView">
<rect key="frame" x="0.0" y="63" width="768" height="46"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
......@@ -439,8 +341,6 @@
</objects>
<resources>
<image name="PlayingExternally.png" width="261" height="195"/>
<image name="minimizePlayback" width="15" height="5"/>
<image name="ratioIcon.png" width="15" height="15"/>
<image name="resetIcon.png" width="24" height="30"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13178.6" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13156.2"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -17,7 +17,6 @@
<outlet property="audioDelayIndicator" destination="SDv-JW-DMi" id="Krq-0k-T6o"/>
<outlet property="audioDelayLabel" destination="8cb-fw-YeF" id="KWQ-n9-3mr"/>
<outlet property="audioDelaySlider" destination="oQe-Uu-1HY" id="6Me-OE-Dpl"/>
<outlet property="backButton" destination="85" id="96"/>
<outlet property="brightnessLabel" destination="130" id="233"/>
<outlet property="brightnessSlider" destination="128" id="232"/>
<outlet property="contrastLabel" destination="132" id="141"/>
......@@ -45,97 +44,12 @@
<outlet property="spuDelayLabel" destination="KeW-Xp-9I6" id="LMS-pz-Ajj"/>
<outlet property="spuDelaySlider" destination="JRI-0m-C0M" id="f8j-Iq-sH3"/>
<outlet property="statusLabel" destination="210" id="211"/>
<outlet property="timeNavigationTitleView" destination="260" id="gcy-M6-dw8"/>
<outlet property="toolbar" destination="250" id="272"/>
<outlet property="trackNameLabel" destination="282" id="284"/>
<outlet property="videoFilterView" destination="117" id="147"/>
<outlet property="view" destination="1" id="105"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="260" userLabel="Time view" customClass="VLCTimeNavigationTitleView">
<rect key="frame" x="0.0" y="0.0" width="300" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<slider opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" id="262" userLabel="Position Slider" customClass="VLCOBSlider">
<rect key="frame" x="44" y="7" width="148" height="29"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" updatesFrequently="YES"/>
</accessibility>
<connections>
<action selector="positionSliderAction:" destination="-1" eventType="valueChanged" id="263"/>
<action selector="positionSliderDrag:" destination="-1" eventType="touchDragInside" id="266"/>
<action selector="positionSliderDrag:" destination="-1" eventType="touchDragOutside" id="268"/>
<action selector="positionSliderTouchDown:" destination="-1" eventType="touchDown" id="267"/>
<action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpOutside" id="264"/>
<action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpInside" id="265"/>
</connections>
</slider>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="202">
<rect key="frame" x="241" y="6" width="59" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" image="ratioIcon.png">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="221"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="276">
<rect key="frame" x="195" y="7" width="52" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" title="--:--">
<color key="titleColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="toggleTimeDisplay:" destination="-1" eventType="touchUpInside" id="278"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="1XT-gb-oGz">
<rect key="frame" x="8" y="11" width="30" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" image="minimizePlayback">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="minimizePlayback:" destination="-1" eventType="touchUpInside" id="LBk-8c-yjG"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="aspectRatioButton" destination="202" id="IWW-5X-Bf0"/>
<outlet property="minimizePlaybackButton" destination="1XT-gb-oGz" id="BAx-Rb-ayD"/>
<outlet property="positionSlider" destination="262" id="UPM-uz-5Ix"/>
<outlet property="timeDisplayButton" destination="276" id="xvv-Ga-gWA"/>
</connections>
</view>
<barButtonItem systemItem="done" id="85">
<connections>
<action selector="closePlayback:" destination="-1" id="89"/>
</connections>
</barButtonItem>
<view contentMode="scaleToFill" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
......@@ -231,18 +145,6 @@
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.60999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<navigationBar contentMode="scaleToFill" barStyle="blackTranslucent" id="250">
<rect key="frame" x="0.0" y="18" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<items>
<navigationItem title="Title" id="261">
<connections>
<outlet property="leftBarButtonItem" destination="85" id="270"/>
<outlet property="titleView" destination="260" id="271"/>
</connections>
</navigationItem>
</items>
</navigationBar>
<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"/>
......@@ -440,8 +342,6 @@
</objects>
<resources>
<image name="PlayingExternally.png" width="122" height="91"/>
<image name="minimizePlayback" width="15" height="5"/>
<image name="ratioIcon.png" width="15" height="15"/>
<image name="resetIcon.png" width="24" height="30"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13189.4" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13165.3"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCMovieViewController">
<connections>
<outlet property="timeNavigationTitleView" destination="SbC-6V-aXT" id="6H3-z2-IYF"/>
<outlet property="widthConstraint" destination="dEx-l7-vH3" id="XHq-1C-HCh"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="SbC-6V-aXT" userLabel="Time view" customClass="VLCTimeNavigationTitleView">
<rect key="frame" x="0.0" y="0.0" width="700" height="40"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Sdb-a5-RTT">
<rect key="frame" x="662" y="5" width="30" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="Ap6-VL-6UH"/>
<constraint firstAttribute="width" constant="30" id="dEx-l7-vH3"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" image="ratioIcon.png">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="videoDimensionAction:" destination="-1" eventType="touchUpInside" id="evk-ak-iUc"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x1t-3m-s0G">
<rect key="frame" x="618" y="5" width="44" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="fv5-Cp-MOv"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" title="--:--">
<color key="titleColor" red="0.74659199620000005" green="0.74659199620000005" blue="0.74659199620000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="toggleTimeDisplay:" destination="-1" eventType="touchUpInside" id="EMV-R7-M8p"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SBq-Am-6MD">
<rect key="frame" x="0.0" y="11" width="30" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="kLC-QM-zcI"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<inset key="contentEdgeInsets" minX="5" minY="0.0" maxX="5" maxY="0.0"/>
<state key="normal" image="minimizePlayback">
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<state key="highlighted">
<color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="minimizePlayback:" destination="-1" eventType="touchUpInside" id="wmf-OK-ep3"/>
</connections>
</button>
<slider opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" insetsLayoutMarginsFromSafeArea="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="axb-6M-lSX" userLabel="Position Slider" customClass="VLCOBSlider">
<rect key="frame" x="28" y="5" width="584" height="31"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" updatesFrequently="YES"/>
</accessibility>
<connections>
<action selector="positionSliderAction:" destination="-1" eventType="valueChanged" id="7eD-p7-L4J"/>
<action selector="positionSliderDrag:" destination="-1" eventType="touchDragInside" id="MjW-el-bCi"/>
<action selector="positionSliderDrag:" destination="-1" eventType="touchDragOutside" id="XGm-Pc-lSQ"/>
<action selector="positionSliderTouchDown:" destination="-1" eventType="touchDown" id="Uv4-iS-P3y"/>
<action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpInside" id="dhA-x8-HoE"/>
<action selector="positionSliderTouchUp:" destination="-1" eventType="touchUpOutside" id="f6i-U3-Qv6"/>
</connections>
</slider>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Sdb-a5-RTT" firstAttribute="leading" secondItem="x1t-3m-s0G" secondAttribute="trailing" id="1fD-hg-Y99"/>
<constraint firstItem="Sdb-a5-RTT" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="9Tz-Di-uIS"/>
<constraint firstItem="axb-6M-lSX" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="dZG-UA-csl"/>
<constraint firstItem="SBq-Am-6MD" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="eoy-59-SkO"/>
<constraint firstItem="axb-6M-lSX" firstAttribute="trailing" secondItem="x1t-3m-s0G" secondAttribute="leading" constant="-8" id="l05-q4-Dha"/>
<constraint firstItem="x1t-3m-s0G" firstAttribute="centerY" secondItem="SbC-6V-aXT" secondAttribute="centerY" id="mIZ-5x-1r6"/>
<constraint firstItem="SBq-Am-6MD" firstAttribute="leading" secondItem="SbC-6V-aXT" secondAttribute="leading" id="mf3-NF-cwy"/>
<constraint firstAttribute="trailing" secondItem="Sdb-a5-RTT" secondAttribute="trailing" constant="8" id="uI1-3o-gyT"/>
<constraint firstItem="axb-6M-lSX" firstAttribute="leading" secondItem="SBq-Am-6MD" secondAttribute="trailing" id="zQP-Wv-QPC"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="aspectRatioButton" destination="Sdb-a5-RTT" id="H3u-Yv-6na"/>
<outlet property="minimizePlaybackButton" destination="SBq-Am-6MD" id="LsO-JQ-mjt"/>
<outlet property="positionSlider" destination="axb-6M-lSX" id="UIA-jE-MfS"/>
<outlet property="timeDisplayButton" destination="x1t-3m-s0G" id="82s-l3-eg0"/>
</connections>
<point key="canvasLocation" x="-334" y="284"/>
</view>
</objects>
<resources>
<image name="minimizePlayback" width="15" height="5"/>
<image name="ratioIcon.png" width="16" height="16"/>
</resources>
</document>
......@@ -31,11 +31,8 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
@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 *sleepTimerButton;
@property (nonatomic, strong) IBOutlet UINavigationBar *toolbar;
@property (nonatomic, strong) IBOutlet VLCMovieViewControlPanelView *controllerPanel;
@property (nonatomic, strong) IBOutlet VLCStatusLabel *statusLabel;
@property (nonatomic, strong) IBOutlet UIView *playingExternallyView;
......@@ -74,6 +71,7 @@ typedef NS_ENUM(NSInteger, VLCMovieJumpState) {
@property (nonatomic, strong) IBOutlet UILabel *albumNameLabel;
@property (nonatomic, strong) IBOutlet UILabel *trackNameLabel;
@property (nonatomic, strong) IBOutlet UIImageView *artworkImageView;
@property (nonatomic, strong) IBOutlet NSLayoutConstraint *widthConstraint;
- (IBAction)closePlayback:(id)sender;
- (IBAction)minimizePlayback:(id)sender;
......
......@@ -115,7 +115,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
CGPoint _saveLocation;
CGSize _screenSizePixel;
}
@property (nonatomic, strong) VLCMovieViewControlPanelView *controllerPanel;
@property (nonatomic, strong) UIPopoverController *masterPopoverController;
@property (nonatomic, strong) UIWindow *externalWindow;
@end
......@@ -177,7 +177,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
self.playbackSpeedView.hidden = YES;
_playbackSpeedViewHidden = YES;
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(handleExternalScreenDidConnect:)
name:UIScreenDidConnectNotification object:nil];
......@@ -209,17 +208,9 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
_previousJumpState = VLCMovieJumpStateDefault;
_numberOfTapSeek = 0;
self.backButton.tintColor = [UIColor colorWithRed:(190.0f/255.0f) green:(190.0f/255.0f) blue:(190.0f/255.0f) alpha:1.];
self.toolbar.tintColor = [UIColor whiteColor];
self.toolbar.barStyle = UIBarStyleBlack;
rect = self.resetVideoFilterButton.frame;
rect.origin.y = rect.origin.y + 5.;
self.resetVideoFilterButton.frame = rect;
rect = self.toolbar.frame;
rect.size.height = rect.size.height + rect.origin.y;
rect.origin.y = 0;
self.toolbar.frame = rect;
_playerIsSetup = NO;
......@@ -254,6 +245,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
_saveLocation = CGPointMake(-1.f, -1.f);
[self setupConstraints];
}
- (void)setupGestureRecognizers
......@@ -361,20 +353,45 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
[NSLayoutConstraint constraintWithItem:_trackSelectorContainer attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationLessThanOrEqual toItem:self.view attribute:NSLayoutAttributeHeight multiplier:2.0/3.0 constant:0],
];
[NSLayoutConstraint activateConstraints:constraints];
}
- (void)setupNavigationbar
{
UIButton *doneButton = [[UIButton alloc] initWithFrame:CGRectZero];
[doneButton addTarget:self action:@selector(closePlayback:) forControlEvents:UIControlEventTouchUpInside];
[doneButton setTitle:NSLocalizedString(@"BUTTON_DONE", nil) forState:UIControlStateNormal];
doneButton.translatesAutoresizingMaskIntoConstraints = NO;
self.timeNavigationTitleView = [[[NSBundle mainBundle] loadNibNamed:@"VLCTimeNavigationTitleView" owner:self options:nil] objectAtIndex:0];
self.timeNavigationTitleView.translatesAutoresizingMaskIntoConstraints = NO;
[self.navigationController.navigationBar addSubview:self.timeNavigationTitleView];
[self.navigationController.navigationBar addSubview:doneButton];
[NSLayoutConstraint activateConstraints: @[
[NSLayoutConstraint constraintWithItem:doneButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeLeft multiplier:1 constant:8],
[NSLayoutConstraint constraintWithItem:doneButton attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeCenterY multiplier:1 constant:0],
[NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:doneButton attribute:NSLayoutAttributeRight multiplier:1 constant:0],
[NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeRight multiplier:1 constant:0],
[NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeTop multiplier:1 constant:0],
[NSLayoutConstraint constraintWithItem:self.timeNavigationTitleView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.navigationController.navigationBar attribute:NSLayoutAttributeBottom multiplier:1 constant:0],
]];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
[self setupNavigationbar];
/* reset audio meta data views */
self.artworkImageView.image = nil;
self.trackNameLabel.text = nil;
self.artistNameLabel.text = nil;
self.albumNameLabel.text = nil;
[self.navigationController setNavigationBarHidden:YES animated:animated];
_vpc = [VLCPlaybackController sharedInstance];
_vpc.delegate = self;
[_vpc recoverPlaybackState];
......@@ -383,7 +400,6 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
[self setControlsHidden:NO animated:animated];
[self updateDefaults];
[NSUserDefaults standardUserDefaults];
//Disabling video gestures, media not init in the player yet.
[self enableNormalVideoGestures:NO];
......@@ -411,6 +427,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
}
[self enableNormalVideoGestures:!_mediaHasProjection];
}
- (void)viewDidLayoutSubviews
......@@ -457,7 +474,7 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
[_idleTimer invalidate];
_idleTimer = nil;
}
[self.navigationController setNavigationBarHidden:NO animated:YES];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];
[super viewWillDisappear:animated];
......@@ -625,10 +642,10 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
CGFloat alpha = _controlsHidden? 0.0f: 1.0f;
if (!_controlsHidden) {
self.navigationController.navigationBar.alpha = 0.0;
self.navigationController.navigationBar.hidden = NO;
_controllerPanel.alpha = 0.0f;
_controllerPanel.hidden = !_videoFiltersHidden;
_toolbar.alpha = 0.0f;
_toolbar.hidden = NO;
_videoFilterView.alpha = 0.0f;
_videoFilterView.hidden = _videoFiltersHidden;
_playbackSpeedView.alpha = 0.0f;
......@@ -650,8 +667,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
}
void (^animationBlock)() = ^() {
self.navigationController.navigationBar.alpha = alpha;
_controllerPanel.alpha = alpha;
_toolbar.alpha = alpha;
_videoFilterView.alpha = alpha;
_playbackSpeedView.alpha = alpha;
_trackSelectorContainer.alpha = alpha;
......@@ -668,9 +685,9 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
void (^completionBlock)(BOOL finished) = ^(BOOL finished) {
_controllerPanel.hidden = _videoFiltersHidden ? _controlsHidden : NO;
_toolbar.hidden = _controlsHidden;
_videoFilterView.hidden = _videoFiltersHidden;
_playbackSpeedView.hidden = _playbackSpeedViewHidden;
self.navigationController.navigationBar.hidden = _controlsHidden;
_trackSelectorContainer.hidden = YES;
_equalizerView.hidden = YES;
if (_sleepTimerContainer)
......@@ -972,6 +989,15 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
[self.statusLabel showStatusMessage:statusMessage];
}
- (void)hideShowAspectratioButton:(BOOL)hide
{
[UIView animateWithDuration:.3
animations:^{
self.widthConstraint.constant = hide ? 0 : 30;
self.timeNavigationTitleView.aspectRatioButton.hidden = hide;
}];
}
- (void)displayMetadataForPlaybackController:(VLCPlaybackController *)controller
title:(NSString *)title
artwork:(UIImage *)artwork
......@@ -990,9 +1016,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
} else
self.artistNameLabel.text = self.albumNameLabel.text = nil;
self.timeNavigationTitleView.hideAspectRatio = audioOnly;
self.timeNavigationTitleView.positionSlider.hidden = NO;
[self hideShowAspectratioButton:audioOnly];
[_controllerPanel updateButtons];
_audioOnly = audioOnly;
......@@ -1039,7 +1063,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
if (!_controlsHidden) {
self.controllerPanel.hidden = _controlsHidden = YES;
self.toolbar.hidden = YES;
self.navigationController.navigationBar.hidden = YES;
}
}
......@@ -1156,7 +1180,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
_interfaceIsLocked = !_interfaceIsLocked;
_multiSelectionView.displayLock = _interfaceIsLocked;
self.backButton.enabled = !_interfaceIsLocked;
}
- (void)toggleEqualizer
......@@ -1170,7 +1193,7 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
if (!_controlsHidden) {
self.controllerPanel.hidden = _controlsHidden = YES;
self.toolbar.hidden = YES;
self.navigationController.navigationBar.hidden = YES;
}
}
......
......@@ -938,7 +938,7 @@ VLCMediaDelegate>
{
if (_needsMetadataUpdate == NO) {
_needsMetadataUpdate = YES;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[self _updateDisplayedMetadata];
});
}
......
......@@ -15,10 +15,6 @@
#import "VLCMovieViewController.h"
#endif
@interface VLCPlaybackNavigationController ()
@end
@implementation VLCPlaybackNavigationController
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
......
......@@ -248,24 +248,20 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
- (void)_presentFullscreenPlaybackViewIfNeeded
{
if (![NSThread isMainThread]) {
[self performSelectorOnMainThread:@selector(_presentFullscreenPlaybackViewIfNeeded) withObject:nil waitUntilDone:NO];
return;
}
if (!self.movieViewController.presentingViewController) {
[self _presentMovieViewControllerAnimated:[self shouldAnimate]];
}
dispatch_async(dispatch_get_main_queue(), ^{
if (!self.movieViewController.presentingViewController) {
[self _presentMovieViewControllerAnimated:[self shouldAnimate]];
}
});
}
- (void)_closeFullscreenPlayback
{
if (![NSThread isMainThread]) {
[self performSelectorOnMainThread:@selector(_closeFullscreenPlayback) withObject:nil waitUntilDone:NO];
return;
}
BOOL animated = [self shouldAnimate];
[self.movieViewController dismissViewControllerAnimated:animated completion:nil];
[self _showHideMiniPlaybackView];
dispatch_async(dispatch_get_main_queue(), ^{