mcsteeze Posted November 22, 2014 Share Posted November 22, 2014 Hi, Am I correct that the only way to load in a video texture and have it render in the Pixi.js renderer is by using the VideoTexture.fromURL method?var texture = PIXI.VideoTexture.fromUrl("test.mp4");If this is correct, is there a way to have control to the native HTMLMediaElement controls? (i.e. restart the video, scroll in video, etc.) Lastly, because this is webGL, I would assume that displaying video textures (playing clips) in pixi is faster than just using the native html5 video element and some library that manipulates it (like videojs) Ultimately I would like to be able to make custom controls for the video player using Pixi sprites, does this sound workable? The main thing is I just do not know how to control the video once it is playing... Quote Link to comment Share on other sites More sharing options...
xerver Posted November 22, 2014 Share Posted November 22, 2014 > is there a way to have control to the native HTMLMediaElement controls? (i.e. restart the video, scroll in video, etc.) "texture.baseTexture.source" is the video element, just like any other texture's source. > Lastly, because this is webGL, I would assume that displaying video textures (playing clips) in pixi is faster than just using the native html5 video element and some library that manipulates it (like videojs)Nope, basically what is happening is the normal playing of the video, then each frame is captured uploaded to the gpu and rerendered through pixi. You are rendering each frame twice, so unless you are doing something with shaders or other pixi features you are basically just reducing performance for no reason.>Ultimately I would like to be able to make custom controls for the video player using Pixi sprites, does this sound workable? The main thing is I just do not know how to control the video once it is playing...You can, but see my above comment. If that is all you are doing with it you should just use a native video player directly. 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.