如何实现 CAF 接收器队列



我对这个页面感到困惑 https://developers.google.com/cast/docs/caf_receiver_features#queueing

它似乎假设"YourServer"的任何实现都将返回同步结果,而不是承诺或可观察量。

有没有人有一个工作示例,其中队列由基于 http 的服务管理?

编辑:

我发现这个页面有一个主要问题。它不一致地命名cast.framework.QueueBase基类。在某些地方,它正确地将其命名为cast.framework.QueueBase,而在另一些地方,它将其命名为cast.framework.messages.QueueBase 。特别是,指向类文档的链接使用了错误的名称。正确的链接是 https://developers.google.com/cast/docs/reference/caf_receiver/cast.framework.QueueBase。

这很有帮助,因为它说 fetchItems 及其兄弟姐妹返回:

"(non-null Array of non-null cast.framework.messages.QueueItem 或 non-null Promise 包含非 null Array of non-null cast.framework.messages.QueueItem("。

好的,文档中有错误。我在Google+社区上报告了这些内容,现在已经修复了。

我有一个示例排队接收器在工作,并对其进行了要点。

最新更新