My task is to play the video on SurfaceView after you pause the image in SurfaceView
My code to play
mPlayer.setOnCompletionListener(onCompletionListener); mPlayer.setDisplay(view.getHolder()); mPlayer.reset(); mPlayer.setDataSource(file.getAbsolutePath()); mPlayer.prepare(); mPlayer.start();
everything is ok video playback
in onCompletion
mPlayer.reset(); mPlayer.setDisplay(null); view.setBackgroundDrawable(Drawable.createFromPath(file.toString()));
but the image is transparent, and in the background I see the last video frame - it is not there. How transparent is the surface?
I'm trying to use
holder.lockCanvas()
but it returns null, why?
source share