简体   繁体   中英

Getting black screen when added ExoPlayer into GLSurfaceView

I have one GLsurfaceview and video SurfaceView when I added Surfaceview into GLSurfaceView for playing video and result is I am getting black screen instead of video screen. I am getting Audio properly but video screen will not display and it remains black during the whole video.

Both are used for different purpose GLSurfaceView for Page turn while Video surfaceview for ExoPlayer.

GLSurfaceView :

    public class CurlView extends GLSurfaceView implements View.OnTouchListener,
        CurlRenderer.Observer {

        }

Video SurfaceView of ExoPlayer :

    public class VideoSurfaceView extends SurfaceView {


    }

Try this For VideoSurfaceView

surfaceView = (VideoSurfaceView) view.findViewById(R.id.surface_view);
surfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
surfaceView.setZOrderOnTop(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM