【问题标题】:chromecast - get rid of the css for Red Overlay "SAMPLE"chromecast - 摆脱红色覆盖“SAMPLE”的css
【发布时间】:2014-06-18 04:27:44
【问题描述】:

我调试了与版本 2 player.js (0002/player.js) 一起使用的 css,发现下面的 css 用于我想从默认接收器中删除的 RED Overlay。

来自 player.css

#player[type="video"][state="idle"]:after {
  content: "SAMPLE";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  bottom: 0;
  text-align: center;
  font-size: 50px;
  margin-top: -150px;
  opacity: 0.1;
  color: red;
}

当默认的 player.js 循环通过状态 [IDLE PLAY BUFFER] 时,红色的透明覆盖层会显示“SAMPLE”。

我想在播放自己的 mp4 时摆脱该功能。

所以,我删除了上面有问题的 css,并托管了没有红色示例的新 css 文件。

我转到“Google Cast SDK”的开发控制台,并将自定义样式更改为我托管的 CSS 文件的 URL。

我等了 4 个小时。

我重新启动了 chromecast 设备。

我在设备的调试器控制台中手动重新加载窗口。

而且,我仍然看到带有红色 SAMPLE 的旧 CSS。

我必须改变什么来摆脱与默认接收器一起使用的 player.js 上的 CSS?

下面是我的 android 应用在 chromecast 设备的调试器中加载的 html。

<html><head>
    <title>Cast Media Player</title>
    <link rel="stylesheet" href="0002/player.css">
    <script type="text/javascript" src="0002/player.js"></script><link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/gtv-videos-bucket/receivers/f742e4109ea711e3a5e20800200c9a66/style.css">
    <script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
    <script type="text/javascript" src="//www.gstatic.com/cast/sdk/libs/mediaplayer/0.3.0/media_player.js"></script>
  </head>
  <body>
    <div id="player" class="gcpa" type="video" state="playing"><div class="background"></div><div class="gcpb" style=""><video style="background-image: none;" src="http://....0685/fade0569-bd5b-4cc2-a05d-85cb24860c56-20140430101403.mp4"></video><div class="logo"></div><div class="gcpr"></div><div class="splash"></div><div class="watermark"></div><div class="gcpc"></div><div class="gcpd"><div class="gcph"><div class="gcpg" style="background-image: url(http://.....ecb7c32-me1563624197.jpg);"></div><div class="gcpf"><div class="gcpi">the light the Divinity t</div><div class="gcpj"><div><span>robrowntree</span></div><div><span>the light the Divinity the absolute poise Aaron rumpled beds at morning </span></div></div></div></div><div class="gcpk"><span class="gcpl"></span><span class="gcpp">00:08</span><span class="gcpq">00:10</span><div class="gcpm"><div class="gcpn progressBar" style="width: 80%;"></div><div class="gcpo" style="left: 80%;"></div></div></div></div></div><div class="message"></div></div>
    <script>
      var playerDiv = document.querySelector("#player");
      new castplayer.CastPlayer(playerDiv).start();
    </script>


</body></html>

【问题讨论】:

    标签: android css chromecast


    【解决方案1】:

    我不清楚这里的问题是什么。如果您使用“默认接收器”或您自己的样式接收器,则根本不会有 SAMPLE 水印;如果您使用 CastVideos 应用正在使用的接收器,您会看到那个大红色水印(您将无法删除)。

    【讨论】:

    • 谢谢。我从 git 扩展了“CastVideos”android 应用程序并且没有更改包。所以在开发控制台上,我得到了自己的应用程序 ID,但包仍然是“com.goog.sample.cast.refplayer”。我不知道如何让它使用“默认接收器”而不是带有水印的 css 接收器?
    • 与包名无关;您需要使用您自己的(或默认)css 创建您自己的 Styled 播放器,并获取一个新的“appId”并将该应用程序 ID 放在 res/values/strings.xml 中,而不是那里的 app d 中。
    【解决方案2】:

    如果您使用 applicationId“CC1AD845”,则删除 SAMPLE。

    这是默认应用程序 ID,由常量 CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID 定义。

    【讨论】:

    • 使用 CC1AD845 的 CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID 解决了我的问题
    猜你喜欢
    • 1970-01-01
    • 2014-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-25
    • 1970-01-01
    • 2011-07-24
    • 1970-01-01
    相关资源
    最近更新 更多