vendredi 27 juin 2014

Best way to play videos in Android?

Vote count:


I have deve loped an app to watch embed videos. I play them with a webview but is not efficent for this...

I have hardwareAccelerated = true in mi AndroidManisfest file but it keeps 'lagging'.

I can't use YouTube API (I know is a good API to watch videos) because my videos are not in Youtube and i cannot upload it due to copyright therms.

So, is any other good API to play videos in an Android app? I'm using a WebChromeClient... or some suggestions to improve the WebView efficiency?

This is my webView

webViewPlayer = (WebView) findViewById(;
webViewPlayer.setWebViewClient(new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// This line right here is what you're missing.
// Use the url provided in the method. It will match the member URL!
return true;

public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
Toast.makeText(cntx, getString(R.string.toast_loaded), Toast.LENGTH_SHORT).show();
super.onPageFinished(view, url);

mClient = new MyChromeClient();

P.D. Launch the browser with an embed video is not a solution for me because my webView is a part of the activity, isn't fullscreen.

Thanks in advance.

asked 1 min ago

Aucun commentaire:

Enregistrer un commentaire