tuneboy Posted March 5, 2020 Share Posted March 5, 2020 Pixi has PIXI.VideoBaseTexture for embedding videos in webgl. Looking at the API I'm not seeing anyway to specify a playback time or video frame. I'd like to control the progression of frames with my code instead of the video just autoplaying. Is there any way to do this in Pixi? ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 5, 2020 Share Posted March 5, 2020 Hello, and Welcome to the forums! This requires you to know both how to work with HTML5 Video and how to hack pixi texture resource. https://github.com/pixijs/pixi.js/blob/dev/packages/core/src/textures/resources/VideoResource.ts I could give you more information, but I'm too tired and I think you can get everything from source code and other threads in this forum regarding textures. Quote Link to comment Share on other sites More sharing options...
themoonrat Posted March 5, 2020 Share Posted March 5, 2020 You can access the raw html video via videoSprite.texture.baseTexture.resource.source So from there you can set the currentTime to manually change the play location - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video Quote Link to comment Share on other sites More sharing options...
tuneboy Posted March 5, 2020 Author Share Posted March 5, 2020 Great that makes sense. I'll give it a try. Thanks for the help. 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.