DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowBlack Friday PreviewAmazon USBlack Friday preview: compare before the rush hitsAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to the story
DocumentaryTubeTRUE STORIES, ON SCREEN.
  1. DocumentaryTube
  2. The Screening Room
  3. Blog

Blog

How to Embed a YouTube Playlist on a Website and Start at a Specific Video

How to Embed a YouTube Playlist on a Website and Start at a Specific Video
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

To embed a YouTube playlist, use an iframe URL with listType=playlist and your playlist ID. To start at a particular playlist item, use YouTube’s IFrame Player API and its zero-based index setting; the iframe’s start parameter instead chooses a time within a video.

Embed a YouTube playlist with an iframe

For a basic playlist player, put the playlist ID in the iframe URL’s list parameter and set listType=playlist. You do not need to put a video ID in the URL path.

<iframe
  width="640"
  height="360"
  src="https://www.youtube.com/embed?listType=playlist&amp;list=PLAYLIST_ID"
  title="YouTube playlist player"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
  referrerpolicy="strict-origin-when-cross-origin"
  allowfullscreen>
</iframe>
  1. Replace PLAYLIST_ID with the ID of the playlist you want to show. YouTube’s documented format says to prepend PL to the playlist ID.
  2. Paste the iframe into the HTML of the page where you want the player to appear.
  3. Preview the page and check that the player is large enough and that the playlist loads.

The dimensions above are an example. YouTube requires an embedded player viewport of at least 200 × 200 pixels and recommends at least 480 × 270 pixels for a 16:9 player with controls. YouTube’s embedded player parameters documentation covers the iframe URL and sizing constraints.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start at a specific playlist video

The plain iframe parameters document how to load a playlist and set a timestamp, but do not document an arbitrary playlist-position parameter. To choose an item by its position, use the IFrame Player API. Its index is zero-based: 0 is the first item, 1 the second, and 2 the third.

Popular on Amazon
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
  • Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
  • Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
  • CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
  • CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
  • CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)

Load and play from the chosen item

After creating a YT.Player instance, call loadPlaylist with the playlist ID and the desired index:

player.loadPlaylist({
  listType: 'playlist',
  list: 'PLAYLIST_ID',
  index: 2
});

This loads and plays the playlist starting with its third item. Change 2 to the required zero-based position. For a page that lets visitors choose an item, make the numbering clear—for example, show “Video 3” in the interface while passing index: 2 to the API.

Prepare the playlist without immediately playing

Use cuePlaylist with the same playlist and index when you want to queue the selected item without immediately requesting playback. Call playVideo() when playback should begin. You can also use playVideoAt(index) after a playlist has been loaded or cued to load and play the item at that zero-based position.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
Raspberry SC15184 Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (2GB)
  • Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1. 5GHz
  • 2. 4 GHz and 5. 0 GHz IEEE 802. 11b/g/n/ac wireless LAN, Bluetooth 5. 0, BLE
  • 2 × USB 3. 0 ports, 2 x USB 2. 0 Ports
  • 2 × micro HDMI ports supproting up to 4Kp60 video resolution
  • Micro SD card slot for loading operating system and data storage

The YouTube IFrame Player API reference documents playlist loading, queueing, and playback controls.

Start at a time within the selected video

Use the iframe’s start parameter to request a time in seconds from the beginning of the currently loaded video. With API playlist loading, startSeconds sets the time offset for the first video selected in the list. Neither parameter selects a playlist item: use index or playVideoAt(index) for that.

For example, a request to start at 90 seconds means 1 minute 30 seconds into the selected video, not the 90th video or a specific playlist position. YouTube may seek to a nearby keyframe, so playback can begin slightly before the requested second.

Also popular on Amazon
Raspberry Pi 4 Model B, 2 GB.
  • Broadcom BCM2711 Quad Core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
  • 1GB, 2GB or 4GB 8GB-3200 SDRAM (depending on model).
  • 2.4GHz and 5.0GHz IEEE 802.11ac Wireless, Bluetooth 5.0, BLE Gigabit Ethernet
  • 2 USB 3.0 ports; 2 USB 2.0 ports.
  • Raspberry Pi Standard 40 pin GPIO header (fully backward compatible with previous boards).

Configure API control and autoplay carefully

  • If you enable JavaScript API control with enablejsapi=1, set the origin parameter to your website’s domain as an additional security measure.
  • Use autoplay=1 only when automatic playback is intended. YouTube’s parameter documentation says playback data collection and sharing occur upon page load when autoplay is enabled.
  • Check the player’s actual rendered viewport, not only the iframe attributes, to ensure it meets YouTube’s minimum size requirements.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common problems

The embed does not show the intended playlist

Check that the URL includes both listType=playlist and the correct playlist ID in list. The documented playlist URL format does not require a video ID in the path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The wrong video plays first

Confirm you are selecting a playlist item through the API, not using start or startSeconds. Also check the zero-based index: the third item is index 2, not 3.

Playback begins before the requested timestamp

This can happen because the player seeks to a nearby keyframe. A time offset is not guaranteed to be the exact displayed starting instant.

Also popular on Amazon
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM)
  • Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
  • CanaKit 3.5A USB-C Power Supply with Noise Filter (UL Listed) specially designed for the Raspberry Pi 4 (5-foot cable)
  • CanaKit USB-C PiSwitch (On/Off Power Switch)
  • Set of 3 Aluminum Heat Sinks for the Raspberry Pi 4

JavaScript API control does not behave as expected

If you enabled enablejsapi=1, include the origin parameter set to your site’s domain. Verify that the page is calling the API methods on the intended player instance.

The player is too small

Make sure the embedded viewport is at least 200 × 200 pixels. For a 16:9 player with controls, YouTube recommends at least 480 × 270 pixels.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or let it run in the cloud

If your goal is a 24/7 YouTube channel playing uploaded documentaries rather than an embedded playlist on a webpage, StreamNeo keeps a YouTube stream running from the cloud: upload your video or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; it streams what you upload at its original quality up to 4K 60fps for one flat price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. Start your free day with StreamNeo.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM); Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
$179.99
Bestseller No. 2
Raspberry SC15184 Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (2GB)
Raspberry SC15184 Pi 4 Model B 2019 Quad Core 64 Bit WiFi Bluetooth (2GB)
Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1. 5GHz; 2. 4 GHz and 5. 0 GHz IEEE 802. 11b/g/n/ac wireless LAN, Bluetooth 5. 0, BLE
$92.99
Bestseller No. 3
Raspberry Pi 4 Model B, 2 GB.
Raspberry Pi 4 Model B, 2 GB.
Broadcom BCM2711 Quad Core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz; 1GB, 2GB or 4GB 8GB-3200 SDRAM (depending on model).
$99.91
Bestseller No. 4
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM)
CanaKit Raspberry Pi 4 4GB Basic Kit with PiSwitch (4GB RAM)
Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM); CanaKit USB-C PiSwitch (On/Off Power Switch)
$149.99
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of November 18, 2026 4:11 am GMT+0530.

IFrame Player APIweb developmentwebsite embedsYouTubeYouTube playlists

About the author

— The DocumentaryTube Team writes The Screening Room's guides, reviews and news, and keeps the directory's records of documentaries, their directors and where to watch them. How DocumentaryTube works.

More in Blog

Say something about this film

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.