Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 {


    }
like image 518
yogendra joshi Avatar asked Apr 21 '15 09:04

yogendra joshi


1 Answers

Try this For VideoSurfaceView

surfaceView = (VideoSurfaceView) view.findViewById(R.id.surface_view);
surfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
surfaceView.setZOrderOnTop(true);
like image 184
Amit Prajapati Avatar answered Sep 20 '22 17:09

Amit Prajapati