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

larprogramer

Member
Licensed 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>"$)
hi how to fix for too size
dfg.png
 
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
Top