youtube video not showing in webView
I am new to android. Can anyone please tell how to play youtube video. My requirement is the video should display in the 'WebView' initially and on tapping that, the video should get played.
webView = (WebView)findViewById(R.id.webView1);
WebSettings websets = webView.getSettings();
websets.setJavaScriptEnabled(true);
registerForContextMenu(webView);
webView.loadUrl("file:开发者_如何学Go///android_asset/youtubes.html");
Maybe this helps, I came accross this post: link
And indeed, I basically only needed to add to the application manifest xml:
android:hardwareAccelerated="true"
And voila, even the youtube video's started playing
Only available from Android 3.0 (API level 11)
精彩评论