apple-tv

Airplay on new Apple TV (3rd gen.) for second screen not at 1080p

大兔子大兔子 提交于 2019-12-01 22:09:12
I am working on an app that uses Airplay mirroring for a second display that has different content to the iPad itself. I'm using an iPad3 and ATV3 (i.e. released March 2012) attached to an LCD capable of 1920x1080 via HDMI. With Airplay mirroring, the second screen's UIScreen is available through [UIScreen screens] array. I was able to get rid of the black borders by setting overscanCompensation to 3 but I can only display a 1280x720 image. The monitor is working at 1920x1080 (i.e. checked in its menu, set to "Just Scan", and the rest of Apple TV interface is at 1080p). When I return the

Disable AirPlay with MPMoviePlayerController

你说的曾经没有我的故事 提交于 2019-12-01 03:36:26
I have an instance of a MPMoviePlayerController which is being used to display some live streaming video on an iPhone app. This is working fine, however I wish to remove all AirPlay functionality. To be sure, I specifically disable AirPlay like so: if([self.moviePlayerController respondsToSelector:@selector(setAllowsAirPlay:)]) { self.moviePlayerController.allowsAirPlay = NO; } However, even with this code, I still see the AirPlay icon on the video controls. If I select this, and select my AppleTV, only the audio is sent over AirPlay - the video continues to play within the app. If I set

YUV to RGBA on Apple A4, should I use shaders or NEON?

匆匆过客 提交于 2019-11-30 10:17:05
问题 I'm writing media player framework for Apple TV, using OpenGL ES and ffmpeg. Conversion to RGBA is required for rendering on OpenGL ES, soft convert using swscale is unbearably slow, so using information on the internet I came up with two ideas: using neon (like here) or using fragment shaders and GL_LUMINANCE and GL_LUMINANCE_ALPHA. As I know almost nothing about OpenGL, the second option still doesn't work :) Can you give me any pointers how to proceed? Thank you in advance. 回答1: It is most

TVML vs Custom App for Apple TVOS

醉酒当歌 提交于 2019-11-30 06:53:11
Are there any advantage of using TVML over custom App (media based App not a game) for Apple TVOS? From what I read from Apple's documentation I could not figure out any such advantage (though it mostly talks about TVML/TVJs). For iOS (Swift, Objective C) developers, using custom seems like easier, faster and with more possibilities. I think whatever templates are provided by Apple can be build using UIKit because internally it is UIKit. Right? [Update] Let me rephrase my original question as the answers so far are not given any points in favour of custom App. I agree that @shirefriendship has

How do I play a video on tvOS for Apple TV?

99封情书 提交于 2019-11-29 22:23:06
I started a blank tvOS project and created the following code: - (void)viewDidLoad { [super viewDidLoad]; AVPlayer *avPlayer = [AVPlayer playerWithURL:[NSURL URLWithString:@"http://www.myurl.com/myvideo.mp4"]]; AVPlayerLayer *avPlayerLayer = [AVPlayerLayer playerLayerWithPlayer:avPlayer]; avPlayerLayer.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); [self.view.layer addSublayer:avPlayerLayer]; [avPlayer play]; } Nothing happens in the simulator though once the app loads. No video, nothing, just a blank translucent screen in my Apple TV simulator. What's the

Use iPhone as a game controller in a tvOS app?

放肆的年华 提交于 2019-11-29 21:34:11
During the Apple TV announcement, the developers of Crossy Road demonstrated using an iPhone as a 2nd controller for an Apple tv game: http://www.macrumors.com/2015/09/09/cooperative-play-for-crossy-road/ My first thought was to implement this using the Multipeer Connectivity Framework . However, it's not supported on tvOS. Is there a good way to connect an iPhone to an Apple TV without Multipeer Connectivity? Update: It doesn't appear that I can use GameKit because GKPeerPickerController has been removed from GameKit on tvOS. vivianaranha You can try my library. I built this for my apps maybe

YUV to RGBA on Apple A4, should I use shaders or NEON?

最后都变了- 提交于 2019-11-29 20:08:43
I'm writing media player framework for Apple TV, using OpenGL ES and ffmpeg. Conversion to RGBA is required for rendering on OpenGL ES, soft convert using swscale is unbearably slow, so using information on the internet I came up with two ideas: using neon (like here ) or using fragment shaders and GL_LUMINANCE and GL_LUMINANCE_ALPHA. As I know almost nothing about OpenGL, the second option still doesn't work :) Can you give me any pointers how to proceed? Thank you in advance. It is most definitely worthwhile learning OpenGL ES2.0 shaders: You can load-balance between the GPU and CPU (e.g.

TVML vs Custom App for Apple TVOS

大憨熊 提交于 2019-11-29 07:34:07
问题 Are there any advantage of using TVML over custom App (media based App not a game) for Apple TVOS? From what I read from Apple's documentation I could not figure out any such advantage (though it mostly talks about TVML/TVJs). For iOS (Swift, Objective C) developers, using custom seems like easier, faster and with more possibilities. I think whatever templates are provided by Apple can be build using UIKit because internally it is UIKit. Right? [Update] Let me rephrase my original question as

UICollectionViewCell to UIButton Focus in tvOS

最后都变了- 提交于 2019-11-28 23:35:30
I have a UICollectionView which contains 12-13 UICollectionViewCells. I can easily focus on the UICollectionViewCells and everything works. There is a UIButton outside the UICollectionView. If I am on the first cell or the second cell and I swipe up then I can easily focus on the UIButton. When I am on the third cell then I am not able to move the focus to the UIButton. Any ideas what is going on? You should use a UIFocusGuide that encompasses the UIButton you want to focus. Make the UIFocusGuide as wide as the collectionView and tall enough to cover the button. Make the preferredFocusView the

Display one thing on iPad and another on Apple Tv?

依然范特西╮ 提交于 2019-11-28 19:53:50
I have an app idea, but I'm not sure if it's possible. I was wondering if I'm able to display one thing on the iPad ( or iPhone ) screen, and something totally different on the Apple Tv at the same time. For example, a quiz app, where the question is displayed on the Apple Tv, and the multiple choices are listed on the iPad for the user to pick. I'm not sure if this is possible or if you can only Mirror the iPad screen onto the Apple Tv. If there is some "Proof of Concept" example code, I'd love to take a look. Thank you so much. Chris Turns out that is is pretty simple to support two screens: