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

# 观众是谁

> 告诉 SDK 你对观众了解的信息：用户、同意，以及绝不能发送的内容。

把你知道的信息设置到共享实例上；下一次请求会携带它：

```swift theme={null}
KontextVideo.shared.user = .init(id: "user-1234", keywords: ["romance", "drama"])
KontextVideo.shared.variantId = "B"     // 与 Kontext 约定的 A/B 测试
```

> [!NOTE]
>
> 同意信息会自动读取：每次请求时，SDK 都会读取你的同意平台写入 `UserDefaults` 的 IAB 键。只有当 SDK 无法检测到某个信号时（你的应用没有这样的平台，或把信号保存在别处），才需要自行设置。你的同意平台写入的值仍然优先。
>
> ```swift theme={null}
> KontextVideo.shared.regulatory = .init(
>     gdpr: true,
>     gdprConsent: "<TCF string>",
>     usPrivacy: "1YNN",
>     coppa: false
> )
> ```
>
> 见 [TCF 与 CMP](https://docs.kontext.so/zh/video/guides/tcf-cmp.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.