I have a problem with AnimatedSprite in inactive tab. If you leave the tab after the start of the animation (goToAndPlay()), the event onComplete() does not work. Why is this happening?
I try update shared ticker by setInterval()
this.app = new PIXI.Application({
//...
sharedTicker : true,
autoStart: false,
//...
});
this.app.ticker.start();
this.tickerInterval = null;
// Events:
//...
this.emitter.on('window-focus', () => {
this.tickerInterval && clearInterval(this.tickerInterval);
this.app.ticker.start()
}).on('window-blur', function(){
this.app.ticker.stop();
this.tickerInterval = setInterval(function(){
this.app.ticker.update(new Date().getTime());
this.app.renderer.render(this.app.stage);
}, 30);
});