fengFanYong Posted December 20, 2016 Share Posted December 20, 2016 hello i create a video,How can I control video in pixi(start,stop); var texture = PIXI.Texture.fromVideo('./asd.mp4'); var videoSprite = new PIXI.Sprite(texture); Thank! Quote Link to comment Share on other sites More sharing options...
xerver Posted December 20, 2016 Share Posted December 20, 2016 texture.baseTexture.source is the HTMLVideoElement. You can use that to control the video. Quote Link to comment Share on other sites More sharing options...
kremata Posted April 4, 2019 Share Posted April 4, 2019 Sorry but texture.baseTexture.source doesn't work for me. Below is my code, If I use "mysource.stop() it says "Cannot read property 'stop' of undefined". " var texture = PIXI.Texture.fromVideo('/static/vids/C.mp4'); var videoSprite = new PIXI.Sprite(texture); var mysource = texture.baseTexture.source; Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 4, 2019 Share Posted April 4, 2019 @kremata in pixiJS-v5 its in "texture.baseTexture.resource.source" or something like that. Prepare to read v5 docs and source-code, you'll encounter more things like that. 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.