Skip to content

fix: restore viewer state after Quick Look export failure - #5198

Merged
diegoteran merged 1 commit into
google:masterfrom
Arthur031221:fix-quick-look-export-recovery-s21
Oct 6, 2026
Merged

diegoteran merged 1 commit into
google:masterfrom
Arthur031221:fix-quick-look-export-recovery-s21

Conversation

@Arthur031221

Copy link
Copy Markdown
Contributor

Reference Issue

Related to #4300. Quick Look cannot export that issue's video texture. This change repairs the viewer after the failed conversion; it does not add video texture support to USDZ.

When a page uses createVideoTexture() and starts Quick Look, USDZExporter rejects because it cannot process the video element. The live model then disappears, its shadow is hidden, a progress activity stays open, and the AR button stays disabled. The cleanup in prepareUSDZ() ran only after a successful export.

Restore the model, shadow visibility, and progress activity when export rejects, then re-enable the AR button. The original error still propagates. After the failed AR attempt, users can keep viewing the model and the AR button is available again; Quick Look still does not open for a video texture.

The browser test loads cube.gltf, assigns lottie-logo.mp4 through the public createVideoTexture() API, and reaches the exporter without a stub. The same error occurred before and after the fix: THREE.USDZExporter: No valid image data found. Unable to process texture.

Before the fix, the AR test printed:

AssertionError: expected [ false, false, false, false ] to deeply equal [ true, true, true, true ]
Chromium: 11 passed, 1 failed, 1 skipped

After the fix, the full Chromium suite passed with 411 passed, 0 failed, 23 skipped. The same suite on the base commit passed twice with 410 passed, 0 failed, 23 skipped. npm run build:tsc -w @google/model-viewer also passes. WebKit and iOS were not run locally because this host lacks WebKit's system libraries.

@diegoteran diegoteran left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this

@diegoteran
diegoteran merged commit ebd1421 into google:master Oct 6, 2026
8 checks passed
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.

2 participants