[video] How to embed new Youtube's live video permanent URL?

I stream live on youtube a lot and since yesterday I experience a weird thing:

I embedded the livestream URL in my site. it was youtube.com/embed/ABCDE (normal embed link). That link used to show the current livestream and not a specific video. for example:

I'm streaming and you can watch it on youtube.com/embed/ABCDE. When i'm finished, the video gets its own url, something like youtube.com/watch?v=FGHIJ. In the next time I will stream, users can watch the stream on youtube.com/embed/ABCDE (that was a permanent url that didn't change).

Now, every time I stream, the livestream get its own link at first place, which means I have to update my embed code manually every time I stream.

I researched a bit around Google, SO and YouTube and I found out that a livestream's permanent url is youtube.com/channel/CHANNEL_ID/live. It's awesome and all, but I can't find a way to embed it.

(I use wordpress and I didn't find any plugin to do it automatically for me).

TL:DR; how to embed the livestream in the page youtube.com/channel/CHANNEL_ID/live?

This question is related to video youtube embed live live-streaming

The answer is


Have you tried plugin called " Youtube Live Stream Auto Embed"

Its seems to be working. Check it once.


The issue is two-fold:

  1. WordPress reformats the YouTube link
  2. You need a custom embed link to support a live stream embed

As a prerequisite (as of August, 2016), you need to link an AdSense account and then turn on monetization in your YouTube channel. It's a painful change that broke a lot of live streams.

You will need to use the following URL format for the embed:

<iframe width="560" height="315" src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID&autoplay=1" frameborder="0" allowfullscreen></iframe>

The &autoplay=1 is not necessary, but I like to include it. Change CHANNEL to your channel's ID. One thing to note is that WordPress may reformat the URL once you commit your change. Therefore, you'll need a plugin that allows you to use raw code and not have it override. Using a custom PHP code plugin can help and you would just echo the code like so:

<?php echo '<iframe width="560" height="315" src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID&autoplay=1" frameborder="0" allowfullscreen></iframe>'; ?>

Let me know if that worked for you!


Here's how to do it in Squarespace using the embed block classes to create responsiveness.

Put this into a code block:

<div class="sqs-block embed-block sqs-block-embed" data-block-type="22" >
    <div class="sqs-block-content"><div class="intrinsic" style="max-width:100%">
        <div class="embed-block-wrapper embed-block-provider-YouTube" style="padding-bottom:56.20609%;">
            <iframe allow="autoplay; fullscreen" scrolling="no" data-image-dimensions="854x480" allowfullscreen="true" src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID_HERE" width="854" data-embed="true" frameborder="0" title="YouTube embed" class="embedly-embed" height="480">
            </iframe>
        </div>
    </div>
</div>

Tweak however you'd like!


Examples related to video

How to handle "Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first." on Desktop with Chrome 66? How to make a movie out of images in python HTML5 Video autoplay on iPhone How do we download a blob url video Twitter - How to embed native video from someone else's tweet into a New Tweet or a DM How to embed new Youtube's live video permanent URL? How to disable auto-play for local video in iframe Writing an mp4 video using python opencv How to extract 1 screenshot for a video with ffmpeg at a given time? Bootstrap 3 - Responsive mp4-video

Examples related to youtube

Youtube - downloading a playlist - youtube-dl YouTube Autoplay not working How to embed new Youtube's live video permanent URL? How do you use youtube-dl to download live streams (that are live)? How can I get the actual video URL of a YouTube live stream? YouTube: How to present embed video with sound muted ffprobe or avprobe not found. Please install one Failed to execute 'postMessage' on 'DOMWindow': https://www.youtube.com !== http://localhost:9000 cast_sender.js error: Failed to load resource: net::ERR_FAILED in Chrome Embed YouTube video - Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

Examples related to embed

How to embed new Youtube's live video permanent URL? Properly embedding Youtube video into bootstrap 3.0 page How to embed a Google Drive folder in a website How to hide the bar at the top of "youtube" even when mouse hovers over it? How to embed PDF file with responsive width Shrink a YouTube video to responsive width How can I embed a YouTube video on GitHub wiki pages? Embedding a media player in a website using HTML How to embed a YouTube channel into a webpage Embed an External Page Without an Iframe?

Examples related to live

How to embed new Youtube's live video permanent URL? jQuery 1.9 .live() is not a function How to remove an appended element with Jquery and why bind or live is causing elements to repeat Live search through table rows jquery .live('click') vs .click() jquery live hover

Examples related to live-streaming

How to embed new Youtube's live video permanent URL? java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory EC2 instance types's exact network performance? Live-stream video from one android phone to another over WiFi What is the difference between RTP or RTSP in a streaming server?