是否支持Android缩放视频? [英] Does Android support scaling Video?
问题描述
使用VideoView是有可能设置为Android的比例因子?默认情况下,视频视图调整自身大小以适应视频的EN codeD分辨率。我可以强制的Android渲染视频转换成更小或更大的矩形?
默认情况下,视频观看尺寸缩小 自己以适应EN codeD分辨率 的视频。
VideoView
(或 SurfaceView
与 MediaPlayer的使用
)将是你告诉它要在你的布局规模。 在这个空间的,视频将回放尽可能的大,同时保持纵横比。
我可以强制的Android来呈现视频 成更小或更大矩形?
是:使你的 VideoView
是你想要的大小,而Android将进行缩放以适合 VideoView
。
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?
By Default the video view resizes itself to fit the encoded resolution of the Video.
VideoView
(or the SurfaceView
for use with MediaPlayer
) will be the size you tell it to be in your layout. Within that space, the video will play back as large as possible while maintaining the aspect ratio.
Can I force Android to render a video into a smaller or larger rect?
Yes: make your VideoView
be the size you want, and Android will scale to fit the size of the VideoView
.
这篇关于是否支持Android缩放视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!