Skip to content

fix(play): allow blob: media in runner - #1979

Open
caugner wants to merge 1 commit into
mainfrom
746-allow-blob-media-in-runner
Open

caugner wants to merge 1 commit into
mainfrom
746-allow-blob-media-in-runner

Conversation

@caugner

@caugner caugner commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Update the local runner CSP to allow blob: media URLs.

Motivation

Enable live samples that play media created with URL.createObjectURL().

Additional details

To check this locally, serve Fred's runner HTML with its CSP, create a blob from a valid WebM recording, and assign its object URL to a <video> element. In headless Chrome, the original policy rejected the media load; with this change, loadeddata fired.

The runner CSP also applies to interactive examples and Playground results. The new media-src retains the existing 'self' and https: allowances. blob: URLs are bound to the origin that created them, so this only lets a sample play media it created itself in the runner's sandboxed origin. The same allowance already exists for img-src. The flow cannot be reproduced in Review Companion.

Related issues and pull requests

Part of #746.

Companion to mdn/dex#559.

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

b55a6f0 was deployed to: https://fred-pr1979.review.mdn.allizom.net/

@caugner
caugner force-pushed the 746-allow-blob-media-in-runner branch from a0d50b2 to 6889a4f Compare October 3, 2026 01:10
@caugner
caugner marked this pull request as ready for review October 3, 2026 01:11
@caugner
caugner requested a review from a team as a code owner October 3, 2026 01:11
@caugner
caugner requested a review from LeoMcA October 3, 2026 01:11

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant