cast.framework.ui. PlayerDataBinder
Player data binder. Bind a player data object to the player state. The player data will be updated to reflect correctly the current player state without firing any change event.
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) |
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) |