Question

I am trying to play video files from http urls in my app. Why is that my app plays only certain mp4 files (I tried 512k mp4 and it worked), and doesn't play some others?

Here's the snippet of my code:

    mVideoView.setVideoPath(myVideoURL);
    mVideoView.setMediaController(new MediaController(this));
    mVideoView.seekTo(currentPosition);
    mVideoView.requestFocus(); 

Thanks Chris

Was it helpful?

Solution

Make sure your mp4's aren't DRM'd, and that they're not wider than 320 pixels (videoView will not scale them for you). Are you getting any useful errors in LogCat?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top