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

Warning: "WebGL: INVALID_VALUE: texImage2D: no video" #60

Closed
gossi opened this issue Aug 22, 2017 · 5 comments
Closed

Warning: "WebGL: INVALID_VALUE: texImage2D: no video" #60

gossi opened this issue Aug 22, 2017 · 5 comments
Labels

Comments

@gossi
Copy link

gossi commented Aug 22, 2017

I do get this warning fairly often, populating my console: WebGL: INVALID_VALUE: texImage2D: no video

I tracked it down to the function:

export function updateTexture(gl, texture, element){
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, element);
}

Background: I do have parts of my videocontext, which are black (nothing to show at that time). I also see this, when the video is loading.

@emshotton
Copy link
Contributor

Hi @gossi thanks for raising this! This has been an issue for ages. I've published a fix in v0.51.2.

The problem was elements being passed into that function which weren't fully loaded and ready to display. I've added a guard for the elements readyState at the top of the function which should hopefully mitigate this.

Let me know if you still see the warning during the parts of your VideoContext instance which are black.

@gossi
Copy link
Author

gossi commented Sep 19, 2017

looks fine now :)

@gossi gossi closed this as completed Sep 19, 2017
@bitcloudTheFirst
Copy link

Hi, this may still be an issue in certain circumstances (unless I'm doing it wrong)

Connecting audio elements to the canvas works, but it tries to attach a texture, and you get this warning again. I can't figure out how to check for this. Is there a known fix?

@PTaylour
Copy link
Contributor

It doesn't sound like you're doing anything wrong.

Do you see the issue with a simple graph like this?

Audio -> destination

@dedurus
Copy link

dedurus commented Dec 28, 2020

Please check a workaround in #216

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

No branches or pull requests

5 participants