Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video not scaling when SurfaceView is scaled

I am playing a video in a surfaceView. When I scale the surfaceView its coordinated are properly scaled but the video content which is being played is not.

I am scaling view by using ViewHelper.setscaleX method. I tried several things but was unable to scale video..if I change the params then video is properly scaled. But that makes the transition slow. Please see the snapshot of initial video and final video (after scaling).

initial video with surface view scale 1

video after surfaceView is scaled. See at the bottom-right

like image 885
sanjeev Avatar asked Sep 11 '14 12:09

sanjeev


1 Answers

Solved it. Use TextureView instead of SurfaceView. Animations doesn't work on surfaceview. Use this link to play video using textureView : Playing video on TextureView

like image 101
sanjeev Avatar answered Oct 04 '22 22:10

sanjeev