내 간단한 안드로이드 VideoView에서 mp4 비디오를 재생하려고합니다. 여기 내 코드는안드로이드 비디오 뷰에서 mp4 파일 재생
VideoView videoView;
videoView = (VideoView) findViewById(R.id.videoViewa);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
//URI either from net
Uri video = Uri.parse("http://www.fieldandrurallife.tv/videos/Benltey%20Mulsanne.mp4");
videoView.setMediaController(mediaController);
videoView.setVideoURI(video);
videoView.start();
내가 응용 프로그램
Couldn't open file on client side, trying server side
error (1, -1004)
를 시작하려고 다음과 같은 오류를 얻고있다
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
처럼
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
<VideoView
android:id="@+id/videoViewa"
android:layout_width="match_parent"
android:layout_gravity="center"
android:layout_height="match_parent" />
</RelativeLayout>
매니페스트 보이는
처럼 내 레이아웃이 보인다누군가 얼굴을 가졌습니다. 같은거야?
고정 !!! 동일한 문제가있는 사용자의 경우 Android가 H.264 압축 동영상 만 재생합니다. 위에서 언급 한 비디오를 시도하면 문제가 해결됩니다. – ramesh