/r/tvml
Using TVML to build your AppleTV app? Come join us!
TVML related questions/answers/blog posts only please.
For more about the Apple TV check out
To get started:
/r/tvml
I have a TVML app with a menu on top which includes a Sign In / Sign Out button (depending if the user is logged in or not). When the user goes to Sign Out there is a confirmation message and a Logout button. If the user clicks on the button, the following is executed:
localStorage.removeItem("userID"); App.reload(); return;
If I then try to sign back in, I go to the Sign In screen where I have a form for the user to enter an email and a Next button with the following:
let keyboard = this._getStringFromTextField(); sessionStorage.setItem("useremail", keyboard.text);
And this is the _getStringFromTextField() function:
_getStringFromTextField() { let doc = getActiveDocument(); let textFields = doc.getElementsByTagName('textField'); let textField = textFields.item(0); return textField.getFeature("Keyboard"); }
The problem is that getActiveDocument() returns undefined instead of the active document. Hence, the button doesn't work and I can never get the next screen which is the password form.
This happens whenever I reload the app after signing out and I immediately try to sign back in. The only way around it is to close the app completely and relaunching it.
Any insights on why this is happening? How can I get getActiveDocument() to work after the reload?
I'm in the midst of translating a web-based media library and player to the AppleTV to make it more convenient for folks that have an AppleTV.
I get the gist of TVMLKit, but it seems certain trivial (on the web, anyway) tasks are just not documented and the support forums seem old, unfrequented, and lacking.
For example ... I have a simple stackTemplate with a background and banner. I want the background and banner images to update/change when a lockup is "highlighted" by passing in the new src.
I thought this should be easy ... it's not :/
Hey everyone, not sure if there is already a documented answer for this, but I'm just stuck at this point and trying to read through every available documentation I can come across.
I'm trying to implement Node.JS and Express in the app. Typically the guides say to open up a simple web server via Ruby or Python, which executes the javascript file and TVML just fine. But when it comes to establishing an Express-based server, it returns "The operation couldn't be completed. (TVMLKitErrorDomain error 3.)" Here's my simple server.js.
var express = require('express');
var app = express();
var http = require('http').Server(app);
app.get('/', function(req, res) {
res.sendStatus(200, {'Content-Type':'text/html'});
})
app.get('/helloworld.js', function(req, res) {
res.sendFile(__dirname + '/helloworld.js');
})
http.listen(9001, function() {
console.log('listening on *:9001');
});
When I navigate to this file via my browser (http://localhost:XXXX/helloworld.js) it shows the source code. What am I missing?
Is anyone using tvml have a horrendous time setting up authentication like this example from Airbnb?
https://medium.com/airbnb-engineering/apple-tv-authentication-a156937ea211
Hi, I'm writing about TVML for an educational program I'm participating in and I need to know what famous apps in the AppleTv's AppStore are built around TVML. I'm assuming Netflix, Fox, and many other video streaming services use it, but can someone actually prove what are they using (TVML or maybe UIKit)?
If you are having some trouble changing styles try setting tv-text-style: none;
<description style="tv-text-style: none; font-size:36; font-weight:regular;">