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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ePlayerDataBinder\u003c/code\u003e class binds a player data object to the current player state, updating the data to reflect the state without triggering change events.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add and remove listeners for player data changes, allowing developers to react to specific events.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaddEventListener\u003c/code\u003e method enables listening for various player data changes, including any change using \u003ccode\u003ecast.framework.ui.PlayerDataEventType.ANY_CHANGE\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eremoveEventListener\u003c/code\u003e method allows removing previously registered listeners for player data changes.\u003c/p\u003e\n"]]],[],null,["cast.[framework](/cast/docs/reference/web_receiver/cast.framework).[ui](/cast/docs/reference/web_receiver/cast.framework.ui).PlayerDataBinder \nclass static\n\nThe player data binder. This binds a player data object to the player state.\nThe player data is updated to accurately reflect the current\nplayer state without firing any change events.\n\nConstructor\n\nPlayerDataBinder\n\nnew\nPlayerDataBinder(playerData)\n\n| Parameter ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| playerData | (non-null Object or non-null [cast.framework.ui.PlayerData](/cast/docs/reference/web_receiver/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. |\n\nMethods\n\naddEventListener\n\naddEventListener(type, listener)\n\nAdds a listener for player data changes.\n\n| Parameter ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| type | [cast.framework.ui.PlayerDataEventType](/cast/docs/reference/web_receiver/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. |\n| listener | function(non-null [cast.framework.ui.PlayerDataChangedEvent](/cast/docs/reference/web_receiver/cast.framework.ui.PlayerDataChangedEvent)) |\n\nremoveEventListener\n\nremoveEventListener(type, listener)\n\nRemoves a listener to player data changes.\n\n| Parameter ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| type | [cast.framework.ui.PlayerDataEventType](/cast/docs/reference/web_receiver/cast.framework.ui#.PlayerDataEventType) The event type. Value must not be null. |\n| listener | function(non-null [cast.framework.ui.PlayerDataChangedEvent](/cast/docs/reference/web_receiver/cast.framework.ui.PlayerDataChangedEvent)) |"]]