VideoView vs MediaPlayer vs YouTube player API

I was looking into streaming videos in one of my app.

VideoView is nothing but a wrapper around MediaPlayer. VideoView adds control buttons around MediaPlayer. If you want to do more customization, the MediaPlayer is way to go. VideoView is a quicker way to get started with streaming videos. VideoView and MediaPlayer needs a video url or path ending with mp4, mp3 etc extensions. They can't play videos from Youtube Urls (at least when I tried playing them the way I did for videos with mp4 extension)

YouTube API is useful when you want to play videos based on YouTube urls.  You can embed a Youtube video in your app. But this could be little tricky when positioning it in your app. Also, it comes with API calls quota limits. There is only a certain amount of calls can be made for free by your app, and have to pay going forward.

Conclusion: Its better to use VideoView for offline videos which don't have piracy issues associated with them. I would NOT recommend downloading Youtube videos and bundling with your apps.

Comments

Popular posts from this blog

How to fix "Plugin with id 'com.android.library' not found." issue with Android Libraries

Setting up .netrc file on Mac OS X (Lion) for Git

How did I setup SSL with HTTPClient-4.1.2