Android Question how to use webview with youtube ?

larprogramer

Member
Licensed User
i have code here : how to use?

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

jtare

Active Member
Licensed User
Longtime User
try with:
B4X:
webview.LoadHtml($"<iframe width="642" height="361" src="https://www.youtube.com/embed/GI5dtRZdPDo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>"$)
 
Upvote 0

jtare

Active Member
Licensed User
Longtime User
Change width and height:
B4X:
WebView.LoadHtml($"<iframe width=100% height=auto src="https://www.youtube.com/embed/GI5dtRZdPDo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>"$)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…