How to stop auto play of youtube videos in web view?
There doesn’t appear to be any logic in the marketplace for this, so I’m unsure.
I’m more curious about you actually getting a webview to play a YouTube video successfully at all. I’m guessing you’re building a true mobile app and not a web app then – the only way I believe it works. If you did manage to get it to work in a web app (for your internet browser), I’d love to know how.
Oh hey Dominik I am building an android mobile app an this is what I did -
took a container - put a web view content in it with a specific height - put my YouTube video link in web view content.
But just after opening the page the video starts to play. I want it to be played manually.
Try adding ?autoplay=0 to your url parameter
Hi, is there any way to stop playing in full screen in IOS?
Oh hey John, ?autoplay=0&rel=0 not working in web view.
This may be a cumbersome way of doing it, but worked for me.
Use HTML render component and embed and iframe in it, replacing some of the text with dynamic data from your app. This gave much more control on the video’s appearance and behavior.
So my iframe looked as below (messy but works)
“<iframe width=”"+SUBTRACT(systemVars.dimensions.screen.width, 24)+ “” height="" src=""+“YouTube” title=“YouTube video player” frameborder=“0” allow=“accelerometer; autoplay=0; clipboard-write; encrypted-media; gyroscope; picture-in-picture” allowfullscreen>"
Hi, does this work for you in the web preview? For me it gets replace with a little red box without code… In the iphone previewer works fine though.
My code looks more like this:
“<iframe width=“320” height=“180” src=“https://www.youtube-nocookie.com/embed/”+ pageVars.video_id +”" title=“YouTube video player” frameborder=“0” allow=“accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture” allowfullscreen>"
Hi Good day,
I would like to know how to embed youtube videos on appgyver I am a new and now starting my 1st project
From what they explain above, they use the web view component, you can find it in the component market.
Hi Dimos thank you but can you give me the steps to do this. I am very new
So you can find the web view component in the component marketplace
and after setting it in your page you can insert the youtube video link here
Hope it helps
I tried but but when I go to preview the page I get a very tiny red x is there something I am doing wrong?
@Chris_Ramnarace i dont know why this happens to you, i tryed quickly and it works
maybe try an other link
Hi @Dimos_Vamvourellis still getting that little red box when I tried a different links
Well the only things i can think, first off all go ahead and see if you have the last version of the web view component you can do that in the component marketplace.
if you have the last version, try to delete it from your installed components and then redownload it from the component marketplace.
If this doesn’t work too, maybe isn’t a bug but it would help if you could share a screenshot of the problem.
i also found this post randomly, take a look maybe you can use the same solution.
Basically it has to do with the components dimensions in the app…
Hi @Dimos_Vamvourellis I got it to load now in the mobile app however when I continue to build out the app and use the preview option I now only get a load screen which just hangs
Even in the mobile app as well
perfect, ohh from what i know its a bug maybe you can find more answers in others posts.