as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持

CustomerListEntriesProvider

CustomerListEntriesProvider

目前TM API还无法将TM原生端的nativeObjects传递给JS回调,因此暂时使用JS CustomerListEntriesProvider类作为临时解决方案。最终将无需使用JS实现的ICustomerListEntriesProvider,因为届时将提供对原生CustomerListEntriesProvider的引用。

每个新的JS CustomerListEntriesProvider都有一个从原生端为TM提供的providerId,用于将此JS CustomerListEntriesProvider映射到原生CustomerListEntriesProvider。JS CustomerListEntriesProvider使用TM将调用传递给相关的原生CustomerListEntriesProvider

实现

构造函数

new CustomerListEntriesProvider()

new CustomerListEntriesProvider(providerId): CustomerListEntriesProvider

参数

providerId

number

返回值

CustomerListEntriesProvider

属性

providerId

providerId: number

方法

addCustomerListChunk()

addCustomerListChunk(listType, entries): void

将客户管理列表数据添加到响应。重复调用addCustomerListChunk,分页处理数据,以免将大型列表加载到内存中。所有客户管理列表条目发送完毕后,必须调用一次commit()

参数

listType

WATCHLIST

发送的客户管理列表类型(即播放列表)

entries

ICustomerListEntry[]

客户管理列表的条目列表。

返回值

void

实现

ICustomerListEntriesProvider.addCustomerListChunk


commit()

commit(): void

表示响应结束。必须在最后一次调用addCustomerListChunk之后调用。

返回值

void

实现

ICustomerListEntriesProvider.commit


Last updated: 2025年10月2日