Skip to main content
Upstream
Upstream
  • Product
  • Features
  • Platforms
  • Resources
  • Pricing
Login Sign up for free
Guides

How to embed a live stream on your website

Written by Mario Jankovic November 5, 2026 · 9 min read
  1. How to embed a YouTube live stream
    1. What happens after the stream ends
    2. Privacy-enhanced mode still stores data
  2. How to embed a Twitch stream
  3. How to embed a stream with a hosted player
  4. How to build your own HLS player
  5. The four options side by side
  6. Why embedded streams start muted
  7. Common embed problems
  8. Put your stream on your site with Upstream
  9. Embedding a live stream: FAQ
    1. Can I embed a live stream on my website for free?
    2. Why does my embedded live stream start muted?
    3. Will the embed keep working after the stream ends?
    4. Do I need cookie consent for a live stream embed?
    5. Does an embedded live stream slow down my website?
  10. Sources

To put a live stream on your website, you paste a player’s embed code, a short piece of HTML called an iframe, into your page. The player can be YouTube’s or Twitch’s, a hosted player from the service that runs your stream, or one you build yourself with HLS. All four work. They differ in what sits around your video, what happens between broadcasts, and how much you have to run.

Four routes from a stream to a web page: through YouTube and its player, through Twitch and its player, from an Upstream stream through HLS and a CDN to the Upstream player, or through your own media server, CDN and hls.js or Video.js
Four ways to get a live stream onto your page. Only the last one has you running servers.

How to embed a YouTube live stream

Open the live video on YouTube, click Share, then Embed, and copy the code. Paste it into an HTML or Embed block on your page, such as a Custom HTML block in WordPress or an Embed block in Squarespace or Webflow.

YouTube’s Embed Video dialog with the iframe code and the Copy button, next to three steps: Share then Embed, Copy, and paste it into your page
YouTube’s Embed dialog. Copy the iframe and paste it where the player should go.

Before that works for a live stream, check three things:

  • Your channel can embed live streams. YouTube lists it as an Advanced feature. It turns on with enough channel history, or once you verify your ID. Phone verification alone isn’t enough.
  • Embedding is on. In YouTube Studio, open the video’s details, click Show more and check that Allow embedding is ticked.
  • Your page sends a Referer. YouTube’s terms require it. If your site or a plugin sets a no-referrer policy, the embed shows Error 153 instead of the video.
Two captures of the same YouTube embed: on the left it plays with YouTube’s title bar and Watch on YouTube, on the right a page that blocks the Referer shows Video player configuration error, Error 153
The same embed on two test pages. The only difference is the Referer policy.

Visitors see YouTube’s player, with its logo and the video title. Since 2018 you can’t turn related videos off: the rel=0 setting only keeps them to your own channel. YouTube says embedded videos may show ads, and it doesn’t count autoplayed embeds as views.

What happens after the stream ends

A YouTube embed points at one video. When the broadcast ends, the embed shows the recording, and your next live stream gets a new video and a new embed code. If a broadcast runs longer than 12 hours, YouTube doesn’t keep a recording at all, so the old embed shows an unavailable video.

You’ll find a trick online: an embed address with your channel ID, embed/live_stream?channel=, that is meant to show whatever you have live. YouTube doesn’t document it, and it’s unreliable. When we checked on November 4, 2026, it played the live stream for one news channel and showed “This video is unavailable” for two others.

Privacy-enhanced mode still stores data

YouTube’s privacy-enhanced mode swaps the address for youtube-nocookie.com. YouTube says views there won’t be used to personalize the viewer’s YouTube experience. It doesn’t say nothing gets stored, and developers who tested it found it writes to local storage when the page loads and sets cookies once someone presses Play.

Stefan JudisStefan JudisWeb developerBlog post“youtube-nocookie.com does not mean no cookies.”April 30, 2023Read the post ↗
Stefan Judis, April 30, 2023.

In the EU that usually means a consent banner holds the player back until a visitor agrees. Germany’s data protection authorities say embedding third-party content such as videos regularly discloses personal data to that third party, so it needs a legal basis. Many consent tools hide the player until then, and visitors may not notice anything is missing.

How to embed a Twitch stream

Twitch embeds follow your channel, so the same code shows whatever you stream. The address looks like this:

https://player.twitch.tv/?channel=yourchannel&parent=yoursite.com

Since June 2020 Twitch requires two things: your site must use https, and the code must list each domain it runs on as a parent. Add one parent for every domain, including www and any staging site. The player must be at least 400 by 300 pixels, and it won’t autoplay on phones.

Twitch’s embedded player showing Whoops! This embed is misconfigured, next to the player address without a parent and the fixed address with parent=yoursite.com
Without a parent, Twitch shows this screen. Adding your domain as the parent fixes it.

