0

public class MainActivity extends Activity { Context context;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    context = this;

    Button btnload = (Button) findViewById(R.id.loadvideo);
    btnload.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            WebView web = (WebView) findViewById(R.id.webView1);

            web.setWebViewClient(new WebViewClient());
            web.getSettings().setJavaScriptEnabled(true);
            web.zoomIn();

            web.loadUrl("http://www.youtube.com");
        }

    });

}

};

am using my mobile as emulator and the youtube gets loaded but the video is not playing..

Anand
  • 1
  • 2

1 Answers1

0

see this url, It is useful for me

WebView and HTML5

for more details you also see this android developer site link for webview

Community
  • 1
  • 1
Krunal Shah
  • 1,438
  • 1
  • 17
  • 29