Video oynatılamıyor çünkü droid web browserlar html5 video oynatmaya yeterli değil
Android webview cannot render youtube video embedded via iframe
<!DOCTYPE html> <html> <body> <img src="img/dac_logo.png"/> <video width="320" height="240" controls> <source src="mm/movie.mp4" type="video/mp4"> <source src="mm/movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video> </body> </html>
package com.example.fragmentornegi; import java.io.IOException; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebSettings; import android.webkit.WebView; public class Sag extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.sag, container, false); } @Override public void onStart() { super.onStart(); try { String[] sarrH1Dosyalari = getActivity().getAssets().list("html"); for (int i = 0; i < sarrH1Dosyalari.length; i++) { Log.w("HD 1 içindekiler", sarrH1Dosyalari[i]); } WebView wv = (WebView) getActivity().findViewById(R.id.webv); wv.getSettings().setJavaScriptEnabled(true); wv.getSettings().setPluginState(WebSettings.PluginState.ON); wv.loadUrl("file:///android_asset/html/index.html"); final String mimetype = "text/html"; final String encoding = "UTF-8"; } catch (IOException e) { e.printStackTrace(); } } }
Hiç yorum yok:
Yorum Gönder