Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 2025/07/25 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003ePlayerDataChangedEvent\u003c/code\u003e class provides information about changes to player data, including the type of change, field affected, and new value.\u003c/p\u003e\n"],["\u003cp\u003eIt is constructed with the event type, field name, and new field value.\u003c/p\u003e\n"],["\u003cp\u003eThe event includes properties for accessing the changed field name (\u003ccode\u003efield\u003c/code\u003e), event type (\u003ccode\u003etype\u003c/code\u003e), and new field value (\u003ccode\u003evalue\u003c/code\u003e).\u003c/p\u003e\n"]]],["The `PlayerDataChangedEvent` class signals changes in player data, providing details about the modification. This event is initiated using the `PlayerDataChangedEvent` constructor, which takes the event type, the modified field's name, and the new value as parameters. The class properties describe the `field` that was altered, the `type` of the event, and the new `value` assigned to the field. All of those attributes are then accessible through the corresponding properties.\n"],null,["# Class: PlayerDataChangedEvent\n\ncast.[framework](/cast/docs/reference/web_receiver/cast.framework).[ui](/cast/docs/reference/web_receiver/cast.framework.ui).PlayerDataChangedEvent\n===================================================================================================================================================\n\nclass static\n\nPlayer data changed event. Provides the changed field (type), and new value.\n\nConstructor\n-----------\n\n### PlayerDataChangedEvent\n\nnew\nPlayerDataChangedEvent(type, field, value)\n\n| #### Parameter ||\n|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| type | [cast.framework.ui.PlayerDataEventType](/cast/docs/reference/web_receiver/cast.framework.ui#.PlayerDataEventType) Event type. Value must not be null. |\n| field | string The changed field name. |\n| value | any type The new field value. |\n\nProperties\n----------\n\n### field\n\nstring\n\nThe field name that was changed.\n\n### type\n\nnon-null [cast.framework.ui.PlayerDataEventType](/cast/docs/reference/web_receiver/cast.framework.ui#.PlayerDataEventType)\n\n### value\n\nany type\n\nThe new field value."]]