Can now stream to tvOS

This commit is contained in:
Diego Waxemberg 2018-08-26 11:31:20 -07:00
parent 485dd4b001
commit f5b99b6b9c
3 changed files with 12 additions and 2 deletions

View File

@ -76,7 +76,7 @@
}
}
#if TARGET_OS_IPHONE
#if TARGET_OS_IPHONE && !TARGET_OS_TV
// Set mouse delta factors from the screen resolution and stream size
CGFloat screenScale = [[UIScreen mainScreen] scale];
CGRect screenBounds = [[UIScreen mainScreen] bounds];

View File

@ -26,7 +26,9 @@
{
[super viewDidAppear:animated];
#if !TARGET_OS_TV
[[self revealViewController] setPrimaryViewController:self];
#endif
}
- (void)viewDidLoad
@ -139,7 +141,9 @@
// Leave the spinner spinning until it's obscured by
// the first frame of video.
self.stageLabel.hidden = YES;
#if !TARGET_OS_TV
[(StreamView*)self.view setupOnScreenControls: self->_controllerSupport swipeDelegate:self];
#endif
});
}
@ -231,6 +235,7 @@
// Dispose of any resources that can be recreated.
}
#if !TARGET_OS_TV
// Require a confirmation when streaming to activate a system gesture
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
return UIRectEdgeAll;
@ -239,4 +244,6 @@
- (BOOL)shouldAutorotate {
return YES;
}
#endif
@end

View File

@ -55,10 +55,13 @@
</connections>
</collectionView>
<navigationItem key="navigationItem" id="4ja-Go-cNV"/>
<connections>
<segue destination="YUB-6u-B7f" kind="show" identifier="createStreamFrame" id="7lZ-Tj-a6a"/>
</connections>
</collectionViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="A1O-fY-fMS" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-201" y="-2444"/>
<point key="canvasLocation" x="-650" y="-1869"/>
</scene>
<!--Loading Frame View Controller-->
<scene sceneID="lqn-qp-p7w">