TVMLKit JS Functions

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

Topics

Evaluating TVMLKit JS Files

evaluateScripts

Verifies and executes TVMLKit JS files.

Automating Function Timing

setInterval

Repeatedly executes a given function at the given time interval.

clearInterval

Stops the function associated with the identifier from repeating.

setTimeout

Executes a given function after a set amount of time.

clearTimeout

Stops the function associated with the identifier from executing.

Formatting Information

formatDate

Formats the given date into the given format.

formatDuration

Formats the given duration into the standard tvOS format.

formatNumber

Formats the specified number into the given format.

Manipulating the Document

UUID

Generates a unique UUID.

getActiveDocument

Retrieves the currently active document.

canOpenURL

Determines if a deep-link to another app can be opened.

openURL

Opens a deep link into another app.