read a lot of articles and the so-called solution Android WebView play Youku, potatoes and other video methods, are what setpluginsenabled, after Android 4.x are not good, there is no such function, because Android 4.x have gone beyond the support of Flash. I've been messing with this thing for a half day, now the site is collecting and copying, wasting time. Only self-fencing, the following gives my solution, 1. Modify the Androidmanifest.xml to increase on the application node? 1android:hardwareaccelerated= "True" of course you can also add this property on the activity node where the WebView is located 2. Add android:layertype= "Hardware" to the layout xml of WebView? 123456<WebViewAndroid:id= "@+id/newscontent"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"Android:layertype= "Hardware"# Be sure to choose hardware and use hardware here. >3. Set the appropriate properties in Java code? 12345678910WebSettings ws=newscontent.getsettings (); ws.setjavascriptenabled (true); Ws.setallowfileaccess (True); ws.setdatabaseenabled (true); ws.setdomstorageenabled (true); Ws.setsaveformdata (False ); ws.setappcacheenabled (true); Ws.setcachemode (Websettings.load_default); Ws.setloadwithoverviewmode (false);// <= = = must be set to False, or there's a sound, no image ws.setusewideviewport (true); 4. The next step is to solve the problem of video playback not stopping? 1234567891011121314151617181920@overrideprotected void Onresume () {super.onresume (); Resume playback webview.resumetimers ();} @Overrideprotected void OnPause () {super.onpause (); Pauses playback of webview.pausetimers ();} @Overrideprotected void OnDestroy () {Super.ondestroy (); Be sure to destroy, otherwise you cannot stop playing Webview.destroy ();} OK, that's it, Android 4.x playback is no problem .... And so forget, if WebView open a webpage that contains a link to share, the link that needs to be shared is a generic link that is, <iframe src= "HTTP://PLAY.YOUKU.COM/XJLKDFJAKLFJDSA" />, if the direct use of embed will not play, or for that reason, Android does not support Flash plugin playback,
Android uses WebView support to play Youku videos, potato videos