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

Implementing a Hybrid TV App with TVMLKit

Display content options with document view controllers and fetch and populate content with TVMLKit JS.

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.

class TVDocumentViewController

A view controller that represents a TVMLKit document.

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.