Skip to content

Commit 297ed2b

Browse files
authored
fix: enable Quick Look AR in third-party iOS browsers without ios-src (#5188)
The AR button stopped appearing in Chrome (and Edge/Firefox/DuckDuckGo) on iOS unless an explicit `ios-src` was provided. Those browsers can launch Quick Look with model-viewer's auto-generated USDZ, so the `ios-src` requirement is unnecessary and regressed behavior that worked in 4.2.0. Drop the `(!IS_IOS_THIRDPARTY || this.iosSrc != null)` clause from the quick-look mode selection. Quick Look remains disabled in the Google Search App webview (`!IS_IOS_GSA`), where it is genuinely broken. Fixes #5185
1 parent e33ab46 commit 297ed2b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/model-viewer/src/features

packages/model-viewer/src/features/ar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {property} from 'lit/decorators.js';
1717
import {Object3D} from 'three';
1818
import {USDZExporter} from 'three/examples/jsm/exporters/USDZExporter.js';
1919

20-
import {IS_AR_QUICKLOOK_CANDIDATE, IS_IOS_GSA, IS_IOS_THIRDPARTY, IS_SCENEVIEWER_CANDIDATE, IS_WEBXR_AR_CANDIDATE} from '../constants.js';
20+
import {IS_AR_QUICKLOOK_CANDIDATE, IS_IOS_GSA, IS_SCENEVIEWER_CANDIDATE, IS_WEBXR_AR_CANDIDATE} from '../constants.js';
2121
import ModelViewerElementBase, {$needsRender, $progressTracker, $renderer, $scene, $shouldAttemptPreload, $updateSource} from '../model-viewer-base.js';
2222
import {enumerationDeserializer} from '../styles/deserializers.js';
2323
import {ARStatus, ARTracking} from '../three-components/ARRenderer.js';
@@ -244,7 +244,7 @@ configuration or device capabilities');
244244
break;
245245
}
246246
if (value === 'quick-look' && IS_AR_QUICKLOOK_CANDIDATE &&
247-
!IS_IOS_GSA && (!IS_IOS_THIRDPARTY || this.iosSrc != null)) {
247+
!IS_IOS_GSA) {
248248
arMode = ARMode.QUICK_LOOK;
249249
break;
250250
}

0 commit comments

Comments
 (0)