Aimigo

Web pages

Host page requirements

https, Content Security Policy, permissions policy, audio files and frames: what your page must allow.

Most pages need nothing beyond the script tag. Check this page if your site sends security headers or the digital human does not appear.

Checklist

RequirementWhyHow to check
Page served over https (or http://localhost for tests)the download cache and the shared cache need a secure contextaddress bar shows a lock
Script host allowedthe embed script is loaded from the Aimigo player hostno CSP error for aimigo-embed.js in the console
Frame host allowedthe player runs in a frameno CSP error mentioning frame-src
Audio readable by the pagespeak({ audioUrl }) downloads the audio in your pagesame origin, or the audio server sends Access-Control-Allow-Origin
Autoplay not forbiddenthe frame plays audiono Permissions-Policy: autoplay=() on your page

Content Security Policy

If your page sends a Content-Security-Policy header, add the Aimigo player host to three directives (keep your other sources):

script-src  'self' https://player.aimigo.live;
frame-src   'self' https://player.aimigo.live;
connect-src 'self' <origin of your audio files, if not your own>;
  • No 'unsafe-inline' is needed: the embed script positions its frame through the DOM, not with inline styles or scripts.
  • If you use default-src only, the browser uses it for missing directives; add the player host there or add the three directives explicitly.
  • Your own <script> blocks that call Aimigo.default must be allowed by your policy as usual (put them into a file if inline scripts are forbidden).

Permissions Policy

The frame asks for autoplay, fullscreen and xr-spatial-tracking. A Permissions-Policy header on your page that sets autoplay=() silences the digital human; fullscreen=() only disables fullscreen. Microphone input is not used by the web embed today.

Your page inside a frame

If your page itself runs inside another site's frame, the player becomes a frame inside a frame. It works, but browsers treat the storage as third-party twice: the shared download cache is then usually not available (see performance).

Single-page apps

  • Load the script tag once (in index.html), not inside a component that renders again on every route change.
  • To show the digital human only on some routes, use dh.hide() / dh.show(). dh.destroy() followed by a new Aimigo.mount() starts the engine again.

What the frame can and cannot do

  • It cannot read your page, its cookies or its storage.
  • It accepts commands only from the page origin it was created for.
  • It sends messages only to that origin.

This page as Markdown · llms.txt · All docs in one file