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

标签 google-cast

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

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对应的网页,该AppId使用Receiver Javascript API与您的发件人交谈。

发送者也可以在 Android 或 iO 上,在这种情况下,您只需制作一个 Web 应用程序。

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

相关文章:

安卓 ChromeCast : Tapping on my MiniControllerFragment doesn't open the ExpandedControllerActivity

Android Chromecast : Casting local audio file fails

ios - 无法在 iOS 应用程序中通过谷歌正确转换视频

ios - Chromecast 无法播放保存的视频

android - Google Cast 接收器 sdk 集成

android-studio - android studio 中的 android TV 模拟器可以接收类型转换吗?

ios - ChromeCast 音频播放器重新定位自身

ios - 如何让 GCKViewVideoFrameInput 快速工作?

google-chrome - 用于设备断开连接的 Chromecast 事件(发送方)

ios - 构建 iOS 项目时出现 Google Cast 2.6.0 错误