How to embed a stream with a hosted player

A hosted player comes from the service that runs your stream instead of from a social platform. The player shows your video and nothing else, and it stays tied to your stream rather than to one broadcast. With Upstream it takes four steps:

  1. Open your stream’s settings in Upstream and choose Website player.
  2. Copy the embed code. Or copy the player link if your site builder asks for an embed URL.
  3. Paste it into your page and publish.
  4. Start the stream. The player on your page starts by itself.
The Website player tab in Upstream stream settings, with the embed code and Copy code button, and the player link with Copy link
The Website player tab. One code for your page, and a link for site builders that want a URL.

The code stays the same between streams. Stop tonight, start again tomorrow, and the player picks the stream up by itself. Between streams visitors see your stream’s name and Offline, then Starting soon when you press Start. Click through the screens below to see each one.

Four Upstream website player screens: Live, playing muted with a Click to unmute button, Starting soon, Reconnecting, and Offline
What visitors see on your page as the stream starts, drops and stops.

The player page shows no ads and sets no cookies. It plays about 15 to 30 seconds behind live, which suits watching along but not quick back-and-forth with viewers. It also runs next to your other platforms. Upstream sends the same stream to YouTube, Twitch and the rest, and your site gets its own copy outside your 10 destinations.

How to build your own HLS player

You can also run the whole chain yourself. Your encoder sends the stream to a media server, which packages it as HLS: a playlist and short video files. A CDN delivers those files, and a player script on your page plays them. Our free RTMP server guide shows how to set up MediaMTX, one popular open-source server.

Safari plays HLS natively. Chrome, Edge and Firefox need a script such as hls.js or Video.js, which feeds the video to the browser through Media Source Extensions. Chrome started playing HLS natively in late 2025, but Mux and the hls.js maintainers still advise using the script there. The server that hosts the files also needs CORS headers, or the player can’t load them from your page.

This gives you full control over the player, the look and the data. It also makes you responsible for uptime, scaling to a big audience, browser support and the CDN bill.

The four options side by side

Here is how they compare once a stream is on your page.

YouTube embedTwitch embedUpstream website playerYour own player
Around the videoYouTube’s logo, title and related videosTwitch’s player and brandingYour video, a LIVE badge and the browser’s controlsWhatever you build
AdsCan show YouTube adsSet by TwitchNoneUp to you
CookiesYouTube’s, even in privacy-enhanced modeTwitch’sNone from the player pageUp to you
Next broadcastThe code points at one videoFollows your channelThe same embed codeThe same address, if your server keeps it
Site rulesNeeds the Referer headerhttps, and your domain in the codeWorks on any siteUp to you
Delay to viewersYour broadcast’s latency settingSet by TwitchAbout 15 to 30 secondsOften 10 to 30 seconds
What you runNothing extraNothing extraNothing extraA media server, a CDN and the player code

Why embedded streams start muted

Browsers block video that plays sound by itself. Chrome, Safari and Firefox all let a video autoplay only when it’s muted, unless the visitor has already interacted with the site. So a live player that wants to start on its own has to start muted and offer an unmute button.

François BeaufortFrançois BeaufortGoogle ChromeChrome for Developers“Muted autoplay is always allowed.”Autoplay policy in ChromeRead the policy ↗
François Beaufort, Autoplay policy in Chrome.

YouTube adds rules of its own. An embed may only autoplay once more than half of it is visible on screen, and only one YouTube player per page may autoplay. On an iPhone, a muted video autoplays inline only when the code sets playsinline. The Upstream player starts muted with a Click to unmute button, or Tap to unmute on phones.

Common embed problems

What visitors seeWhyWhat to do
Playback on other websites has been disabledEmbedding is off for the videoTick Allow embedding in YouTube Studio
Error 153, Video player configuration errorThe page doesn’t send a RefererRemove the no-referrer policy, or use strict-origin-when-cross-origin
This video is unavailableA channel live_stream link that stopped workingEmbed the video itself, or use a player tied to your stream
Whoops! This embed is misconfiguredThe Twitch parent is missing or wrongAdd a parent for each domain, and serve the page over https
No player at all after the cookie bannerA consent tool blocks the iframeAdd a consent placeholder, or use a player that sets no cookies
Last week’s stream instead of today’sThe embed points at one YouTube videoUpdate the code for the new broadcast
The video plays with no soundBrowsers block autoplay with soundExpected: viewers click to unmute

Whatever you pick, test the page the way visitors will see it before you share it.

Checklist before sharing a page with a live stream: test on phone and laptop, check the frame and sound, check the cookie banner, then stop and restart the stream and check the next broadcast and your other platforms
Eight checks before you share the page. Half of them need the stream to stop and start again.

Put your stream on your site with Upstream

A YouTube embed is fine for a one-off. For a stream you run every week, or a channel that’s live around the clock, you want a player that belongs to your stream. That’s the Upstream website player: one embed code that keeps working between broadcasts, no ads, no YouTube or Twitch branding and no cookies from the player page. It’s turning on for accounts in stages, so start free with 24 streaming hours a month and ask our team to add it.

The same Upstream stream goes out to up to 10 of 30+ platforms at once through multistreaming, so your site, YouTube and Twitch all carry the same stream. Run it live from OBS or Live Studio, or upload videos and keep a 24/7 channel on your homepage with your computer off.

Embedding a live stream: FAQ

Can I embed a live stream on my website for free?

Yes. YouTube and Twitch embeds are free, as long as your YouTube channel can embed live streams. Upstream’s free plan includes 24 streaming hours a month, and its website player is turning on for accounts in stages.

Why does my embedded live stream start muted?

Browsers only allow video to play by itself when it’s muted. Players start muted and show an unmute button, so viewers turn the sound on with one click.

Will the embed keep working after the stream ends?

A YouTube embed points at one video, so your next broadcast needs a new code. A Twitch embed follows your channel. The Upstream player is tied to your stream, so it shows Offline between broadcasts and starts again when you go live.

Do I need cookie consent for a live stream embed?

For a YouTube or Twitch embed in the EU, usually yes, because the player stores data on the visitor’s device. The Upstream player page sets no cookies. Ask whoever handles privacy for your site what applies to you.

Does an embedded live stream slow down my website?

The video loads inside the player’s iframe and comes from the platform or a CDN, not from your web server. Lazy loading helps: the Upstream embed code waits to load the player until a visitor scrolls near it.

Sources

  • YouTube: Embed videos and playlists, player parameters, required minimum functionality, ads on embedded videos and feature access
  • Twitch: Embedding video and clips and Twitch embedded player updates in 2020
  • Browsers: Chrome autoplay policy, WebKit video policies for iOS, hls.js, Video.js FAQ and Mux on native HLS in Chrome
  • Privacy: DSK guidance on digital services (paragraph 101), Stefan Judis and Jason Grigsby on youtube-nocookie
  • Captures: YouTube and Twitch embeds on a local test page, and YouTube’s channel live link checked for three channels, November 4, 2026
Published November 5, 2026
Mario Jankovic

About the author

Mario Jankovic

Product and Engineering

Mario Jankovic co-founded Upstream and runs product and engineering. He writes about running live streams from the cloud: 24/7 channels, multistreaming and Live Studio, and what we learn building them.

Keep exploring

Further reading

Browse all articles
What is SCTE-35? Ad break markers for FAST channels
Nov 5, 2026 Guides

What is SCTE-35? Ad break markers for FAST channels

Read article
HLS vs RTMP: which one does your live stream need?
Nov 5, 2026 Guides

HLS vs RTMP: which one does your live stream need?

Read article
Radio Automation Software for 24/7 YouTube Stations
Nov 4, 2026 Guides

Radio Automation Software for 24/7 YouTube Stations

Read article

Start streaming today

Go live to every platform, run a 24/7 channel, and produce live shows in your browser, with no software or server setup.

