A protocol used for sending and receiving information across the JavaScript bridge.


protocol TVPlaybackEventMarshaling


You must conform to this protocol in order to pass custom events.


Processing Playback Events

func processReturnValue(value: JSValue, in: JSContext)

Converts a JavaScript value into a value that is readable in Swift or Objective-C.

var properties: [TVPlaybackEventProperty : Any]?

An array of custom playback event properties.


struct TVPlaybackEventProperty

Extend this structure to create your own custom playback event properties.


Inherits From

See Also

Controlling Playback

func next()

Plays the next media item in the playlist.

func pause()

Pauses the currently playing item.

func previous()

Plays the previous media item in the playlist.

var state: TVPlaybackState

The current state of the player.

enum TVPlaybackState

The possible states of a player.

struct TVPlaybackEvent

Extend this structure to send your custom playback events to the JavaScript environment.

class TVPlaybackCustomEventUserInfo

The user information used in a custom playback event.