> ## 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.

# Who the viewer is

> Tell the SDK what you know about the viewer: user, consent, and what never to send.

Set what you know on the shared instance; the next request carries it:

```swift theme={null}
KontextVideo.shared.user = .init(id: "user-1234", keywords: ["romance", "drama"])
KontextVideo.shared.variantId = "B"     // for A/B tests agreed with Kontext
```

> [!NOTE]
>
> Consent is read for you: on every request the SDK reads the IAB keys your consent platform writes to `UserDefaults`. Only when the SDK cannot detect a signal, because your app has no such platform or keeps a signal elsewhere, set it yourself. A value your consent platform wrote still wins.
>
> ```swift theme={null}
> KontextVideo.shared.regulatory = .init(
>     gdpr: true,
>     gdprConsent: "<TCF string>",
>     usPrivacy: "1YNN",
>     coppa: false
> )
> ```
>
> See [TCF & CMP](https://docs.kontext.so/video/guides/tcf-cmp.md).


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