gpt4 book ai didi

google-cast - Google Cast 接收器应用程序

转载 作者:行者123 更新时间:2023-12-04 04:47:53 27 4
gpt4 key购买 nike

在接收器开发人员指南中如下:

Applications running on the Google Cast receiver device (receiver applications) are always web applications. They are launched on the device after it receives instructions from the sender application to do so.



这究竟是如何从发件人(在 Chrome 中)完成的?发件人指南似乎没有在任何地方包含它,我无法在 API 文档中找到它。

有类 cast.LaunchRequest,但没有任何东西可以接受接收器应用程序 URL。

最佳答案

一开始有点难以弄清楚。发生的事情是你有一个发送者和一个接收者。为了简单起见,假设我们正在制作一个 chrome 应用程序。 Chrome 应用程序是在 chrome 上运行的网页的同义词。

所以我们将拥有两个网络应用程序(页面)。

  • 发件人(网页)
  • 接收器(网页)

  • 然后你会得到你的发件人 whitelisted ,通过向他们提供您的网络应用程序根目录的 url。在一两天内,他们会向您发送一个应用程序 ID。该应用程序 ID 充当您的 ActivityID(代替“Netflix”或“YouTube”)。

    当你说 cast.LaunchRequest("[AppId]", receiver);来自您的发件人。接收者下拉该 AppId 对应的网页,该网页使用 Receiver Javascript API与您的发件人交谈。

    发件人也可以在 android 或 iOs 上,在这种情况下,您只需要制作一个 Web 应用程序。

    关于google-cast - Google Cast 接收器应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17910614/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com