Skip to content

fix(app): play YouTube embeds in project descriptions - #8114

Open
Derpedyea wants to merge 3 commits into
modrinth:mainfrom
Derpedyea:fix/app-youtube-embeds
Open

Derpedyea wants to merge 3 commits into
modrinth:mainfrom
Derpedyea:fix/app-youtube-embeds

Conversation

@Derpedyea

@Derpedyea Derpedyea commented Oct 24, 2026 •

Copy link
Copy Markdown

Fixes the video playback half of #6274. Related: #5908.

Problem

YouTube embeds in project descriptions show "Error 153: Video player configuration error" in the app instead of playing. Repro on Linux (0.21.10, 0.22.0): open Create's project page.

Change

The app's webview loads from tauri://localhost, so the YouTube frame gets no Referer and YouTube refuses to play (tauri#14422). At startup the app now starts a loopback HTTP server, and the markdown sanitizer points YouTube iframes at a wrapper page on it (http://127.0.0.1:<port>/embed/<id>), which gives the player a valid referrer. youtube-nocookie embeds stay on the nocookie host. The website doesn't set the origin, so it's unchanged.

Verification

  • Linux (CachyOS, WebKitGTK 2.54), release build: Create's video plays in place; before, Error 153. Other links on the page still open in the browser.
  • pnpm prepr:frontend:lib, pnpm prepr:frontend:app, cargo clippy -p theseus_gui --all-targets -- -D warnings: clean
  • Not tested on macOS or Windows. macOS 14+ needs the 127.0.0.1 ATS exception added to Info.plist.

Known gaps

  • Links inside the YouTube player (title, logo) still do nothing: they open a new window from a nested frame, which the main window doesn't handle.

Suggested changelog

App → Fixed: YouTube videos in project descriptions now play instead of showing "Error 153".

Demo

Before After
Before: Error 153 After: video playing, paused at 0:25

Built and verified with Claude Opus 5.5 in Claude Code.

The app webview loads from a custom scheme, so YouTube embeds get no
Referer header and fail with "Error 153: Video player configuration
error". Serve each embed through a small page on a loopback HTTP
server so the player receives a valid referrer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Derpedyea and others added 2 commits October 24, 2026 18:29
…macOS

Keep youtube-nocookie embeds on the nocookie host, add an ATS exception
for 127.0.0.1 (macOS 14+ blocks plain HTTP to IP addresses by default),
back off when the embed server fails to accept, and trim the sanitizer
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the read timeout, per-error logging and the wrapper page's CSP
header, and shorten the module doc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant