videojs-vr icon indicating copy to clipboard operation
videojs-vr copied to clipboard

undefined - player.vr().cameraVector;

Open atgillette opened this issue 6 years ago • 3 comments

Description

Briefly describe the issue. Include a reduced test case.

I'm not able to get the camerVector object from player.vr();

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. var player = videojs('my-video');
  2. player.vr().cameraVector;

Results

Expected

Please describe what you expected to see.

cameraVector object

Actual

Please describe what actually happened.

undefined

Error output

If there are any errors at all, please include them here.

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

what version of videojs does this occur with? videojs - 1.0.0 videojs-vr - 1.5.0

browsers

what browser are affected?

OSes

what platforms (operating systems and devices) are affected?

plugins

are any videojs plugins being used on the page? If so, please list them below.

atgillette avatar Oct 29 '18 21:10 atgillette

I am having the same issue. Any updates?

sarthak-chakraborty avatar Mar 01 '20 14:03 sarthak-chakraborty

So far, I figured that as you initialize the videojs these objects might be unavailable.

Here is what I did:

  • I had a global variable for the player variable
  • I started the plugin this.player = videojs('my-video-id'); in a function
  • I connected the VR this.player.vr({ debug: true, projection: '360' });
  • Then I had another function to fetch values from the player console.log('cameraVector', this.player.vr().cameraVector);

bunday avatar Jan 23 '21 18:01 bunday

A correct way to do this these days would be https://github.com/videojs/videojs-vr/issues/139#issuecomment-1028703034

filakhtov avatar Feb 03 '22 08:02 filakhtov