【发布时间】:2019-04-22 18:16:11
【问题描述】:
我正在尝试让 Chromecast Ultra 显示 3840x2160 网页。当内容是简单的 IMG 时没有问题,但是当我尝试 iframe 或更复杂的 HTML 时,它会将其裁剪到看起来像左上角但不到整个屏幕的四分之一的位置。
我尝试从同一网站的 Chrome 选项卡进行投射(镜像),结果看起来像 1920x1080。一张简单的图片显示完整的分辨率。
<html>
<head>
<script type="text/javascript"
src="//www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js">
</script>
<style>
body {
display: block;
margin: 0px;
color: #f0f000;
background-color: #ff00ff;
width: 100%; //this is important
height: 100%; //this is important
}
iframe {
width: 3840px;
height: 2160px;
min-width: 3840px;
min-height: 2160px;
}
</style>
</head>
<body>
<!--<img src="EdAGGFS.jpg" width="100%" height="100%" frameBorder="0">Browser not compatible.</img>-->
<iframe id="test" src="https://sorrycantshowyou.com" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen="true"></iframe>
<script>
const context = cast.framework.CastReceiverContext.getInstance();
const options = new cast.framework.CastReceiverOptions();
//options.maxInactivity = 3600; //Development only
options.disableIdleTimeout = true;
context.start(options);
</script>
</body>
</html>
我没有进一步测试的想法。我找不到任何提供 HTML 内容的 Chromecast Ultra 规范的参考资料。我只是假设它应该能够像视频或图像一样显示 3840x2160。我错了吗?也许 Chromecast 的处理器无法渲染那么大的 HTML,所以它会裁剪它?
【问题讨论】:
-
刚刚注意到 chrome 调试器中的顶行 (
标签: chromecast