gpt4 book ai didi

javascript - Google VR 视频无法加载

转载 作者:数据小太阳 更新时间:2023-10-29 06:10:06 25 4
gpt4 key购买 nike

我正在使用谷歌 VR View for the web加载 360 度全景视频。但是当我加载视频时,它显示 Error, Render: video load error: [object event]

enter image description here

这是控制台显示的内容:

enter image description here

当我从 Google 的 url 加载示例视频时,它就像一个魅力:https://storage.googleapis.com/vrview/examples/video/congo_2048.mp4

这是我正在使用的代码(具有相同的视频,但存储在我的网站上):

<div id="vrview"></div>

<script src="//storage.googleapis.com/vrview/2.0/build/vrview.min.js"></script>

<script>
window.addEventListener('load', onVrViewLoad)
function onVrViewLoad() {
var vrView = new VRView.Player('#vrview', {
video: 'video/congo.mp4',
is_stereo: true
});
};
</script>

[编辑] 即使我的域中有完整的视频链接,视频仍然无法播放。

[编辑 2] 这是文件结构:

  • CSS
  • 图片
  • js
  • 视频
    • 刚果.mp4
  • index.html

谢谢你帮助我!

最佳答案

编辑:

设置 CORS header - 请参阅 http://enable-cors.org/server.html服务器特定的详细信息

关于javascript - Google VR 视频无法加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41087973/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com