0
\$\begingroup\$

I managed to get a video to play in Pixi using the following line:

    this._texture = PIXI.Texture.from(require("Images/video.mp4"));

The problem is that I can't find any properties to do things such as pausing it, forwarding/backwarding, adjusting volume, adjusting playing-speed etc.

Neither the PIXI.Texture or PIXI.Sprite seem to have any properties for this. Is this legitimately all the control PIXI gives you or am I missing something?

\$\endgroup\$
0

1 Answer 1

2
\$\begingroup\$

Taking a tour through the docs, it looks like you should be able to access the HTMLVideoElement that's playing your video via:

this._texture.baseTexture.resource.source

And then use members it inherits from HTMLMediaElement like .pause(), .fastSeek(), .volume, .playbackRate, etc.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .