Skip to content

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

@adboio

Description

@adboio

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions