Basic usage
1
Add the container element
Add a
div in your HTML where the widget will render.2
Initialize the SDK
Load the Squire SDK from the CDN and create a
Squire instance with your access token. See Authentication for how to obtain a token.3
Mount the widget
Call
mountWidget with the container selector and the widget name 'microphone-quality-test'. Pass an optional configuration object as the third argument to customize behavior and appearance.4
Listen for events
Subscribe to the
loaded event to know when the widget is ready.Configuration options
Pass a configuration object as the third argument tomountWidget to customize the widget.
string
default:"outputLanguage from SDK initialization"
Language code for the widget interface. Supported values:
'en' (English), 'nl' (Dutch), 'fr' (French), 'de' (German).When omitted, the widget uses the outputLanguage set during SDK initialization.string
Label of the microphone device to preselect. When provided, the widget skips its built-in microphone selection UI and uses the specified device directly.
ThemeConfig
Theme configuration object for customizing the widget’s visual appearance.
Events
Listen for events using theon method on the widget instance.
() => void
Emitted when the widget has fully loaded and is ready for user interaction.
Complete example
The following example shows a full HTML page embedding the Microphone Quality Test Widget.index.html