How to start a video embedded inside iframe? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to start a video embedded inside iframe?

So i want to start a video by clicking on the button instead of having to click inside iframe to start it ,is it possible? If not, can anyone suggest anything else I can do to have that functionality?Ty in advance https://code.sololearn.com/W4wxX4v4FBVO/?ref=app

19th Oct 2020, 5:36 PM
Abhay
Abhay - avatar
3 Answers
+ 2
jeremiah harshfield the following code does work well ,but I have to click inside iframe to start instead of just clicking the play/pause to start it ,and this is the only way you can play a YouTube video inside iframe and have access to things like stop ,start and volume stuff
20th Oct 2020, 8:04 PM
Abhay
Abhay - avatar
+ 1
anyways if you want autoplay, well that doesn't really work that well on code playground or chrome, but the audio or video should be playable with a button, you can downsize it to be small then tap it to turn it on or start it.
20th Oct 2020, 7:56 PM
jeremiah harshfield
jeremiah harshfield - avatar
0
for youtube go to share then there should be a circle for embed, the it should already be set up for you then just copy and paste, that basically works with any audio or video, share-embed circle- copy-paste, wherever you need it, i did have trouble myself at first but it got it.
20th Oct 2020, 7:54 PM
jeremiah harshfield
jeremiah harshfield - avatar