如何对自定义Chromecast Receiver应用进行基本自定义?喜欢在加载时设置背景图像?

问题描述 投票:0回答:1

我有一个定制的Chromecast接收器应用程序与the most basic code

<html>
<head>
  <script type="text/javascript"
      src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js">
  </script>
</head>
<body>
  <cast-media-player></cast-media-player>
  <script>
    cast.framework.CastReceiverContext.getInstance().start();
  </script>
</body>
</html>

它有效,但它非常难看。当你点击时,应用程序会在加载时显示“MyCustomReceiver”(我的接收者的名字)。我更喜欢为正在加载的内容设置启动画面或缩略图。或者甚至只删除粗略的“MyCustomReceiver”文本。

我看着Customize UI docs

它说你可以挂钩像--playback-logo-image这样的关键字来定制UI。

我试试这个:

body {
  --playback-logo-image: url('https://i.imgur.com/kV5GW0A.jpg');
}

什么都没发生。我希望它显示为页面下方显示的徽标。

我尝试为--buffering-image设置它。也没有运气。

body {
  --buffering-image: url('https://i.imgur.com/kV5GW0A.jpg');
}

我该怎么定制这个?

chromecast google-cast google-cast-sdk custom-receiver
1个回答
0
投票

我在弄清楚每个样式关键字的作用时遇到了类似的困难,你可能想要引用styled media receiver docs

我认为--logo-image将取代默认的接收器文本。

© www.soinside.com 2019 - 2024. All rights reserved.