mount(options)
| Option | Type | Description |
|---|---|---|
container | element or CSS selector, required | Where the iframe goes. An unknown selector throws |
link | string, required | The invitation link (link of POST /v1/invitations). Must be https (plain http only for localhost, *.localhost and 127.0.0.1, for development) |
onEvent | function | Called with each event from the interview (see Events) |
height | CSS length | The iframe's height. Default 720px: the interview needs room for its tool panels |
title | string | The iframe's accessible title. Default Interview |
The iframe fills the container's width, and asks for the microphone (for the voice interview), the camera and the screen (only used when your company records them), autoplay and the clipboard.
The handle
mount returns { iframe, destroy() }. destroy() stops listening for events and removes the iframe, for example when the candidate leaves a single-page app's route.
Mount before the script loads
Load the script with async and queue the call: options pushed to window.TesteeEmbedQueue are mounted once the page is parsed, so the script can go in <head> before its container exists, and a push after that mounts at once. A call whose container is missing is logged in the console and doesn't stop the others. Loading the script twice is harmless.