Log in or register to post comments

How to change vuforia video at runtime

September 16, 2014 - 5:41am #1

I'm using vuforia SDK on android and I'm working with videoplayback sample code. I want to change the source file of the video at runtime. To do that, when I want to load a new video file, first I change the video file name like this:

mMovieName[0] = Environment.getExternalStorageDirectory().getPath()+"/video1.mp4";

I checked the path to the video file by loading it from the begining and it's correct. I put this line in this method:

onQCARUpdate(State state)

which is run in equal time steps. Then I load the new video like this in the same method:

mRenderer.requestLoad(0, mMovieName[0], 0, false);

So it looks like this:

@Override
	public void onQCARUpdate(State state)
	{
		if(loadNewVideo > 0)
		{
			mMovieName[0] = Environment.getExternalStorageDirectory().getPath()+"/video1.mp4";
			mRenderer.requestLoad(0, mMovieName[0], 0, false);
		}
	}

But the problem is that nothing changes. The initial video continues as it was being played and no errors or crashes. Should I do something aside from these too or is it that I'm completely off?

Log in or register to post comments