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\$
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.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.