Framework

TVMLKit

Create client-server apps by incorporating JavaScript and TVML files in your binary app.

Overview

The TVMLKit framework enables you to evaluate TVMLKit JS and TVML files from within your tvOS app. You can create TVML elements, styles, views, and view controllers through the JavaScript environment.

Topics

JavaScript Environment

class TVApplicationController

An object that bridges the UI, navigation stack, storage, and event handling from JavaScript.

class TVApplicationControllerContext

Launch information provided to the TV application controller.

Views and View Controllers

class TVViewElement

A representation of a read-only DOM node.

protocol TVInterfaceCreating

A protocol that defines methods used to create views and view controllers.

class TVInterfaceFactory

A factory for the creation of views and view controllers.

class TVBrowserViewController

A view controller that presents content in a browsable, full-screen format.

Beta
class TVDocumentViewController

A view controller that represents a TVMLKit document.

Beta
Creating hybrid applications with Document Service based View Controllers

Create view controllers that show TVMLKit content in a native application through the use of Document view controllers that are fulfilled through a Javascript based service.

Custom Elements

class TVElementFactory

An object used to register new elements to extend the Apple TV Markup Language (TVML).

class TVImageElement

A representation of a read-only DOM node containing the attributes that describe an image element.

class TVTextElement

The textual content for the DOM element.

Creating TVML Elements

Avoid rewriting complex and often used elements by creating a simplified custom element.

Custom Styles

class TVViewElementStyle

A style applied to a view element.

class TVStyleFactory

An object used to register custom style properties.

class TVColor

The color data used by styles.

Custom Player

class TVMediaItem

A single audio or video item associated with the Apple TV JavaScript player.

class TVPlaylist

A collection of media items associated with the Apple TV JavaScript player.

class TVPlayer

A customizable native media player used to control playback from the JavaScript player used in an Apple TV client-server app.

Errors

let TVMLKitErrorDomain: String

An error occurred in TVMLKit.

enum TVMLKitError

Error codes for the TVMLKit error domain.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software