Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'dash' of undefined #29

Open
adboio opened this issue Oct 25, 2020 · 0 comments
Open

TypeError: Cannot read property 'dash' of undefined #29

adboio opened this issue Oct 25, 2020 · 0 comments

Comments

@adboio
Copy link

adboio commented Oct 25, 2020

Hey, working on getting a Vimeo video playing in my A-Frame project but running into some errors.

Node server:

// The route for getting videos from the vimeo API
router.get('/vimeo/api', (request, response) => {
  let api = new Vimeo(null, null, process.env.VIMEO_TOKEN);

  api.request({
      method: 'GET',
      path: request.query.path,
      headers: { Accept: 'application/vnd.vimeo.*+json;version=3.4' },
    },
    function(error, body, status_code, headers) {
      if (error) {
        response.status(500).send(error);
        console.log('[Server] ' + error);
      } else {
        // Pass through the whole JSON response
        console.log(body);
        response.status(200).send(body);
      }
    }
  );
});

Frontend (directly from example):

<a-scene>
  <a-camera position="0 0 0"></a-camera>
  <a-entity vimeo="id: 152394118;
                   leftEye:#leftEye;
                   rightEye:#rightEye;">
    <a-entity id="rightEye"></a-entity>
    <a-entity id="leftEye"></a-entity>
  </a-entity>
</a-scene>

Node server is returning this for this video:

{
  uri: '/videos/152394118',
  description: '360 VR Driving Contents\n' +
    '[Youtube] https://youtu.be/zZ_2_lwVdnc\n' +
    '[Facebook] https://www.facebook.com/361614593915998/videos/916470761763709/',
  width: 1280,
  height: 640
}

The first error I get:

Uncaught Error: [Vimeo] Video provided is not correct, try changing the video id and running the code again

And then:

Uncaught (in promise) Error: TypeError: Cannot read property 'dash' of undefined

I've tried this on Safari & Chrome, and with several different videos.

Any help would be appreciated. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant