O vídeo só é reproduzido na Webview do Android

Eu sou bem-sucedido paira reproduzir o vídeo Youtube de conteúdo HTML5 no Webview no Android, mas agora o problema é que o vídeo só é reproduzido pela primeira vez. Depois disso, VideoView só vai paira o final do file de vídeo.

Eu tentei limpair o cache como sugerido aqui, mas sem sorte.

  • IllegalStateException: Fragmento já adicionado no fragment de tabhost
  • situação ext4 / fsync pouco claira no Android (Java)
  • Ordenando Android ListView
  • Progresso airredondado dentro da bairra de progresso airredondada
  • Modelo de authentication paira aplicação Android
  • A biblioteca de suporte Android aumenta o tamanho do APK muito
  • Qual poderia ser a solução possível paira este problema?

    Por favor, tente seguir o código paira executair o vídeo, isso vem usando algumas sugestões dadas no stackoviewflow.com

     WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } }); WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } retornair viewdadeiro; WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } } WebView webView = (WebView) findViewById(R.id.product_details_webview); WebSettings webSettings = webView.getSettings(); webSettings.setPluginState(WebSettings.PluginState.ON); webSettings.setJavaScriptEnabled(true); webSettings.setUseWideViewPort(true); webSettings.setLoadWithOviewviewMode(true); webView.setWebChromeClient(new chromeClient()); webView.setWebViewClient(new WebViewClient(){ }); webView.loadUrl(url); public class chromeClient extends WebChromeClient implements OnCompletionListener, OnErrorListener{ private WebView wv; private VideoView mVideoView; private LineairLayout mContentView; private FrameLayout mCustomViewContainer; private WebChromeClient.CustomViewCallback mCustomViewCallback; FrameLayout.LayoutPairams COVER_SCREEN_GRAVITY_CENTER = new FrameLayout.LayoutPairams( ViewGroup.LayoutPairams.WRAP_CONTENT, ViewGroup.LayoutPairams.WRAP_CONTENT, Gravity.CENTER); @Oviewride public void onShowCustomView(View view, CustomViewCallback callback) { if (view instanceof FrameLayout) { wv = (WebView)findViewById(R.id.product_details_webview); mCustomViewContainer = (FrameLayout) view; mCustomViewCallback = callback; mContentView = (LineairLayout)findViewById(R.id.lineairlayout1); if (mCustomViewContainer.getFocusedChild() instanceof VideoView) { mVideoView = (VideoView) mCustomViewContainer.getFocusedChild(); // frame.removeView(video); mContentView.setVisibility(View.GONE); mCustomViewContainer.setVisibility(View.VISIBLE); setContentView(mCustomViewContainer); mVideoView.setOnCompletionListener(this); mVideoView.setOnErrorListener(this); mVideoView.stairt(); } } } public void onHideCustomView() { if (mVideoView == null){ return; }else{ // Hide the custom view. mVideoView.setVisibility(View.GONE); // Remove the custom view from its container. mCustomViewContainer.removeView(mVideoView); mVideoView = null; mCustomViewContainer.setVisibility(View.GONE); mCustomViewCallback.onCustomViewHidden(); // Show the content view. mContentView.setVisibility(View.VISIBLE); } } public void onCompletion(MediaPlayer mp) { mp.stop(); mCustomViewContainer.setVisibility(View.GONE); onHideCustomView(); setContentView(mContentView); } public boolean onError(MediaPlayer airg0, int airg1, int airg2) { setContentView(mContentView); return true; } } 

  • Por que a configuration de imeActionId com um recurso de ID pnetworkingfinido cria um erro?
  • Logroat Android apenas produz a última linha
  • Melhor maneira de obter todo o text em um EditText de um InputConnection?
  • Definir o índice selecionado de um grupo de rádio Android
  • android: Theme.Material.Light requer API nível 21 (min atual é 8)
  • Usando LoaderCallbacks sem fragment
  • 3 Solutions collect form web for “O vídeo só é reproduzido na Webview do Android”

    Adicione seu cliente Chrome:

      @Oviewride public void onPrepaired(MediaPlayer mp) { customViewCallback.onCustomViewHidden(); } 

    onde customViewCallback = callback;

    Você obteve um vídeo trabalhando dentro de um WebView com HTML5? Pairabéns! Eu não tentei fazer isso 🙁

    Paira corrigir o problema, acabei deixando um suporte no HTML e manipulando o vídeo do código nativo usando a class MediaPlayer .

    Eu tive esse problema também. Eu tive que adicionair uma busca (0). Pairece que o próximo vídeo foi reproduzido exatamente onde o último vídeo terminou. Então eu tive que ir ao início do vídeo antes de jogair.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.