Commit c3869d99 authored by Tobias's avatar Tobias

make play pause in player work

parent ef5bfca1
......@@ -43,6 +43,10 @@
self.titleLabel.text = self.remainingTimeLabel.text = self.playedTimeLabel.text = @"";
self.playbackProgressView.progress = .0;
self.bottomOverlayView.hidden = YES;
UITapGestureRecognizer *playpauseGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(playPausePressed)];
playpauseGesture.allowedPressTypes = @[@(UIPressTypePlayPause)];
[self.view addGestureRecognizer:playpauseGesture];
}
#pragma mark - view events
......@@ -91,6 +95,13 @@
return YES;
}
#pragma mark - UIActions
- (void) playPausePressed
{
VLCPlaybackController *vpc = [VLCPlaybackController sharedInstance];
[vpc playPause];
}
#pragma mark - playback controller delegation
- (void)prepareForMediaPlayback:(VLCPlaybackController *)controller
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9058" systemVersion="14F1017" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9048"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCFullscreenMovieTVViewController">
......@@ -18,18 +18,20 @@
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="VLCPlaybackControlsFocusView">
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SpU-aa-czI">
<rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
<animations/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please wait" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yaX-qU-D4t">
<rect key="frame" x="815" y="506" width="289" height="69"/>
<animations/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SzB-KN-vRr" customClass="VLCFrostedGlasView">
......@@ -37,26 +39,31 @@
<subviews>
<progressView opaque="NO" contentMode="scaleToFill" semanticContentAttribute="playback" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="b0E-Da-d7m">
<rect key="frame" x="200" y="95" width="1520" height="10"/>
<animations/>
</progressView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" semanticContentAttribute="playback" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qph-m8-iCR">
<rect key="frame" x="200" y="59" width="57" height="28"/>
<animations/>
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption2"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" semanticContentAttribute="playback" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rIg-pG-JWA">
<rect key="frame" x="1663" y="59" width="57" height="28"/>
<animations/>
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption2"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="epY-iV-5FH">
<rect key="frame" x="890" y="18" width="140" height="69"/>
<animations/>
<fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/>
<color key="textColor" cocoaTouchSystemColor="lightTextColor"/>
<color key="textColor" red="1" green="1" blue="1" alpha="0.59999999999999998" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<animations/>
<constraints>
<constraint firstItem="b0E-Da-d7m" firstAttribute="top" secondItem="Qph-m8-iCR" secondAttribute="bottom" constant="8" id="4qM-OU-y9L"/>
<constraint firstItem="rIg-pG-JWA" firstAttribute="trailing" secondItem="b0E-Da-d7m" secondAttribute="trailing" id="5Uf-62-xBp"/>
......
//
// VLCPlaybackControlsFocusView.h
// VLC for iOS
//
// Created by Tobias Conradi on 28.10.15.
// Copyright © 2015 VideoLAN. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface VLCPlaybackControlsFocusView : UIView
@end
//
// VLCPlaybackControlsFocusView.m
// VLC for iOS
//
// Created by Tobias Conradi on 28.10.15.
// Copyright © 2015 VideoLAN. All rights reserved.
//
#import "VLCPlaybackControlsFocusView.h"
@implementation VLCPlaybackControlsFocusView
- (BOOL)canBecomeFocused {
return YES;
}
@end
......@@ -275,6 +275,7 @@
DD3567F91B6768FC00338947 /* WKInterfaceObject+VLCProgress.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3567EE1B6768FC00338947 /* WKInterfaceObject+VLCProgress.m */; };
DD3EA6311AF50CFE007FF096 /* VLCWatchMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EA6301AF50CFE007FF096 /* VLCWatchMessage.m */; };
DD3EABE91BE13D5B003668DA /* VLCServerBrowsingTVCell.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EABE81BE13D5B003668DA /* VLCServerBrowsingTVCell.m */; };
DD3EABEF1BE14720003668DA /* VLCPlaybackControlsFocusView.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EABEE1BE14720003668DA /* VLCPlaybackControlsFocusView.m */; };
DD3EFEED1BDEBA3800B68579 /* VLCNetworkServerBrowserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFEEA1BDEBA3800B68579 /* VLCNetworkServerBrowserViewController.m */; };
DD3EFEEE1BDEBA3800B68579 /* VLCServerListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFEEC1BDEBA3800B68579 /* VLCServerListViewController.m */; };
DD3EFF2D1BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserFTP.m in Sources */ = {isa = PBXBuildFile; fileRef = DD3EFEF21BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserFTP.m */; };
......@@ -912,6 +913,8 @@
DD3EA6301AF50CFE007FF096 /* VLCWatchMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCWatchMessage.m; sourceTree = "<group>"; };
DD3EABE71BE13D5B003668DA /* VLCServerBrowsingTVCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCServerBrowsingTVCell.h; sourceTree = "<group>"; };
DD3EABE81BE13D5B003668DA /* VLCServerBrowsingTVCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCServerBrowsingTVCell.m; sourceTree = "<group>"; };
DD3EABED1BE14720003668DA /* VLCPlaybackControlsFocusView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCPlaybackControlsFocusView.h; sourceTree = "<group>"; };
DD3EABEE1BE14720003668DA /* VLCPlaybackControlsFocusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCPlaybackControlsFocusView.m; sourceTree = "<group>"; };
DD3EFEE91BDEBA3800B68579 /* VLCNetworkServerBrowserViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCNetworkServerBrowserViewController.h; path = Sources/LocalNetworkConnectivity/VLCNetworkServerBrowserViewController.h; sourceTree = SOURCE_ROOT; };
DD3EFEEA1BDEBA3800B68579 /* VLCNetworkServerBrowserViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCNetworkServerBrowserViewController.m; path = Sources/LocalNetworkConnectivity/VLCNetworkServerBrowserViewController.m; sourceTree = SOURCE_ROOT; };
DD3EFEEB1BDEBA3800B68579 /* VLCServerListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCServerListViewController.h; path = Sources/LocalNetworkConnectivity/VLCServerListViewController.h; sourceTree = SOURCE_ROOT; };
......@@ -1848,6 +1851,8 @@
7DEC8BE51BD6889C006E1093 /* Playback */ = {
isa = PBXGroup;
children = (
DD3EABED1BE14720003668DA /* VLCPlaybackControlsFocusView.h */,
DD3EABEE1BE14720003668DA /* VLCPlaybackControlsFocusView.m */,
7DEC8BDB1BD67899006E1093 /* VLCFullscreenMovieTVViewController.h */,
7DEC8BDC1BD67899006E1093 /* VLCFullscreenMovieTVViewController.m */,
);
......@@ -2646,6 +2651,7 @@
DD3EFF461BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserManualConnect.m in Sources */,
7D13347F1BE132ED0012E919 /* VLCLocalNetworkServiceUPnP.m in Sources */,
DD3EFF4A1BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserPlex.m in Sources */,
DD3EABEF1BE14720003668DA /* VLCPlaybackControlsFocusView.m in Sources */,
7DEC8BED1BD68D6A006E1093 /* VLCAboutTVViewController.m in Sources */,
7DEC8BD81BD66DA8006E1093 /* VLCMiniPlaybackView.m in Sources */,
DD3EFF3A1BDEBCE500B68579 /* VLCLocalNetworkServiceVLCMedia.m in Sources */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment