Iscander Posted July 19, 2022 Share Posted July 19, 2022 Hi, I have a need to temporarily stop a video so that it doesn't affect performance and restart it without having to reload it. let vTexture = PIXI.Texture.from(`assets/video/tig.webm`); let vSprite = new PIXI.Sprite(vTexture); application.stage.addChild(vSprite); vTexture.baseTexture.resource.source.play(); Before calling the play() function, the CPU load is ~0.5% after calling ~11% (it is large video). vTexture.baseTexture.resource.source.pause(); application.stage.removeChild(vSprite); vSprite.destroy(); application.destroy(); None of this reduces the load on the processor. vTexture.baseTexture.resource.source.src = null; This is works, but how to play again. 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.