TechnologiesUI & App Frameworks

TVMLKit

iOSmacOStvOSwatchOSvisionOS

TVMLKit is a deprecated tvOS framework for building app interfaces and controllers using TVML markup and JavaScript. You host the experience with TVApplicationController and its TVApplicationControllerContext, which load and run your JavaScript and TVML documents, while view controllers such as TVDocumentViewController and TVBrowserViewController present the resulting screens. The framework turns markup into a tree of view elements, including TVViewElement, TVImageElement, and TVTextElement, with TVElementFactory and TVInterfaceFactory creating elements and TVStyleFactory, TVViewElementStyle, and TVColor applying styling. It also models media playback through TVPlayer, TVPlaylist, TVMediaItem, and TVPlaybackEvent.

Application Hosting 3

Bootstrap and run a TVMLKit app from its JavaScript and TVML documents.

  • Cl
    TVApplicationController
    @description The TVApplicationController class establishes the JavaScript environment
  • Cl
    TVApplicationControllerContext
    @brief This class is used to provide launch info to TVApplicationController.
  • Pr
    TVApplicationControllerDelegate
    A protocol for responding to lifecycle and load events of a TVApplicationController.

Presenting Documents 5

View controllers that present TVML documents and browse between them.

  • Cl
    TVDocumentViewController
    A view controller that presents a single TVML document on screen.
  • Pr
    TVDocumentViewControllerDelegate
    A protocol for responding to presentation events of a TVDocumentViewController.
  • Cl
    TVBrowserViewControllertvOS 13.0+
    A view controller that presents and navigates between a set of TVML documents.
  • Pr
    TVBrowserViewControllerDataSourcetvOS 13.0+
    A protocol that provides the documents presented by a TVBrowserViewController.
  • Pr
    TVBrowserViewControllerDelegatetvOS 13.0+
    A protocol for responding to navigation events in a TVBrowserViewController.

View Elements 3

The element tree that TVMLKit builds from your markup.

  • Cl
    TVViewElement
    @description TVViewElement represents a read only DOM node along with it's
  • Cl
    TVImageElement
    @decription Convenience class representing <img /> element.
  • Cl
    TVTextElement
    @decription Represents textual content for the DOM element.

Creating Elements and Interfaces 3

Factories and protocols that turn markup into elements and platform interfaces.

  • Cl
    TVElementFactory
    @description Factory for registration of new elements that extend Apple TV markup language. Registration is required
  • Cl
    TVInterfaceFactory
    @description Interface factory for creation of views and view controllers. Application can extend or override framework implementation by setting extendedInterfaceCreator.
  • Pr
    TVInterfaceCreating
    A protocol for creating custom interface objects from TVML view elements.

Styling 6

Apply colors and visual styles to the element tree.

  • Cl
    TVStyleFactory
    @description Factory to register new styles to define custom style data.
  • Cl
    TVViewElementStyle
    @description An instance of TVViewElementStyle contains the set of styles applied to the view element.
  • Cl
    TVColor
    @description Defines the color data for styles of type TVViewElementStyleTypeColor.
  • En
    TVColorType
    Constants that specify the kind of color value resolved from TVML styling.
  • En
    TVViewElementStyleType
    Constants that specify the type of a view element style attribute.
  • En
    TVTextElementStyle
    Constants that specify the text style applied to a text element.

Media Playback 3

Model media items, playlists, and the player that plays them.

  • Cl
    TVPlayer
    /////////////////////////////////////////////////////////////////////////////
  • Cl
    TVPlaylist
    /////////////////////////////////////////////////////////////////////////////
  • Cl
    TVMediaItem
    /////////////////////////////////////////////////////////////////////////////

Playback Events 5

Describe and marshal playback events between native and JavaScript code.

  • St
    TVPlaybackEvent
    A structure describing an event emitted during media playback.
  • St
    TVPlaybackEventProperty
    A structure identifying a property carried by a playback event.
  • En
    TVPlaybackState
    Constants that specify the current state of media playback.
  • Pr
    TVPlaybackEventMarshaling
    @discussion An event user info marshaling protocol for sending and receiving
  • Cl
    TVPlaybackCustomEventUserInfo
    @discussion Event object that encapsulates its identity and user info for

Element Layout and Behavior 7

Constants that describe element alignment, position, events, and updates.

  • En
    TVElementAlignment
    Constants that specify the alignment of a view element within its parent.
  • En
    TVElementContentAlignment
    Constants that specify the alignment of a view element's content.
  • En
    TVElementPosition
    Constants that specify the position of a view element within its layout.
  • En
    TVElementEventType
    Constants that specify the kinds of events a view element can emit.
  • En
    TVElementUpdateType
    Constants that specify how a view element is updated when markup changes.
  • En
    TVElementResettableProperty
    @abstract Properties of TVViewElement that can be reset by the client to their
  • En
    TVImageType
    Constants that specify the type of image displayed by an image element.

Errors 2

Error types reported when loading documents or running TVMLKit.

  • St
    TVDocumentError
    A structure describing an error encountered while loading or parsing a TVML document.
  • En
    TVMLKitError
    Constants that specify error conditions raised by TVMLKit.

Classes 1

  • Cl
    TVBrowserTransitionAnimatortvOS 13.0+
← UI & App Frameworks