Embedding videos on your site
Every video in your account gets three kinds of embed. Pick the one that fits where you are putting it. All three are visible in the admin on the video's Embed tab.
1. Iframe (recommended)
One line of HTML. Works in WordPress, Squarespace, Webflow, Ghost, static HTML, pretty much anything that allows iframes. This is what most people use and what we recommend unless you need something specific.
<iframe
src="https://ezwp.tv/VaBcDeF1"
width="800"
height="450"
frameborder="0"
allowfullscreen>
</iframe>
If you want the player to fill the width of its container and keep a 16:9 aspect ratio, wrap it:
<div style="position:relative;padding-top:56.25%;">
<iframe
src="https://ezwp.tv/VaBcDeF1"
style="position:absolute;inset:0;width:100%;height:100%;border:0;"
allowfullscreen>
</iframe>
</div>
2. JavaScript embed
Use this when you want to control the player from your own page JavaScript (play, pause, seek, listen for events). Drop a target div on the page, then include our loader:
<div id="myPlayer"></div>
<script src="https://ezwp.tv/player.js"></script>
<script>
var p = new EZWP.Player('#myPlayer', {
video: 'VaBcDeF1',
autoplay: false
});
p.on('ended', function () {
console.log('video finished');
});
</script>
The player exposes play(), pause(), seek(seconds), and events
for play, pause, ended, and timeupdate.
Full reference in the API docs.
3. Direct link
A shareable URL to a landing page we host. Good for email, social media, and anywhere you cannot use HTML. Every video has one by default. On the Branded tier the link uses your custom domain.
https://ezwp.tv/VaBcDeF1
Or on Branded:
https://video.yoursite.com/VaBcDeF1
Which one should I use?
- Putting a video on a marketing page? Iframe.
- Building a custom video UI or triggering things when playback ends? JS embed.
- Sharing in an email or a tweet? Direct link.
Related: player settings reference, player customization, documentation home.