Guide

How to Embed a Live Stream on Your Website

Learn how to add a live stream player to your own website using an embed code. Covers iframe setup, responsive sizing, and paywall integration.

Embedding a live stream on your own website keeps viewers on your site, under your brand, and in your control. Instead of sending people to YouTube or Facebook, you bring the stream to them. This guide explains how to do it.

Why embed on your own site?

When you stream on a social platform, that platform owns the experience. They control the ads, the recommendations, and the data. When you embed on your own site, you control the branding, the layout, and most importantly, the paywall.

Embedding also means your viewers do not need to create a YouTube or Facebook account to watch. They just visit your website, buy a ticket, and watch. Fewer barriers means more ticket sales.

Getting your embed code

Most streaming platforms provide an embed code for each event. This is a small snippet of HTML, usually an iframe tag, that you copy and paste into your website. The iframe loads the video player from the platform servers, so all the heavy lifting happens in the cloud.

Some platforms offer a JavaScript embed instead of an iframe. This gives you more customisation options but is slightly more complex to set up. For most use cases, the iframe is simpler and works perfectly.

Making it responsive

A fixed-size iframe looks fine on a desktop but breaks on mobile. To make your embed responsive, wrap the iframe in a container div with a percentage-based padding-bottom that matches the video aspect ratio. For 16:9 video, use padding-bottom: 56.25%.

Most modern streaming platforms generate embed codes that are already responsive. If yours is not, adding a simple CSS wrapper is a five-minute fix.

Embedding with a paywall

If your stream is ticketed, the embed code should include the paywall automatically. Viewers who have not purchased a ticket see the event description and a buy button. After purchasing, the player loads and they can watch.

Some platforms let you embed just the player (for free streams) or the full ticketed experience. Make sure you choose the right embed type for your use case.

Embed PassCast on your site

PassCast provides embeddable event pages with built-in paywall. Copy the code, paste it into your website, and start selling tickets. No technical skills required.

Get started free