Unable to find Rajawali Video Texture in the latest revision

259 views Asked by At

Unable to find VideoTexture class in the latest rajawali revision(1.0.295-SNAPSHOT).
Please let me know is there any alternate for video texture? or exact repository location or url with VideoTexture file?

1

There are 1 answers

0
miracula On

You can use StreamingTexture instead like this:

MediaPlayer mediaPlayer = MediaPlayer.create(this, R.raw.my_video);
StreamingTexture videoTexture = new StreamingTexture("video", mediaPlayer);

To update the texture image you have to call StreamingTexture#update():

@Override
protected void onRender(long elapsedRealTime, double deltaTime) {
    super.onRender(elapsedRealTime, deltaTime);

    if (videoTexture != null) {
        // update texture from video content
        videoTexture.update();
    }
}