9
我捕捉Android设备这样在纵向新的视频:Android的人像影像显示方向错在VideoView
Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
startActivityForResult(intent, 1886);
,这让我这个文件:“到/ mnt/SD卡/ DCIM /相机/视频-2012-02-02-10-45-48.mp4"
然后我玩这样的:
private VideoView videoView = (VideoView) findViewById(R.id.videoView);
String videoUrl = "/mnt/sdcard/DCIM/Camera/video-2012-02-02-10-45-48.mp4";
videoView.setMediaController(new MediaController(this));
videoView.setVideoURI(Uri.parse(videoUrl));
videoView.start();
这是我的布局文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<VideoView
android:id="@+id/videoView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true" />
</RelativeLayout>
当我在标准的Android图库中播放时,其方向是正确的。但是当我在上面的VideoView中播放视频时,它旋转了90度。景观效果很好,唯一的问题是肖像视频。
如何在VideoView中旋转此视频?
另外,如何以编程方式确定方向?
你能找到解决这个问题的办法吗?我有同样的问题 – Thatdude1 2015-02-14 18:47:26