apple-tv

Line Wrap description text in a compilationTemplate's relatedContent area in TVML

流过昼夜 提交于 2019-12-13 01:13:58
问题 How can I wrap the description text in the relatedContent area of a compilationTemplate ? My description tag: <description style="tv-text-style: none; font-size:36; font-weight:regular; word-wrap:break-word;">lorem ipsum dolor sit amet consectetur adipiscing elit</description> Full template: var Template = function() { return `<?xml version="1.0" encoding="UTF-8" ?> <document> <compilationTemplate theme="light"> <list> <relatedContent> <itemBanner> <heroImg src="${this.BASEURL}images/shows

How to implement Firebase Analytics implementation for AppleTV (tvOS)?

佐手、 提交于 2019-12-11 15:08:27
问题 Currently, we have implemented Google Analytics for AppleTV (tvOS) via Measurement Protocol i.e. using batch end point Google Analytics - Measurement Protocol. Now, Google Analytics is sunsetting. Alternative as suggested by Google is Google Analytics for Firebase. But, that implementation is for Mobile Platform. Does anybody know any workaround that I can use on Firebase Platform in order to report analytics from tvOS using some sort of Firebase API? 来源: https://stackoverflow.com/questions

Apple TV: don't show system keyboard

别等时光非礼了梦想. 提交于 2019-12-11 10:06:39
问题 I created a new single-view tvOS project and successfully hooked up a UITextField : import UIKit class ViewController: UIViewController { @IBAction func onChangeEditing(_ sender: UITextField) { NSLog("Editing changed: %@", sender.text!) } } As expected, I received log output on each key press, showing the currently entered text. I then tried to hide the on-screen keyboard: import UIKit class ViewController: UIViewController { @IBAction func onStartEditing(_ sender: UITextField) { // Hide the

How do you get the value from a TVML textField?

牧云@^-^@ 提交于 2019-12-11 03:33:42
问题 I am trying to figure out how to get the value from the textField in TVML using TVJS but I haven't found any documentation on it yet and I don't want to wait around for the documentation to be updated. There isn't really any patterns for binding to input since I'm sure this is a seldom use case other than logging into a service. I guess I could parse the Xml but that seems super hacky. 回答1: I ended up figuring it out myself. I had to use the callback from the select event object and then pass

indexPathForPreferredFocusedView is not being Called

蹲街弑〆低调 提交于 2019-12-10 16:48:08
问题 I need to specify which cell should receive focus. According to Apple Documentation the indexPathForPreferredFocusedView delegate method should be called if the remembersLastFocusedIndexPath property is false , or if there is no saved index path because no cell was previously focused. In my case I am using a collection view in a UIViewController and setting remembersLastFocusedIndexPath to false but indexPathForPreferredFocusedView is not being called. How explain this behaviour? 回答1: The

Why SCNPhysicsBody resets position when set eulerAngles?

人盡茶涼 提交于 2019-12-10 15:26:19
问题 I'm trying to use SceneKit to develop a game for tvOS, and I'm having an issue. When I set the node's eulerAngle before apply an impulse to the physicsBody the node is reset to his original position. I was expecting to see the nodes moving around on the floor's plane, but on each tap the nodes are moved to the origin position before the impulse is applied. I'm new at the use of this framework, so I wonder where is the mistake. I'm using the new AppleTV with tvOS 9.0 and XCode 7.1.1 To

Setting up Apple TV video JavaScript

本小妞迷上赌 提交于 2019-12-10 11:06:12
问题 I have a simple function that will launch the player that handles video playback for the Apple TV function launchPlayer() { var player = new Player(); var playlist = new Playlist(); var mediaItem = new MediaItem("video", "http://localhost:9001/videos/nsoperations.mp4"); player.playlist = playlist; player.playlist.push(mediaItem); player.present(); } According to the Player Documentation, all I needed to play a video back is a player, a playlist(docs), and a media item(docs). I've got all

iPad Mirroring using 2 screens, does it support 1080 resolution?

独自空忆成欢 提交于 2019-12-10 10:08:01
问题 2.5 years of mac and iOS development and i haven't found an answer to something. I'm working on a project utilizing iOS 5.0 and apple TV's airplay to display one UIScreen on the iPad and a separate one on my Apple TV. I have 2 separate view controllers and they display fine on each respectively. The issue is that the apple tv screen size returns at 720p not 1080p. So i get a bordered view controller at 1280 X 720 displayed and not a full screen representation of 1920 x 1080. The effect is my

How to open GameCenter in tvOS

Deadly 提交于 2019-12-09 12:58:13
问题 How can I open a game center leaderboard in tvOS? I've used this code for my iPhone games, 'leaderboardIdentifier' aren't available on tvOS. I've planned to use the same leaderboard on the AppleTV (it will be the same game). Many thanks for your help, Stefan @IBAction func handleGameCenter(sender: UIButton) { let gcViewController = GKGameCenterViewController() gcViewController.viewState = GKGameCenterViewControllerState.Leaderboards gcViewController.leaderboardIdentifier = gamePrefix +

iOS screen mirroring shows overscan borders on selected apps

落爺英雄遲暮 提交于 2019-12-08 19:15:57
问题 Problem: iPhone screen mirroring & a dedicated external view of my app show an inch of a black border on all sides. But: Some views display perfect without black borders on the full-screen, e.g., the Apple TV menu and the photo app. Tried already - with no effect: Disabled overscan on 1080p HD TV ("Disable 16:9 overscan") ( iPad Mirroring using 2 screens, does it support 1080 resolution? ) set UIScreenOverscanCompensation - has no effect ( IOS - External (hdmi) output fills only half the