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

Non 360 examples are not working when run locally #256

Open
dmitriy-baltak opened this issue Nov 1, 2021 · 2 comments
Open

Non 360 examples are not working when run locally #256

dmitriy-baltak opened this issue Nov 1, 2021 · 2 comments

Comments

@dmitriy-baltak
Copy link

dmitriy-baltak commented Nov 1, 2021

Hi guys, I'm trying to run examples of videojs-vr implementation from examples folder of the repo by running npm run build-prod && npm run server and accessing http://localhost:9999/ but unfortunately none of the examples are working except those that have 360 projection, all other examples fail with this error:

video.js:249 VIDEOJS: ERROR: TypeError: Cannot read properties of undefined (reading '0')
    at VR.changeProjection_ (videojs-vr.js:48939)
    at VR.init (videojs-vr.js:49298)
    at HTMLDivElement.data.dispatcher (video.js:2353)
    at trigger (video.js:2489)
    at Player.trigger$1 [as trigger] (video.js:3430)
    at Player.<computed> [as handleTechLoadedmetadata_] (video.js:29583)
    at Player.<anonymous> (video.js:25474)
    at HTMLVideoElement.data.dispatcher (video.js:2353)

Any idea what I might be missing here?

The reason why I was trying to run them in the first place is that I have similar issue when I try to use plugin on my website, but instead of error for non 360 projection videos I have just a back canvas with timeline running but nothing changing on canvas.

Also important to note that all of the examples on https://videojs-vr.netlify.app/ are actually working fine for me, so that's quite confusing.

@dmitriy-baltak
Copy link
Author

The issue seems to be related to the fact that Threejs changed it's api and videojs-vr is still using old one. It's trying to use faceVertexUvs as an array, when a correct way of doing it is getAttribute( 'uv' ). There might be more issues, but unfortunately I had a limited time to look into it.

Btw, https://videojs-vr.netlify.app/ is using older version of videojs-vr (1.7.2)

@ruhowe
Copy link

ruhowe commented Mar 23, 2023

Ah, I see. This is helpful to explain why only 360 sphere works.

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

2 participants