data-video-id
or data-video-url
attributes.src
dynamically.Webflow does not support native video swapping with buttons or thumbnails out of the box, but it can be achieved using custom embed elements and minimal custom code.
<iframe id="main-video" src="https://www.youtube.com/embed/VIDEO_ID?rel=0" loading="lazy" allowfullscreen></iframe>
data-video-id
(for YouTube) or data-video-url
.data-video-id="dQw4w9WgXcQ"
.<script>
that listens for click events and changes the src
of the iframe.document.querySelectorAll
to find all video buttons/thumbnails.data-video-id
or URL.src
of the #main-video
iframe using JavaScript.Webflow doesn't natively support switching videos via buttons, but you can embed a video iframe and use buttons or thumbnails with data-
attributes and custom JavaScript to swap the video URL dynamically.