PAL SDK 与隐私权和法规相关的各种设置。这些设置有助于在生成 Nonce 信号时做出关于所用标识符的选择。
构造函数
ConsentSettings
新的 ConsentSettings()
媒体资源
allowStorage
boolean
PAL 是否就用途 1 征得用户同意使用标识符和存储。该值需要通过与 CMP(意见征求管理提供商)集成来确定。默认情况下,此属性设置为 false。如果指定为 true,则表示 PAL 已征得用户同意,可以使用 Cookie、设备 ID 和广告 ID 等信息。此值需要设置为符合 IAB TCFv2(透明度和用户意见征求框架)的要求。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eThe \u003ccode\u003eConsentSettings\u003c/code\u003e class manages privacy and regulation settings within the PAL SDK, influencing how identifiers are used.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eallowStorage\u003c/code\u003e, determined by a Consent Management Provider (CMP), dictates whether PAL has consent to utilize identifiers and storage, defaulting to false for user privacy.\u003c/p\u003e\n"],["\u003cp\u003eSetting \u003ccode\u003eallowStorage\u003c/code\u003e to true signifies user consent for PAL to use cookies, device IDs, and advertising IDs, requiring compliance with IAB Transparency and Consent Framework (TCFv2).\u003c/p\u003e\n"]]],[],null,["# Class: ConsentSettings\n\nConsentSettings\n===============\n\nclass public\n\nVarious settings to the PAL SDK related to privacy and regulations. The\nsettings can help make decisions about the choice regarding the identifiers\nused while generating nonce signals.\n\nConstructor\n-----------\n\n### ConsentSettings\n\nnew\nConsentSettings()\n\nProperty\n--------\n\n### allowStorage\n\nboolean\n\nWhether PAL has purpose 1 consent to use identifiers and storage. The\nvalue needs to be determined by integrating with CMP (Consent Management\nProvider). This is set to false by default. If specified as true, PAL has\nconsent from the user to use information like cookies, device IDs\nand advertising IDs. This value needs to be set to be IAB TCFv2\n(Transparency and Consent Framework) compliant."]]