Hi guys
I have problems using cross origin resources, as I tested direct load of image is working, but the spritesheet & mp4 I still can't get it work, here is some use cases:
// it works
var image = PIXI.Sprite.fromImage(CROSS_ORIGIN_URL_IMAGE);
// not work and showing the error message
// Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The video element contains cross-origin data, and may not be loaded
var videoTexture = PIXI.Texture.fromVideo(
My guess is you are experiencing this issue: https://github.com/pixijs/pixi.js/issues/4007
Looks like the loader also has a bug where it doesn't set the crossOrigin value of videos/audio correctly. You can work around it by creating the video DOM element youself, setting the crossOrigin value, and then passing it into the loader with:
.add('video-url', { metadata: { loadElement: myVideoDomElement } })
However, the image is a bit more interesting. You can try ensuring it *doesn't* set