Embedding & subdomain

How the hearing test is hosted on its own subdomain and embedded into a parent site via an iframe.

Hosting

The application is deployed as a standalone Next.js site at its own subdomain:

https://app.audionycs.com/

It is a self-contained web app — open the URL directly and the full test flow (landing page → profile setup → tone test → audiogram) runs inside it, with no dependency on the parent site.

Why a separate subdomain

Running the test on app.audionycs.com rather than as a sub-path of the marketing site gives a few practical benefits:

Embedding with an iframe

To embed the test inside a parent page, drop this snippet where you want it to appear:

<iframe
  src="https://app.audionycs.com/"
  title="Online Hearing Test"
  width="100%"
  height="900"
  style="border: 0; display: block;"
  allow="autoplay; microphone"
  loading="lazy"
></iframe>

About the attributes

Responsive embed

For a responsive, full-viewport embed, wrap the iframe in a container with a fixed aspect ratio or a viewport-based height:

<div style="width: 100%; height: 100vh; min-height: 700px;">
  <iframe
    src="https://app.audionycs.com/"
    title="Online Hearing Test"
    style="width: 100%; height: 100%; border: 0;"
    allow="autoplay"
  ></iframe>
</div>
Headphones required

The test requires headphones for accurate left/right channel separation. Make sure the parent page tells the user this before they reach the embed, so they are ready when the landing page inside the iframe asks them to plug in.

Frame-ancestor policy

The application does not set a restrictive X-Frame-Options or Content-Security-Policy: frame-ancestors header, so it can be embedded by any parent origin. If you need to restrict which domains are allowed to embed the test, add a frame-ancestors directive to the deploy configuration.