How to show/hide a youtube iframe and start the video from the beginning by clicking on show button again and not continue playing after having paused the video.
Many thanks for the help. I am learning HTML/CSS/JS/FLASH.
Hi @daf2014, thanks for the question. Although it is not a supported Webflow feature, you can control YouTube videos via javascript, using the YouTube API. Here is an article that shows how to control youtube video via script:
It’s necessary to fix the script box, because the text is passing the purple area. Also, to fix Add code before ” tag” panel to Add code before < /body> tag. Despite being a simple adjustment, it would be very useful for non-programmers – like me
And the most important: the article should guide to replace the “my-video” text for the Youtube Video ID in the Embed Widget (ID, Name and Src) and Script. Telling this because it wasn’t explicit and I struggled to find why the whole thing wasn’t working. Again, simple but not for non-programmers.
Hi @DiogoFaim, I find this very useful thanks. Sometimes it is easy when you already know something, to leave things out or not be as complete as it should be. These are great points and I have added this to the documentation update list Thanks again for the feedback… very, very useful Cheers, Dave