Disable client-side media processing in Playground#75950
Closed
adamsilverstein wants to merge 1 commit intotrunkfrom
Closed
Disable client-side media processing in Playground#75950adamsilverstein wants to merge 1 commit intotrunkfrom
adamsilverstein wants to merge 1 commit intotrunkfrom
Conversation
WordPress Playground runs PHP via WebAssembly (php-wasm) inside iframes. Client-side media processing requires cross-origin isolation headers (COOP/COEP) that conflict with this iframe architecture, causing the editor to crash. Check PHP_SAPI for 'wasm' and return false early to fall back to server-side processing in Playground environments.
99fb24b to
f2118b6
Compare
|
@brandonpayton just merged a temporary fix that disables client-side media processing in Playground, so there's no need to disable it inside Gutenberg. We plan to enable client-side media processing in Playground once we solve the root cause of the issue. |
Member
Author
OK thanks for the update. I'll close this for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PHP_SAPI === 'wasm'check togutenberg_is_client_side_media_processing_enabled()that returnsfalseearly in WordPress Playground environmentsHow it works
WordPress Playground runs PHP via WebAssembly (php-wasm), which registers its SAPI as
"wasm". By checkingPHP_SAPIbefore applying the filter, all CSM infrastructure is disabled: nowindow.__clientSideMediaProcessing = trueflag, no COOP/COEP headers, andlib/media/load.phpearly-returns.Closes #75941
Test plan
vendor/bin/phpunit phpunit/media/media-processing-test.php🤖 Generated with Claude Code