Join the Webstudio community

Updated last month

Make entire Vimeo/YouTube box clickable, rather than just play button?

At a glance

The community member is wondering if it's possible to trigger the playback of a YouTube/Vimeo video on their page by clicking anywhere within the video element, rather than just the play button. They've tried adjusting the size of the play button but haven't been successful. A comment from another community member suggests that this can be achieved by making the button full size, setting it to flex, and keeping the icon the same size in the middle.

Wondering if this is currently possible. Right now the only way to trigger playing a YouTube/Vimeo video on your page is by clicking within the play button element, which is different from standard YouTube/Vimeo iFrames (they allow clicking anywhere within the iFrame to begin playback). Is there any way to adjust this behavior so that clicking anywhere within my element will start the video? I've tried messing with the size of the play button to no avail.
O
1 comment
Yes, you def can do this by making the button full size, setting it to flex and keeping icon same size in the middle
Add a reply
Sign up and join the conversation on Discord