Issue explanation: a blank screen appears for a few moments (it's usually less than half a second), after the target was detected
When?: right after a target is detected, and the video is right about to start (PLAYING state)
Known issues: there seems to be a similar issue in Unity (check https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/video-playback-black-screen-appears-moment).
How to solve? Well, the solution is based on NalinS' idea: try to delay a few frames the render of the contents
Just go to VideoPlaybackRenderer.java, inside renderFrame method, and replace this:
if ((currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.READY)
|| (currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.REACHED_END)
|| (currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.NOT_READY)
|| (currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.ERROR))
{
.....
} else {
.....
}
with this:
if ((currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.READY)
|| (currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.REACHED_END)
|| (currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.NOT_READY)
|| (currentStatus[currentTarget] == VideoPlayerHelper.MEDIA_STATE.ERROR))
{
.....
} else {
mFramesPlayed++;
if (mFramesPlayed < MAX_FRAMES_TO_JUMP) return;
.....
}
You will also have to add a new class member:
private int mFramesPlayed = 0;
And a constant to define how many frames you'd like to eat from the beginning of the video:
private static final int MAX_FRAMES_TO_JUMP = 10;
Hope this helps someone!
Thanks for this, very helpful; I'll make it as a sticky at the top of the Android forum.