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


Using the TVMLKit JS Framework

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

  • EventTarget

  • HTMLCollection

  • LSException

  • LSInput

  • LSParser

  • LSSerializer

  • NamedNodeMap

  • Node

  • NodeList

  • ParentNode

  • ParsingElement

  • Text

  • XMLSerializer

  • XPathEvaluator

  • XPathException

  • XPathExpression

  • XPathResult




The App class provides access to and a means to respond to app life cycle events.


An object that associates JSON objects to DOM objects.


A Device instance provides information about an Apple TV and apps installed on the device.


An event listener object listens for developer created events. You can add and remove event listeners.


A Keyboard instance enables you to retrieve user inputs from search fields and text fields.


A MediaItem object contains information about a single audio or video item. Media items are contained in a playlist. The Player object is used to play the MediaItem objects contained within the Playlist object.


A MenuBarDocument class instance provides functions for setting and retrieving documents associated with a menu item.


The NavigationDocument class provides functions that you use to control the document stack that holds the individual TVML documents for a client-server app.


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


The Playlist object is an array of media items that are to be played in an Apple TV client-server app. The player (Player object) accesses the playlist to play the designated media objects.


A Player object contains a playlist and displays the UI for playing video and audio in an Apple TV client-server app. After you create a new player, you need to associate the player with a playlist that contains media items.


Use the Restrictions class to retrieve rating restriction information. Different countries often allow different levels of content to be shown. This class also allows you to specify the maximum and minimum rankings for content.


A Settings class instance provides access settings information for a device.


The Slideshow class provides developers with a way to display images on the Apple TV in a slideshow format.


The Storage class provides functions that you use to store key-value pair information.


A TVError object encapsulates richer and more extensible error information than is possible when you use only an error code or error string. The core attributes of a TVError object are an error domain (represented by a string), a domain-specific error code, and a user info dictionary containing app-specific information. See User Info Dictionary Keys and Error Domains.


A UserDefaults object contains information which allows the application to customize its behavior to match a user’s preferences.


An XMLHttpRequest instance enables you to retrieve data from a URL without having to do a page refresh.


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