Class: PlayerDataBinder

Constructor

PlayerDataBinder

new PlayerDataBinder(playerData)

Parameter

playerData

(non-null Object or non-null cast.framework.ui.PlayerData)

The object to bind to the current player state. The Object attributes (See cast.framework.ui.PlayerData for details) are updated to reflect the player state without firing a change event.

Methods

addEventListener

addEventListener(type, listener)

Adds a listener for player data changes.

Parameter

type

cast.framework.ui.PlayerDataEventType

The event type. Use cast.framework.ui.PlayerDataEventType.ANY_CHANGE to get notified of any change.

Value must not be null.

listener

function(non-null cast.framework.ui.PlayerDataChangedEvent)

removeEventListener

removeEventListener(type, listener)

Removes a listener to player data changes.

Parameter

type

cast.framework.ui.PlayerDataEventType

The event type.

Value must not be null.

listener

function(non-null cast.framework.ui.PlayerDataChangedEvent)