maxouni Posted December 14, 2015 Share Posted December 14, 2015 Hi. I using PIXI for add on websait video with mask. Mask in base 64 stored in the same domain as the Library. but safari output error http://prntscr.com/9dzhrw code: if (this.type_ == 'video') { this.texture_ = PIXI.Texture.fromVideo(this.obj_); } else { this.texture_ = PIXI.Texture.fromImage(this.obj_.src, true); } this.sprite_ = new PIXI.Sprite(this.texture_); if (this.mask_) { /** * @type {PIXI.Sprite} * @private */ var mask = PIXI.Sprite.fromImage(this.mask_, true); mask.width = this.render_.width; mask.height = this.render_.height; this.sprite_.mask = mask; this.stage_.addChild(mask); }How To Be?CrossOrigin only set in PIXI.texture.FromImage How work PIXI.Sprite.FromImage ? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted December 14, 2015 Share Posted December 14, 2015 first load a texture, then create a spriteTexture.fromImage(this.mask_, true);var mask = Sprite.fromImage(this.mask_); Quote Link to comment Share on other sites More sharing options...
maxouni Posted December 14, 2015 Author Share Posted December 14, 2015 thanks, but in safari not working.help, addHeader set Access-Control-Allow-Origin * in .htaccess Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.