Log in or register to post comments

Wrong orientation in video rendering on OpenGL surface view

January 29, 2018 - 8:23am #1

I am working on Android project using Vuforia library.

The project shows streaming video on tracked image target. I am based on VideoPlayBack 7-0-43 source code.

On the source code, instead of local video, creates mediaplayer with url of streaming videos.

it works good on the activity, but if go to full screen video activity for showing the video with full screen (not used Vuforia sample code, made my own), change orientation on the activity, and come back to AR page, the video is rendered with wrong orientation. (180 degrees rotated)

I have no idea why it works wrong.

For detecting orientation changes, I put this code for the activity (Full screen video activity).

    @Override

    public void onConfigurationChanged(Configuration newConfig) {

        super.onConfigurationChanged(newConfig);

        mMediaController.onConfiguration();

        Intent intent = new Intent("configurationChanged");

        LocalBroadcastManager.getInstance(this).sendBroadcast(intent); // This broadcast is for calling this code; vuforiaAppSession.onConfigurationChanged();

    }

 

But this code is never called all the time.

Please help me to know why videos are rendered with wrong orientation after changing orientation in other activity.

Looking forward to hearing reply.

 

Best regards.

Log in or register to post comments