> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# client_focus_change

> client_focus_change event.

每当应用程序在玩家设备上进入或退出焦点时，将触发此事件。

## 属性

| 名称                | 类型                                                                                                      | 描述                                                                           |
| :---------------- | :------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------- |
| EntityLineage     | [EntityLineage](/services/playfab/api-references/events/data-types/entitylineage)                       | 此实体所属的父级实体。                                                                  |
| OriginalEventId   | String                                                                                                  | 此事件发布到 PlayFab 之前所关联的原始唯一标识符。该值可能与 EventId 值不同，EventId 是在服务器接收该事件时分配的。       |
| OriginalTimestamp | DateTime                                                                                                | 此事件发布到 PlayFab 之前所关联的原始时间（UTC）。该值可能与 Timestamp 值不同，Timestamp 是在服务器接收该事件时设置的。 |
| Payload           | [ClientFocusChangePayload](/services/playfab/api-references/events/data-types/clientfocuschangepayload) | 此实体所属的负载。                                                                    |
| WriterEntity      | [EntityKey](/services/playfab/api-references/events/data-types/entitykey)                               | 写入此事件的实体，仅当与事件的实体不同时才包含。                                                     |

## 常用属性

所有 V2 PlayStream 事件都格式化为 JSON 对象，其中大多数共享以下常用属性：

| 名称                 | 类型                                                                            | 描述                                        |
| :----------------- | :---------------------------------------------------------------------------- | :---------------------------------------- |
| SchemaVersion      | String                                                                        | PlayStream 事件格式版本，遵循语义化版本控制方案。            |
| FullName           | [Object](/services/playfab/api-references/events/data-types/fullnameobject)   | 事件名称与事件命名空间的组合，用于完整指定事件类型。                |
| Id                 | String                                                                        | PlayFab 为此事件分配的唯一标识符。                     |
| Timestamp          | DateTime                                                                      | 与此事件关联的时间（UTC）。                           |
| Entity             | [Object](/services/playfab/api-references/events/data-types/entityobject)     | 有关此事件适用的实体的详细信息，包括 Entity Id 和 Entity 类型。 |
| Originator         | [Object](/services/playfab/api-references/events/data-types/originatorobject) | 描述发起此事件的源和源类型的对象。                         |
| PayloadContentType | String                                                                        | 指定事件负载的内容。默认值为 "JSON"。                    |
| Origin Info        | Object                                                                        | 可选字段，包含有关源自 PlayFab 之外的事件的信息。             |


## Related topics

- [PlayFab 2018 版本发布说明](/zh-CN/services/playfab/release-notes/2018.md)
- [PlayFab 的 PlayStream 事件模型参考](/zh-CN/services/playfab/api-references/events/index.md)
- [会话](/zh-CN/services/playfab/data-analytics/ingest-data/sessions.md)
- [趋势](/zh-CN/services/playfab/data-analytics/learn-data/trends/trends-overview.md)
- [ClientFocusChangePayload](/zh-CN/services/playfab/api-references/events/data-types/clientfocuschangepayload.md)
