1
votes

I'm developing an app for android that plays mp4 video files from the web. My problem is that I initially relied on adobe flash player to play the videos but a couple of weeks ago adobe stopped developing flash for android mobile devices and my only option is now html5, is this right ?
What's the best approach to play mp4 videos via html5 on mobile devices?
Should I use the html5 code inside a "WebView" like i did with flash or is there another option for this?

I'm kinda lost here, any help will be much appreciated :)

1

1 Answers

3
votes

If you have a native Android app then you shouldn't need to rely on Flash or a WebView to play mp4 videos in Android at all. You should use the MediaPlayer class, as discussed in the Android SDK documentation.

You can use that to play your video, so long as you content conforms to the list of supported protocols and formats/codecs. Which mp4 files delivered over HTTP almost certainly do, assuming they're using the H.264 video codec, and a non-crazy audio format.