Community

Topic: Android SDK

change position Button in video player (SOLVED)

Reza
Monday, November 13, 2017

hello
how to change position Button in video player

user profile image
Support Team  (expert)
Tuesday, November 14, 2017

Hi,
using the provided rendering in the tutorial, the button position is defined within the VideoMesh class in the DrawMesh method using the translateMatrix.
For example, if you want to place the button at the center of the marker, you can do this:

float [] translateMatrix = new float [16];

RenderUtils.matrix44Identity (translateMatrix);

// scales at bit
translateMatrix [0] = 0.67f;
translateMatrix [5] = 0.67f;
translateMatrix [10] = 1;
// translate a bit
translateMatrix [3] = 0.18f;
translateMatrix [7] = 0.0f;
translateMatrix [11] = -0.05f;
you can change the various values to position the icon where you want it.

Best,

Sign in to add a comment