admin管理员组文章数量:1389762
I'm using Google VR View for the web to load in a 360 video. But when I load the video, it says Error, Render: video load error: [object event]
This is what the console shows:
When I load the example video from Google's url, it works like a charm: .mp4
This is the code I'm using (with the same video, but stored on my site):
<div id="vrview"></div>
<script src="//storage.googleapis/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>
[Edit] Even with the full link to the video on my domain, the video still doesn't work.
[Edit 2] This is the file structure:
- css
- img
- js
- video
- congo.mp4
- index.html
Thanks for helping me out!
I'm using Google VR View for the web to load in a 360 video. But when I load the video, it says Error, Render: video load error: [object event]
This is what the console shows:
When I load the example video from Google's url, it works like a charm: https://storage.googleapis./vrview/examples/video/congo_2048.mp4
This is the code I'm using (with the same video, but stored on my site):
<div id="vrview"></div>
<script src="//storage.googleapis./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>
[Edit] Even with the full link to the video on my domain, the video still doesn't work.
[Edit 2] This is the file structure:
- css
- img
- js
- video
- congo.mp4
- index.html
Thanks for helping me out!
Share Improve this question edited Dec 11, 2016 at 16:39 Max de Mooij asked Dec 11, 2016 at 15:47 Max de MooijMax de Mooij 731 silver badge9 bronze badges 1- So how did you solve this – utdev Commented May 12, 2017 at 11:19
3 Answers
Reset to default 3EDIT:
Set CORS headers - see http://enable-cors/server.html for server specific details
Use two required parameters (width, height), then it works well without setting CORS headers.
However, I am now struggling to solve similar problem in the case of handling local or youbute 360 video. i.e. I can run just a provied example file but not real 360 files. Do you have any progress?
My post: https://stackoverflow./questions/41312283/how-to-play-youtube-360-videos-using-vrview-web
cf link. http://vcml.cafe24./humble.php
window.addEventListener('load', onVrViewLoad);
//It works
function onVrViewLoad() {
var vrView = new VRView.Player('#vrview', {
width: '100%',
height: 600,
video: 'http://storage.googleapis./vrview/examples/video/congo_2048.mp4',
is_stereo: true,
});
//Now I'm struggling. Not working
var vrView1 = new VRView.Player('#vrview1', {
width: '100%',
height: 600,
video: 'https://www.youtube./embed/OkLa7jkFXpU',
//video: 'http://vcml.cafe24./video.mp4',
is_stereo: false,
});
}
Congo Video
<div id="vrview"></div>
Youtubu Video
<div id="vrview1"></div>
Do not use this script <script src="//storage.googleapis./vrview/2.0/build/vrview.min.js"></script>
,You have use <script src="vrview-master/build/vrview.js"></script>
from the sample zip file.
本文标签: javascriptGoogle VR video doesn39t loadStack Overflow
版权声明:本文标题:javascript - Google VR video doesn't load - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744740279a2622566.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论