Skip to main content

Maestro Event Interface

Introduction

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().

Key Responsibilities

The Maestro Event Interface creates a clear contract between your application and the SDK, enabling bidirectional communication for panel management, playback control, and state access. This interface is core to the SDK's functionality and is designed to work seamlessly with the Event Delegate implementation in your application.

  • Panel Management:
    Methods like didShowPanel() and didHidePanel() allow you to notify the SDK when the panel's visibility changes, enabling proper state management and analytics tracking.

  • Playback Control:
    Methods like didStartPlayingClip(), didStopPlayingClip(), and didUpdatePlaybackProgressOfClip() enable you to inform the SDK about the state of clip playback, allowing the UI to update accordingly.

  • State Access:
    Methods like getCurrentEventID(), getCurrentlyPlayingClipIndex(), and getKeyPlaysCount() provide access to the current state of the event, allowing your application to make informed decisions.

  • Data Updates:
    The updateKeyPlaysData() method allows you to update the key plays data displayed in the panel, either when new data becomes available or when the user explicitly requests a refresh.

  • Focus Management:
    The startFocusManagement() method helps manage focus transitions between the SDK UI and your application, ensuring a seamless navigation experience.

Methods

Panel Management

These methods allow you to manage the visibility and behavior of the Maestro panel.

MethodDescription
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.

MethodDescription
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 Retrieval/Update

These methods allow you to access information about the current state of the event and key plays.

MethodDescription
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.
setDataToPanel()Pushes external data into a specific panel.