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

Having a hard time with setContainer with the Simple Video Plane example #2

Open
carrotscarrots opened this issue Feb 13, 2024 · 1 comment

Comments

@carrotscarrots
Copy link

Hi Martin,

I'm stuck with an error I don't understand how to fix
Curtains: no container provided in the initial parameters. Use setContainer() method to set one later and initialize the WebGL context

I've recopied this sandbox locally https://codesandbox.io/p/sandbox/vue-curtains-simple-video-plane-1n2sch
And I've tried to add the following inside and outside onReady of SimpleVideoPlane.vue

  container = document.getElementById("SimplePlane")
  setContainer(container)

I also tried version 1.0.1 and 1.0.2, I'm on Vue 3.2.41

Any ideas on how I could fix this problem?

Thank you for reading

@martinlaxenaire
Copy link
Owner

Hi @carrotscarrots,

you don't need to set a container yourself as it is already done in the onMounted hook of the Curtains component (see https://github.com/martinlaxenaire/vue-curtains/blob/main/src/vue-curtains/components/Curtains/index.vue#L48).
You can safely ignore this warning.

As for the codesandbox example, it looks like the video url was no longer valid, so I've updated it with a new one and it should work again now.

Cheers,

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