This is my code.
public class MainActivity extends Activity {
ListView list;
public ArrayList videoList;
public CustomListAdapter a
Try setting a VideoURI
instead of VideoPath
and check again,
VideoView video = (VideoView)convertView.findViewById(R.id.video_view);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(video);
video.setMediaController(mediaController);
video.setVideoURI(Uri.parse(videoList.get(position)));
video.start();
UPDATE: If you are planning to use video's from YouTube only then the best way would be using the official YouTube API. Check here,
Android YouTube app Play Video Intent
How to Play YouTube Video in Android App