Interface: SharedContextData
The data object accepted by SharedContext.set.
Every field is optional and merged on top of previously set values.
Calling set() multiple times merges incrementally — previously set
values are preserved unless explicitly overwritten.
Properties
appBundleId?
optionalappBundleId:string
The bundle id of the app. Only required for iOS apps.
appName?
optionalappName:string
The name of the app. When it is a website, fill in the name of the project.
appStoreId?
optionalappStoreId:string
The store id of the app. Only required for apps. Depending on the app store, the id is formatted differently.
IAB Tech Lab App Identification Guidelines 
appStoreUrl?
optionalappStoreUrl:string
The store URL of the app. Only required for apps.
IAB Tech Lab App Identification Guidelines 
appVersion?
optionalappVersion:string
The version of the app. When it is a website, fill in the deployed version of the website.
b2bContext?
optionalb2bContext:string
Business-to-business context identifier.
deviceId?
optionaldeviceId:object
Device id of the user. Only required for app environments. When no listed deviceId is available, you can pass a ppid as a user id instead.
id
id:
string
name
name:
DeviceIdName|"aaid"|"afai"|"asia"|"asid"|"tifa"|"vaid"|"idfa"|"idfv"|"lgudid"|"msai"|"oaid"|"psnai"|"rida"|"vida"|"waid"
presentationalContext?
optionalpresentationalContext:"curated-list"|"discovery-page"
The presentational context of the integration. Do not define it when it is not part of those contexts.
providers?
optionalproviders:object
Media-provider-specific context resolvers keyed by provider name.
Each resolver is called every time the player needs fresh context for the given provider (e.g. to obtain a fresh auth token).
Index Signature
[providerName: string]: (context?) => MediaProviderContext | Promise<MediaProviderContext>
Example
sharedContext.set({
providers: {
'my-provider': async () => ({
token: await myAuth.getFreshToken(),
}),
},
});userIds?
optionaluserIds:object[] | () =>Promise<object[]> |object[]
Identifiers for the current user (e.g. netID, LiveRamp, PAIR).
You can pass either a static array or a resolver function. A resolver is re-invoked every time the player needs user IDs (for example before each ad request), so it can return a different set of IDs when the user’s consent state has changed. The resolver may be asynchronous.
Examples
sharedContext.set({
userIds: [{ id: '...', name: 'netId' }],
});sharedContext.set({
userIds: async () => await cmp.getConsentedUserIds(),
});