0

I need any way to stop the draw of TextureView, not pause the video with MediaPlayer.

But why? Because I want stop the draw of the video and do some transitions on that view, when these transitions end, release the video.

I've tried to use lockCanvas() and unlockCanvas(). My app uses ExoPlayer(can help...). But doesn't work.

Iamat8
  • 3,888
  • 9
  • 25
  • 35
Pedro Paulo Amorim
  • 1,838
  • 2
  • 27
  • 50
  • "Stopping the draw" is easy -- just stop feeding it data -- but it sounds like you actually also want to start drawing something else. The easiest approach is probably to create a second View on top of the TextureView (use a FrameLayout), and just make it visible and draw on it. – fadden Aug 25 '15 at 18:04
  • I don't want draw something in the TextureView. I want stop the draw to rotate the TextureView with Rebound. But in some devices, if the video is running, will lower the FPS because it's too much work to the Choreographer. – Pedro Paulo Amorim Aug 25 '15 at 18:25
  • If you want to rotate the TextureView, apply a rotation to the transformation matrix. It won't matter whether the video is running or not. – fadden Aug 25 '15 at 19:41
  • I not only rotate the view. I rotate, scale and move the position because I need do this to create an bigger view to my app (like a fullscreen). – Pedro Paulo Amorim Aug 25 '15 at 20:25
  • You can rotate, translate, and scale the TextureView contents with the transformation matrix. Changing the size and position of the View itself is a separate operation, which is also unaffected by whether or not the video is running. – fadden Aug 25 '15 at 22:47

0 Answers0