No credit card 24 hours/month free Full functionality
Start Streaming Free
24/7 Live Streaming Run cloud channels that stay live around the clock. Live Studio Invite guests, share screens, and add branded overlays in the browser. Multistreaming Send one live feed to YouTube, Twitch, Kick, and RTMP endpoints. Pre-recorded Live Streaming Upload pre-recorded videos & Go Live without the stress of live production. Free plan 24 hours a month with no watermark. Multi-channel streaming Separate live channels from one account. Enterprise Setups for teams, labels and agencies. About Upstream Who we are and how Upstream works.
Scheduling Streams that start and end on their own. Multichat Every platform's chat in one feed. Overlays Layers and widgets in Stream Designer. Stings, jingles and ads Inserts that play between your videos. Playback controls Skip or play any file while you stay live. Audio and video playlists Loop music and visuals separately. Media library & storage Organize files and cloud uploads. Website player Embed your live stream on your site. Team access Invite your team, each with their own role. RTMP server Stream in from OBS or any encoder. Backup streams A standby feed if your main one drops. Live Streaming API Run streams, media and queues from code. MCP Server Manage streams from your AI assistant. All features Everything Upstream does, on one page.
YouTube live streaming Twitch live streaming Kick live streaming Facebook live streaming Instagram live streaming TikTok TikTok live streaming Rumble live streaming Mixcloud live streaming 30+ more Plus any custom RTMP or SRT destination.
Platform limits Bitrate and duration caps for each platform. Integrations Setup guides for OBS, vMix, cameras and more. VTuber Streaming Go live with your avatar on every platform.
Blog Guides, platform rules and news for anyone who goes live. Guides Setup guides for 24/7 streams, multistreaming and RTMP. Release Notes The new features in each Upstream update, in one place. Free Tools Video, audio, thumbnail and AI tools, plus camera and mic checks. Helpdesk Step by step setup help and troubleshooting for Upstream. Service status Current service health, uptime history and incident updates. Live Streaming FAQ Short answers to what people ask before they go live. Compare Upstream Upstream side by side with Restream, StreamYard and others. Latest post YouTube Dual Stream: What the Vertical Copy Does and How to Turn It Off
Always-on 24/7 Live Streaming Run cloud channels that stay live around the clock.
Explore
Real-time live Live Studio Invite guests, share screens, and add branded overlays in the browser.
Explore
One stream, 30+ platforms Multistreaming Send one live feed to YouTube, Twitch, Kick, and RTMP endpoints.
Explore
Schedule & Automate Pre-recorded Live Streaming Upload pre-recorded videos & Go Live without the stress of live production.
Explore
Free plan 24 hours a month with no watermark.
Multi-channel streaming Separate live channels from one account.
Enterprise Setups for teams, labels and agencies.
About Upstream Who we are and how Upstream works.
Scheduling Streams that start and end on their own. Multichat Every platform's chat in one feed. Overlays Layers and widgets in Stream Designer. Stings, jingles and ads Inserts that play between your videos. Playback controls Skip or play any file while you stay live. Audio and video playlists Loop music and visuals separately. Media library & storage Organize files and cloud uploads. Team access Invite your team, each with their own role. RTMP server Stream in from OBS or any encoder. Backup streams A standby feed if your main one drops.
Live Streaming API Run streams, media and queues from code.
MCP Server Manage streams from your AI assistant.
All features Everything Upstream does, on one page.
YouTube live streaming. 24/7 channels with midroll ads. Twitch live streaming. Streams restart on their own at 48 hours. Kick live streaming. Stay live with your computer off. Facebook live streaming. Schedule lives that start on their own. Instagram live streaming. Go live from your browser or the cloud. TikTok TikTok live streaming. Go live on TikTok and Instagram at once. Rumble live streaming. Add Rumble to your YouTube or Kick stream. Mixcloud live streaming. DJ sets and radio shows from your browser. 30+ more Plus any custom RTMP or SRT destination.
Platform limits Bitrate and duration caps for each platform.
Integrations Setup guides for OBS, vMix, cameras and more.
VTuber Streaming Go live with your avatar on every platform.
Blog
Guides
Release Notes
Free Tools
Helpdesk
Service status
Live Streaming FAQ
Compare Upstream
YouTube Dual Stream: What the Vertical Copy Does and How to Turn It Off YouTube Dual Stream: What the Vertical Copy Does and How to Turn It Off
Upstream

Run your streams from the cloud

Free plan: 24 streaming hours a month, no card, no watermark.

4.6 · 245 reviews on Trustpilot
Legal entity
Zukunft d.o.o.
Registered address
Grožnjanska ulica 32, 10000 Zagreb, Croatia
Company VAT ID
Company VAT ID: HR62560895839
About | Contact us | Tools | Content standards | Security | Privacy Policy | Terms of Service | Affiliate terms | Legal notice |

Product

  • Pricing
  • Upstream Features Overview
    • Multistreaming
    • Media Library & Storage
    • Website Player
    • Separate Audio and Video
    • Overlays: Stream Designer
    • Live Streaming Studio
    • Scheduling & Automation
    • Live Playback Controls
    • Play Stings, Jingles and Ads
    • Team Access
  • Enterprise Broadcasting Solutions

Resources

  • Helpdesk
  • Service status
  • Live Streaming FAQ
  • Blog
  • Release Notes
  • Live Streaming API
  • MCP Server
  • Free Live Streaming
  • YouTube Live Streaming
  • RTMP Server
  • Supported Platforms
  • Live Streaming Limits
  • Integrations

Compare us

  • Compare Upstream
    • Upstream vs Runnel.live
    • Upstream vs OneStream
    • Upstream vs Live247
    • Upstream vs Gyre
    • Upstream vs Streaming Bots
    • Upstream vs Restream
    • Upstream vs StreamYard
    • Upstream vs LiveReacting
    • Upstream vs Playout.video

Free tools

  • Design tools
  • Video tools
  • Audio tools
  • AI tools
  • Setup checks

Use cases

  • For Creators
  • For Music Labels
  • Church Streaming
  • VTuber Streaming
  • Multi-Channel Streaming

© 2026 Upstream. All rights reserved.