Google VR Web: Plugin is unable to append a URL correctly, adds incorrect path name

Viewed 164

I am not able to figure out how I have to implement Google VR. I am planning to implement this: http://googlevr.github.io/vrview/examples/video/ on my website.

I have copy-pasted the code from the website and tested locally through "Web Server for Chrome" Extension.

It does not work.

Upon Inspect Element: I realised the code was this:

<iframe allowfullscreen="true" scrolling="no" width="100%" height="480" src="http://127.0.0.1:8887/js/index.html?video=http://127.0.0.1:8887/congo_2048.mp4&amp;is_stereo=true&amp;loop=false&amp;" style="border: 0px;"></iframe>

The Video URL set in JS file was This:

vrView = new VRView.Player('#vrview', {
    width: '100%',
    height: 480,
    video: 'congo_2048.mp4',
    is_stereo: true,
    loop: false,
  });

Question1: the video path is this-->'congo_2048.mp4', why its converting it to "http://127.0.0.1:8887/js/index.html?video=http://127.0.0.1:8887/congo_2048.mp4&is_stereo=true&loop=false&amp;" ??

Now, I uploaded the code on my website. It seems to be not working there as well.

Demo: https://prashantsani.com/Misc/google-vr-test/vr.html

Again, Instead of the iframe taking this as path:

"https://prashantsani.com/Misc/google-vr-test/congo_2048.mp4"

It takes this path:

"https://prashantsani.com/Misc/google-vr-test/js/index.html?video=https://prashantsani.com/Misc/google-vr-test/congo_2048.mp4&is_stereo=true&loop=false&"

Question2: Also, The demo on http://googlevr.github.io/vrview/ isn't working.

Question3: Do we have to create a new index.html file that imports threejs and that will be inserted in iframe? Sorry, But I couldn't find any such information on https://developers.google.com/vr/concepts/vrview-web

Question4: What are the exact steps required other than: https://developers.google.com/vr/concepts/vrview-web ?

I have tried to go through this link (Google VR video doesn't load). But Unfortunately, No solution from this link seems to be working. Also, This isn't a problem of CORS. The video path itself on the iframe is wrong.

(The main question here is not why the video isn't loading, it's why the plugin is adding unnecessary paths and file names before the vide URL and what are the exact steps to adding a VR)

0 Answers
Related