AI-generated Key Takeaways
- 
          cast.framework.ui.PlayerDataBinder is a class used to bind a player data object to the player state without firing change events. 
- 
          The constructor for PlayerDataBinder takes a playerData object to bind to the current player state. 
- 
          You can add and remove listeners for player data changes using addEventListenerandremoveEventListenermethods, respectively.
cast.framework.ui.  PlayerDataBinder
            The player data binder. This binds a player data object to the player state. The player data is updated to accurately reflect the current player state without firing any change events.
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  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) |