Using a VideoView is it possible to set a scale factor for Android? By Default the video view resizes itself to fit the encoded resolution of the Video. Can I force Android to render a video into a smaller or larger rect?
There are many questions on the web asking how to resize the VideoView to an arbitrary aspect ratio. Say the original video is 4:3 (width:height) and would like to change it to 16:9 (OK, I don't care the picture looks flattened). Many people use the Android built-in 'android.widget.VideoView' to play video and since it is derived from SurfaceView, people thus intuitively go on to use 'SurfaceView.
Setting your SurfaceView layout to wrap_content will not size a video to play at the proper aspect ratio. A SurfaceView is an optimized drawing surface A video is drawn to a SurfaceView, not contained within it wrap_content is synonymous with fill_parent for a SurfaceView. What you want to do is get the dimensions of your video from the MediaPlayer object. You can then set the aspect ratio of the
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}