configure
Initializes the Maestro Web SDK with required configuration parameters.
Overview
The configure method is the first method you should call when integrating the SDK. It sets the SDK's siteID and, optionally, initial user settings.
Method Signature
configure(configParams: SDKConfigParams): void
Parameters
| Parameter | Type | Description |
|---|---|---|
configParams | SDKConfigParams | An object containing configuration parameters |
SDKConfigParams Interface
export type SDKConfigParams = {
/**
* The site ID to use for the SDK.
*/
siteID: string;
/**
* User settings for customizing SDK behavior (panel visibility, feature toggles, etc.)
*/
userSettings?: IUserSettings;
/**
* The platform the host application is running on.
* @default 'bbd'
*/
platform?: MaestroPlatform;
};
MaestroPlatform
type MaestroPlatform = 'bbd' | 'desktop_web';
| Value | Description |
|---|---|
'bbd' | Big-screen / broadcast display (default). Renders the TV-optimized UI. |
'desktop_web' | Desktop web browser. Renders the web-optimized UI. |
note
If platform is omitted, the SDK defaults to 'bbd' and renders the TV UI. Pass 'desktop_web' explicitly when integrating into a desktop web application.
Return Value
This method does not return a value.
Throws
Error("Site ID must be provided")— ifsiteIDis missing, empty, or only whitespace.
Example
import SDK from "@maestro_io/maestro-web-sdk";
// Initialize with the default (TV) platform
SDK.configure({
siteID: "<your-site-id>",
});
// Initialize for a desktop web application
SDK.configure({
siteID: "<your-site-id>",
platform: "desktop_web",
});
Notes
- This method should be called before any other SDK methods.
- The
siteIDparameter is required and must match a valid Maestro site ID.