I get an error when playing a video from a resource folder and a source folder.
Error MediaPlayer (1, -2147483648) Error VideoView 1, -2147483648.
I tried from a folder with resources like.
private String SrcPath = "file:///android_asset/aaa.mp4";
VideoView vv = (VideoView)findViewById(R.id.videoView1);
vv.setVideoPath(SrcPath);
MediaController controller = new MediaController(this);
controller.setAnchorView(vv);
vv.setMediaController(controller);
vv.requestFocus();
vv.start();
and for the raw folder, I used the URI as:
Uri video = Uri.parse("android.resource://com.usecontentprovider/raw/aaa.mp4");
vv.setVideoURI(video);
In both cases, I received one error message.
source
share