Constructor

PlayerDataBinder

new PlayerDataBinder(playerData)

Parameter

playerData

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

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

Methods

addEventListener

addEventListener(type, listener)

Add listener to player data changes.

Parameter

type

cast.framework.ui.PlayerDataEventType

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

Value must not be null.

listener

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

Value must not be null.

removeEventListener

removeEventListener(type, listener)

Remove 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)

Value must not be null.