Kaltura listAction 到 return contextData

Kaltura listAction to return contextData as well

有没有办法在使用 listAction 获取所有媒体条目时也检索这些媒体项目的 flavorAssets?目前我正在做的是首先检索所有媒体项目,然后遍历每个媒体项目并使用 getContextData 操作为每个媒体条目获取 flavorAssets,这不是很有效并且可能需要很长时间。我的问题是,在这种情况下,有没有办法在为每个项目返回 flavorAssetscontextData 的同时执行 Kaltura.services.media.listAction(mediaFilter, pager),而无需对每个项目调用 getContextData 操作媒体入口?

您可以使用响应配置文件 return 单个请求中的条目和风味资产。

这是一个原始请求,可以为您提供您所需要的,只需附加一个 KS:

http://www.kaltura.com/api_v3/index.php?service=baseEntry&action=list&filter:objectType=KalturaBaseEntryFilter&filter:orderBy=-createdAt&format=1&responseProfile:objectType=KalturaDetachedResponseProfile&responseProfile:fields=id,name&responseProfile:type=1&responseProfile:relatedProfiles:0:objectType=KalturaDetachedResponseProfileArray&responseProfile:relatedProfiles:0:mappings:0:objectType=ResponseProfileMapping&responseProfile:relatedProfiles:0:mappings:0:parentProperty=id&responseProfile:relatedProfiles:0:mappings:0:filterProperty=entryIdEqual&responseProfile:relatedProfiles:0:name=flavorAsset&&responseProfile:relatedProfiles:0:filter:objectType=KalturaFlavorAssetFilter&ks=

采用更人性化的格式:

service=baseEntry
action=list
format=1
filter:objectType=KalturaBaseEntryFilter
filter:orderBy=-createdAt
responseProfile:objectType=KalturaDetachedResponseProfile
responseProfile:fields=id,name
responseProfile:type=1
responseProfile:relatedProfiles:0:objectType=KalturaDetachedResponseProfileArray
responseProfile:relatedProfiles:0:name=flavorAsset
responseProfile:relatedProfiles:0:mappings:0:objectType=ResponseProfileMapping
responseProfile:relatedProfiles:0:mappings:0:parentProperty=id
responseProfile:relatedProfiles:0:mappings:0:filterProperty=entryIdEqual
responseProfile:relatedProfiles:0:filter:objectType=KalturaFlavorAssetFilter

我不确定 JavaScript 客户端库是否支持响应配置文件,TypeScript 客户端库支持它。