Android Question how to use webview with youtube ?

Discussion in 'Android Questions' started by larprogramer, Oct 19, 2018.

  1. larprogramer

    larprogramer Member Licensed User

    i have code here : how to use?

    Code:
    <iframe width="642" height="361" src="https://www.youtube.com/embed/GI5dtRZdPDo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
     
  2. jtare

    jtare Active Member Licensed User

    try with:
    Code:
    webview.LoadHtml($"<iframe width="642" height="361" src="https://www.youtube.com/embed/GI5dtRZdPDo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>"$)
     
  3. larprogramer

    larprogramer Member Licensed User

    hi how to fix for too size [​IMG]
     
  4. jtare

    jtare Active Member Licensed User

    Change width and height:
    Code:
    WebView.LoadHtml($"<iframe width=100% height=auto src="https://www.youtube.com/embed/GI5dtRZdPDo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>"$)
     
    larprogramer likes this.
  5. larprogramer

    larprogramer Member Licensed User

    Thanks you very much
     
    jtare likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice