Search the Community
Showing results for tags 'cross origin'.
-
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(CROSS_ORIGIN_URL_MP4); var video = new PIXI.Sprite(videoTexture); // my json file is at local, and the image is on cdn server, so I change baseUrl right after add function, the image is loaded successfully, but when I try to use it, it shows the similar message // pixi.min.js:8 Uncaught DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at ... may not be loaded. PIXI.loader.add("/src/image/spritesheet.json"); PIXI.loader.baseUrl = CDN_SERVER_BASE_URL; PIXI.loader.load(() => { var image = PIXI.Sprite.fromImage(FRAME_KEY); }); the response header has the property "access-control-allow-origin: *", and the same mp4 URL works fine in DOM element, am I missing something?
- 8 replies
-
- cross origin
- loader
-
(and 3 more)
Tagged with:
-
When trying to use pixelperfect checks IE9 throws SCRIPT5022: DOM Exception: SECURITY_ERR (18) mysprite.input.pixelPerfectOver = true;mysprite.input.pixelPerfectClick = true; I have this set if it matters: load.crossOrigin = "Anonymous" The server has header Access-Control-Allow-Origin: * Same code works on IE11, Chrome, Safari. Is there a good way to get this working? I can do other image operations on the same image such as redrawing it on bitmapdata and alpha masking without this problem.
-
- ie9
- pixel perfect
-
(and 2 more)
Tagged with:
-
Hey! I know this is not directly related to Phaser. However, here is the situation! We have a CDN and locally, we want to load from the CDN when doing Dev. When we do this we get this: Uncaught SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The cross-origin image at blah.com/blah/blah/atlaspreloader.png may not be loaded. I have seen in the past that on phaser and pixi's API is a crossOrigin property which is boolean. Can anyone explain what is happening here? We are unsure how to proceed. Should this be a local thing, where, we need to disable some kind of browser (chrome) options for development. Or is there something on the server side that must be done too? Basically how do we work around this issue? Thanks! Clark.