Create tvOS client-server apps using web technologies to stream media and respond to events.


The TVMLKit JS framework provides you with the means to display client-server apps created with the Apple TV Markup Language (TVML) on tvOS. You use other classes in the framework to stream media and respond to events.

The TVMLKit JS framework incorporates the following standard Document Object Module classes, which are not documented here. For information on these classes, see World Wide Web Consortium.

  • CharacterData

  • Comment

  • CustomEvent

  • Document

  • DocumentFragment

  • DOMException

  • DOMImplementation

  • DOMImplementationLS

  • DOMImplementationRegistry

  • DOMParser

  • Element

  • Event

  • EventException

  • HTMLCollection

  • LSException

  • LSInput

  • LSParser

  • LSSerializer

  • NamedNodeMap

  • Node

  • NodeList

  • ParentNode

  • ParsingElement

  • Text

  • XMLSerializer

  • XPathEvaluator

  • XPathException

  • XPathExpression

  • XPathResult


First Steps

Creating a Client-Server TVML App

Display and navigate between TVML documents on Apple TV by retrieving and parsing information from a remote server.

App Initialization


An object that provides access to—and a means to respond to—app life-cycle events.


An object that contains the app's default preferences.


A document stack that holds the individual TVML documents for a client-server app.

Responding to User Interaction

Update onscreen information by adding event listeners to your Apple TV app.


An object that communicates events and allows other objects to add themselves as listeners.

Device Settings


An object that provides information about an Apple TV and the host app installed on the device.


An object that provides access to setting information for a device.


An object used to retrieve rating restriction information.

Media Playback

Playing Media in a Client-Server App

Play media items in a client-server app using the built-in media player for TVMLKit JS.


A media player that displays the UI for playing video and audio in an Apple TV client-server app.


An array of media items to be played in an Apple TV client-server app.


A single audio or video item.


An object used to display images on Apple TV in a slideshow format.

Element Access


An object used to retrieve user inputs from search fields and text fields.


An object used for setting and retrieving documents associated with a menu item.

Data Storage and Retrieval

Binding JSON Data to TVML Documents

Create full-fledged TVML documents by using data binding and queries on simplified TVML files.


An object used to retrieve data from a URL.


An object used to create observable objects from JSON objects for data binding.


An object used to store key-value-pair information.



Error codes for the TVError domain.


Information about an error condition, including a domain, a domain-specific error code, and application-specific information.


TVMLKit JS Functions

The functions contained in this reference can be used globally in your app. They are not associated with a particular class.

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