0

I have following code for playing video from SDCard:

mVideoView=(VideoView)findViewById(R.id.videoView1);
MediaController mc=new MediaController(this);
mc.setAnchorView(mVideoView);
mVideoView.setMediaController(mc);

String path=Environment.getExternalStorageDirectory().getAbsolutePath()+"/Media/b.flv";
mVideoView.setVideoPath(path);
mVideoView.start();

It is the working code for .mp4 files, but it doesn't work for .flv. Is there any way how can I play .flv videos from SDCard? Thank you.

user1166635
  • 2,741
  • 6
  • 22
  • 32

1 Answers1

1

According to the documentation, Android does not natively support the .flv container format. This limits your options to:

  1. Convert the video to some other format (like MPEG-4).
  2. Find a library that can handle .flv videos directly.
  3. Write a library that can handle .flv videos directly.
  4. Use the Android Flash Player to play it.
aroth
  • 54,026
  • 20
  • 135
  • 176