# Embed Virtual Matter in an existing website Embed this existing Virtual Matter player in the user's existing website, preserving its design. Use the canonical player URL, never an external_site_url or a session-specific URL. Give the iframe a title, display:block, width:100%, height:100%, border:0, allowfullscreen, and allow='clipboard-read; clipboard-write; fullscreen; cross-origin-isolated'. Do not sandbox it. Give its real wrapper an explicit responsive height (85dvh with min-height:540px by default). Adapt placement and height to the user's request; avoid the browser's intrinsic 300x150 iframe size. The top-level HTML response MUST send Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp. A React component or meta tag cannot set these headers. Inspect the existing framework and host. Extend its server handler or deployment header configuration; do not replace an existing app or silently migrate its framework. Static hosts can work if their host supports response headers. With TanStack Start, set the headers on the existing src/server.ts response. Check external fonts, images, scripts and other embeds for CORS/CORP compatibility; do not blindly add crossorigin to resources whose servers do not support CORS. Preserve working site integrations. If this route cannot support isolation, explain the limitation and offer a separate play page/new tab. The nested Lovable editor preview may not be isolated. Show a thumbnail with an Open player link there; validate the published URL in a top-level browser tab. Check actual HTML response headers, window.crossOriginIsolated, the engine rendering and browser console errors, at desktop and phone sizes. Do not claim the embed works just because the iframe exists or the npm build passed. Resolve the world URL with GET /api/v1/public/embed?target=. No account is needed for a shared world. For personal projects and prompt-based creation, connect https://make.virtualmatter.ai/api/v1/mcp as a custom MCP server in Lovable (OAuth). Sign in or create a Virtual Matter account in the connection window, then approve access. No API key or terminal is needed. VM builds use VM credits.