Perhaps this is a simpler issue than I realize, but I am somewhat new to HTML/JS and this seems to me to be a specific issue with this code. I am using the Google VR Viewer to embed 360 elements within my web-page.
Their documentation here is simple enough and setting up as laid out on their website works fine if I'm using media hosted on Google's domain as well. This the code I'm using that works just dandy:
<script src="https://storage.googleapis.com/vrview/2.0/build/vrview.min.js"></script>
<script>
window.addEventListener('load', onVrViewLoad);
function onVrViewLoad() {
vrView = new VRView.Player('#vrview', {
width: '100%',
height: 480,
image: 'https://storage.googleapis.com/vrview/examples/coral.jpg',
is_stereo: true,
is_autopan_off: true
});
}
</script>
However, I need to have the .js files hosted on my own server, as opposed to just linking to Google. So I tried downloading the script and using following code and I can't get it to work. Can anyone spot what's wrong?
<script src="build/vrview.min.js"></script>
<script>
window.addEventListener('load', onVrViewLoad);
function onVrViewLoad() {
vrView = new VRView.Player('#vrview', {
width: '100%',
height: 480,
image: '360/coral.jpg',
is_stereo: true,
is_autopan_off: true
});
}
</script>
For reference, the error I get is
Cannot GET /index.html?image=http://127.0.0.1:61060/360/coral.jpg&is_stereo=true&is_autopan_off=true&
Thanks! Hopefully this isn't too dumb of a question.