是否支持Android缩放视频? [英] Does Android support scaling Video?

查看:119
本文介绍了是否支持Android缩放视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VideoView是有可能设置为Android的比例因子?默认情况下,视频视图调整自身大小以适应视频的EN codeD分辨率。我可以强制的Andr​​oid渲染视频转换成更小或更大的矩形?

解决方案
  

默认情况下,视频观看尺寸缩小   自己以适应EN codeD分辨率   的视频。

VideoView (或 SurfaceView MediaPlayer的使用)将是你告诉它要在你的布局规模。 在这个空间的,视频将回放尽可能的大,同时保持纵横比。

  

我可以强制的Andr​​oid来呈现视频   成更小或更大矩形?

是:使你的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