VideoView vs WebView for playing videos on YouTube

I am developing an application in which I need to play videos on YouTube, I tried to use webView and videoView, and I searched a lot, I really found some solutions, but they don't seem to fit my application needs:

Therefore, I want to know, first of all, the best way (approach) to the problem of playing a YouTube video inside the application. Should I use WebView and try to make the video fit the presentation and optional, or should I try VideoView (which is a bit more complicated, I think it means that I can play the video that I need to get from .3gp from Youtube).

Well thank you for helping me find a better approach.

MeanWhile I have one more question: is there a way to get webView to display the whole screen (full screen) in landscape mode (when the phone becomes landscape)?

+3
source share
1 answer

Using the approach WebViewcan cause problems on some devices. The approach VideoViewwill work well if you have a reliable way to parse the correct URL. In one of my applications, we do this with regular expression and parsing via html, while it works quickly and efficiently.

+2
source

All Articles