as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

ContentEntitlementsProvider

JS ContentEntitlementsProvider class exist for short term work around while TM APIs do not have support for passing in nativeObjects from native side of TM into JS callback. Eventually will not need JS implementation of IContentEntitlementsProvider since a reference to a native ContentEntitlementsProvider will be provided instead.

Each new JS ContentEntitlementsProvider has a providerId that is given from native side for TM that maps this JS ContentEntitlementsProvider to a native ContentEntitlementsProvider. JS ContentEntitlementsProvider uses TM to pass calls through to the associated native ContentEntitlementsProvider.

Implements

Constructors

new ContentEntitlementsProvider()

new ContentEntitlementsProvider(providerId): ContentEntitlementsProvider

Parameters

providerId

number

Returns

ContentEntitlementsProvider

Properties

providerId

providerId: number

Methods

addContentEntitlementChunk()

addContentEntitlementChunk(entitlements): void

Adds content entitlement data to response. Use repeated calls to addContentEntitlementChunk to paginate data to prevent loading large lists into memory. Must eventually be followed by a call to commit() after all entitlements have been sent.

Parameters

entitlements

IContentEntitlement[]

A list of entitlements.

Returns

void

Implementation of

IContentEntitlementsProvider.addContentEntitlementChunk


commit()

commit(): void

Indicates the end of responses. Must be called after the final call of addContentEntitlementChunk.

Returns

void

Implementation of

IContentEntitlementsProvider.commit


Last updated: Oct 02, 2025