如何为网站启用 Chromecast?

How to Chromecast-enable a website?

article 解释了 "Chromecast-enabled site" 的好处:

  • Higher quality: Chromecast-enabled sites can serve high quality content that is best for viewing on TV. This will often means you'll get a full 1080p high definition picture; for some content you may also get 5.1 surround sound (if supported by your TV or receiver). When Casting a tab, you are limited to a maximum of 720p (if supported by your computer).
  • Battery life and computer load: Chromecast-enabled sites play directly on Chromecast devices and put no load on your computer. Casting a tab requires a lot of your computer's power, which is why it's not supported on all computers.
  • Plays independently: When you play from a Chromecast-enabled site, you can shut down your computer or close the lid. With tab projection, you need to keep your computer on throughout the cast.

但是,它没有解释如何在网站上启用 Chromecasting。

我需要做什么才能在我的网站上启用 Chromecast?

它只是我可以投射的视频吗,或者我是否可以提供实时新闻提要,而不需要计算机来驱动它?

以下是对我有用的方法。

1.将 Chrome投射按钮添加到您的页面

<button is='google-cast-button'></button>

Google 的 Chromecast Javascript 客户端将自动赋予此按钮其魔力。似乎必须是一个