<iframe>
video player inside an Embed block.data-video
attribute containing the new video URL.<iframe>
src
when a button is clicked.To change the video source in a video player using a button or thumbnail in Webflow, you need to use custom JavaScript. Here’s how:
Add an Embed element where you want the video to appear.
Inside the Embed element, insert an with a placeholder video source (e.g., YouTube or Vimeo). Example:
```html
\`\`\`data-video
attribute containing the new video URL.<div class="video-btn" data-video="https://www.youtube.com/embed/NEW_VIDEO_ID">Change Video</div>
Go to Project Settings > Custom Code > Footer Code and insert this script:
```html
```
To swap the video in a video player using buttons or thumbnails in Webflow:
<iframe>
video player inside an Embed block.data-video
attribute containing the new video URL.