0

I try to put a video as a texture on a mesh, for that, I tested 2 differents example:

http://jeromeetienne.github.io/threex.videotexture/examples/videotexture.html

and

http://stemkoski.github.io/Three.js/Video.html

Both works as expected on the web but it doesn't show anything if I download them from github in local.

If I put

videoTexture.needsUpdate = false;

then floor and screen are displayed. The video is working correctly as I can heard the sound behind but no images are displayed.

Any idea how to resolve this problem ?

(I have tested with both firefox and chromium).

Edit: in the console of firefox, I have this

SecurityError: The operation is insecure. Three.js:25696:0
Error: WebGL: The canvas used as source for texImage2D here is tainted (write-only). It is forbidden to load a WebGL texture from a tainted canvas. A Canvas becomes tainted for example when a cross-domain image is drawn on it. See https://developer.mozilla.org/en/WebGL/Cross-Domain_Textures
Seltymar
  • 337
  • 6
  • 21

1 Answers1

0

The problem was completly different than what I thought.

As I was running the file from a local folder and not from the local server, I had the Same-Origin Policy Problem.

As explain in this answer : https://stackoverflow.com/a/24042463/1224782

Community
  • 1
  • 1
Seltymar
  • 337
  • 6
  • 21