我正在开发一个基于 Polymer 的静态网站。我为位置(地图部分)集成了 VR 视图:https ://valleydevfest.com/
源 repo 是develop
分支:https ://github.com/gdgfresno/valleydevfest/tree/develop
VR 视图由一个元素组成,该元素获取url
360 度单色图像并包含带有实际 VR 视图的 iframe:https://github.com/gdgfresno/valleydevfest/blob/develop/src/elements/vr-view。 html
<template>
<div style="text-align:center">
<iframe
frameborder="0"
width="100%"
height="250"
scrolling="no"
allowfullscreen
src="/vrview.html?image=[[url]]&is_stereo=false">
</iframe>
</div>
</template>
它在这里使用:https ://github.com/gdgfresno/valleydevfest/blob/develop/src/elements/map-block.html#L140
<link rel="import" href="vr-view.html">
...
<vr-view
url="[[_currentImage]]"
></vr-view>
现在,这在本地开发环境中都可以正常工作polymer serve
,或者当我unbundled
使用Web Server for Chrome
. 但是当我将它部署到 Firebase 时,VR 视图会显示“ Loader: Unable to load scene. Required parameter missing.
”错误消息。image
当、video
和object
参数均未作为 360 媒体源提供时,会在 VR 视图中触发此类错误。我不知道这怎么可能。我还尝试连接静态 URL。(如果我有多个图像并且它会开始旋转,那就是另一回事了,Firefox 和 Edge 很好,而 Chrome 失败了)。
Firebase 部署设置:https ://github.com/gdgfresno/valleydevfest/blob/develop/firebase.json
现在,这里是将构建部署为 gh-pages,源代码(未捆绑的构建目录):https ://github.com/MrCsabaToth/mrcsabatoth.github.io和网站:https://mrcsabatoth.github .io/这适用于 Chrome、FF 和 Edge。
到底是怎么回事?
新闻:我试图在没有自定义域名的情况下在单独的部署中重现这一点,并且 VR 视图元素可以正常工作。所以有一些关于自定义域的内容。也许与CORS有关?