Wall of Loops

Enter a YouTube ID




 

 
 
 

 
 
 

 
 
 

How It Works

This page has nine empty divisions (<div> tags). Clicking the Play button starts a JavaScript that inserts YouTube embedding code into each div. The code looks like this:

<iframe type="text/html" width="320" height="180" src="https://www.youtube.com/embed/VIDEO_ID?‌autoplay=1&‌showinfo=0&‌loop=1&‌playlist=VIDEO_ID&‌version=3" style="border-radius:6px;border:6px solid #111;"></iframe>

The loop parameter takes binary values: 1 means true and 0 means false. The playlist parameter is a hack for browsers that don’t understand the loop parameter; by setting the next video ID in the playlist to the original ID, you make the video loop. And the autoplay parameter starts each video playing as soon as it loads.

Clicking the Stop button removes the embedding code from each div.

For more background, see:

YouTube Embedded Players and Player Parameters

YouTube Player API Reference for iframe Embeds

—David Battino, Batmosphere