How can we play YouTube embeded code in an Android application using webview?

前端 未结 4 1500
庸人自扰
庸人自扰 2020-12-05 22:01

How can we play YouTube embeded code in an Android application using webview?

4条回答
  •  失恋的感觉
    2020-12-05 22:34

    Check out the following SO post: How to embed a YouTube clip in a WebView on Android

    Try the following code which may help you. I just framed it for your reference

    myWebView = (WebView) findViewById( R.id.webview_compontent );
    
    String playVideo= "Youtube video ..