API Reference
Overview
This API Reference provides detailed information on all SDK methods and resources. The methods are organized by
Core SDK, Event Delegate, and Maestro Event Interface.
Core SDK
The Core SDK provides the fundamental methods for initializing and configuring the Maestro Web SDK. These methods serve
as the entry point for integrating the SDK into your web application and allow you to authenticate users, manage event
lifecycles, and render the Maestro panel.
| Method | Description |
|---|---|
| configure() | Initializes the Maestro Web SDK with required configuration parameters. |
| getMaestroEventViewModel() | Retrieves the current event view model instance. |
| renderPanel() | Renders the Maestro panel UI into a specified DOM element. |
| userDidStartWatchingEvent() | Indicates that a user has started watching an event and initializes the event view model. |
| userDidStopWatchingEvent() | Indicates that a user has stopped watching an event and cleans up resources. |
Event Delegate
The IMaestroEventDelegate interface defines a set of methods that your application must implement to enable seamless
communication between the Maestro Web SDK and your application. By implementing this interface, your application provides
critical functionality, such as supplying key plays data, controlling media playback, and managing focus transitions.
| Method | Description |
|---|---|
| getBettingAPIBaseURL() | Should return the Base URL to be used in the Bet module to fetch event bets. |
| getStatsAPIBaseURL() | Should return the Base URL to be used in the Stats module to fetch event stats. |
| getUserSWID() | Should return a Promised boolean or null value with the user's SWID. |
| getUserToken() | Should return a Promised boolean or null value with the user's Cookie Token. |
| onPanelEvent(event) | Send panel events to the Client App to be handle. |
| playClip(atIndex) | Plays a video clip at the specified index. |
| startFocusManagement() | Handles focus transfer from the SDK UI back to your application. |
| trackAction(action) | Send User actions. |
| trackImpression(impression) | Send Impression Events. |
| userIsAuthenticated() | Should return a Promised boolean telling if the user is Authenticated. |
| userRequestedNewKeyPlaysData() | Fetches fresh key plays data when requested by the user. |
Maestro Event Interface
The Maestro Event Interface (IMaestroEvent) defines a set of methods for interacting with the current event.
These methods allow you to control panel visibility, manage playback, and access state information. The interface
is implemented by the MaestroEventViewModel and is available after calling userDidStartWatchingEvent().
Panel Management
These methods allow you to manage the visibility and behavior of the Maestro panel.
| Method | Description |
|---|---|
| currentEventDoesNotSupportKeyPlays() | Indicates that the current event does not support key plays functionality. |
| didHidePanel() | Indicates that the panel has been hidden from the user. |
| didShowPanel() | Indicates that the panel has been shown to the user. |
Playback Controls
These methods allow you to control and provide feedback about clip playback to the SDK.
| Method | Description |
|---|---|
| didFailToPlayClip() | Indicates that a clip failed to play. |
| didStartPlayingClip() | Indicates that a clip has started playing. |
| didStopPlayingClip() | Indicates that a clip has stopped playing. |
| didUpdatePlaybackProgressOfClip() | Updates the playback progress of the currently playing clip. |
State Access
These methods allow you to access information about the current state of the event and key plays.
| Endpoint | Description |
|---|---|
| getCurrentClipPlaybackProgress() | Retrieves the playback progress of the currently playing clip. |
| getCurrentEventID() | Retrieves the ID of the current event. |
| getCurrentlyPlayingClipIndex() | Retrieves the index of the currently playing clip. |
| getKeyPlaysCount() | Retrieves the total number of key plays available. |
| getLastPlayedClipIndex() | Retrieves the index of the last played clip. |
| getPlayerTimeCode() | Retrieves the current player time code stored in the SDK. |
| setActivePanel() | Change the active panel. |
| updateKeyPlaysData() | Updates the key plays data for the current event. |
| updatePlayerTimeCode() | Updates the Player Time Code stored in the SDK. |
| updateUserSettings() | Update user settings in real-time. |