# YouTube Error 153 - What It Means & Solutions

## What is Error 153?

YouTube Error 153 means: **"The owner of the requested video does not allow it to be played in embedded players."**

This is NOT a bug in the site builder - it's a restriction set by the video owner.

---

## What We've Fixed

✅ **Removed autoplay from URL parameters**
- Before: `?autoplay=1&mute=1&loop=1...`
- After: `?mute=1&loop=1...` (no autoplay)

✅ **Removed autoplay from iframe allow attribute**
- Before: `allow="accelerometer; autoplay; clipboard-write..."`
- After: `allow="accelerometer; clipboard-write..."` (no autoplay)

---

## Why You Might Still See Error 153

Some video owners have **completely disabled embedding**, not just autoplay embedding. This means:

- ❌ Video cannot be embedded anywhere (not just our site builder)
- ❌ Works on YouTube.com but not on external sites
- ❌ No workaround exists (video owner's choice)

### Video: OC7sNfNuTNU

The specific video you tested (`https://www.youtube.com/watch?v=OC7sNfNuTNU`) appears to have strict embedding restrictions set by the owner.

**This is normal and expected for some videos.**

---

## Test Videos That WILL Work

Try these videos - they have embedding enabled:

### 1. Never Gonna Give You Up (Rick Astley)
```
https://www.youtube.com/watch?v=dQw4w9WgXcQ
```
✅ Embedding: Enabled
✅ Known to work

### 2. Me at the zoo (First YouTube video)
```
https://www.youtube.com/watch?v=jNQXAC9IVRw
```
✅ Embedding: Enabled
✅ Historical video, always works

### 3. Big Buck Bunny (Open source film)
```
https://www.youtube.com/watch?v=YE7VzlLtp-4
```
✅ Embedding: Enabled
✅ Open source, no restrictions

### 4. Direct Video File (Guaranteed to work)
```
https://www.w3schools.com/html/mov_bbb.mp4
```
✅ No restrictions (direct file)
✅ Always works

---

## How to Check If a Video Allows Embedding

### Method 1: Look for Error 153
1. Try to embed the video
2. If you see Error 153 → embedding disabled by owner
3. Try a different video

### Method 2: Check YouTube Share Settings
1. Go to the video on YouTube.com
2. Click "Share" button
3. Look for "Embed" option
4. If "Embed" is greyed out → embedding disabled
5. If you can click "Embed" → embedding enabled (but might still have restrictions)

### Method 3: Try the Embed Code
1. Click "Share" → "Embed"
2. Copy the embed code
3. If it works in a plain HTML file → should work in site builder
4. If it shows Error 153 in plain HTML → video has restrictions

---

## Solutions & Workarounds

### Solution 1: Use a Different Video ✅ RECOMMENDED
- Choose videos with embedding enabled
- Test videos (like the ones above) are always safe
- Public domain / Creative Commons videos usually allow embedding

### Solution 2: Use Your Own Video Hosting
- Upload video to Vimeo (usually allows embedding)
- Use direct .mp4 file hosted on your server
- No restrictions when you own the video

### Solution 3: Contact Video Owner
- If you must use a specific video
- Ask the owner to enable embedding
- They can change this in YouTube Studio settings

### Solution 4: Use a Thumbnail + Link
- Take a screenshot of the video
- Use as background image instead
- Add a "Watch Video" button linking to YouTube

---

## For Content Creators: How to Enable Embedding

If you're the video owner and want to allow embedding:

1. Go to **YouTube Studio**
2. Select your **video**
3. Click **"Visibility"** or **"Advanced settings"**
4. Find **"Allow embedding"** checkbox
5. ✅ **Enable it**
6. Save changes

---

## Testing the Fix

### What to Test:

1. ✅ Add Section (Video BG)
2. ✅ Enter a test video URL: `https://www.youtube.com/watch?v=dQw4w9WgXcQ`
3. ✅ Click "Apply Video" button
4. ✅ Video should load without Error 153
5. ✅ No autoplay parameters in the embed URL

### Expected Result:

```
Embed URL should be:
https://www.youtube.com/embed/dQw4w9WgXcQ?mute=1&loop=1&playlist=dQw4w9WgXcQ&rel=0

✅ No autoplay=1
✅ Should work for most videos
❌ Will still fail for videos with embedding disabled
```

---

## Summary

**Error 153 = Video owner disabled embedding**

✅ **We fixed:** Removed autoplay to avoid autoplay-related Error 153
❌ **Can't fix:** Videos that have ALL embedding disabled by owner
✨ **Solution:** Use test videos above or your own videos

**This is not a bug - it's YouTube's content protection working as designed.**

---

## New Features Added (2026-02-22)

1. ✅ **Apply Video Button** - Click to load video (no need to press Enter)
2. ✅ **Removed autoplay from iframe allow attribute** - Further Error 153 prevention
3. ✅ **Better error messages** - Alerts explain if video fails to load

---

**Next Steps:**

1. Try the test videos above
2. If they work → Error 153 is just that specific video
3. If they don't work → check browser console for other errors
4. Report back with results!
