Instance Method


Dispatches custom playback events to the JavaScript environment.


func dispatch(event: TVPlaybackEvent, userInfo: TVPlaybackEventMarshaling?, completion: ((Bool) -> Void)? = nil)



The custom playback event to be dispatched.


The user information for the custom event.


A block that is called after the event has been dispatched. Contains the information required to process the event's results.

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.

protocol TVPlaybackEventMarshaling

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

class TVPlaybackCustomEventUserInfo

The user information used in a custom playback event.