Skip to main content

Event Delegate

Introduction​

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.

Key Responsibilities​

  • Focus Management:
    The startFocusManagement() method is called when the user navigates away from the SDK UI and focus should return to your application. Your implementation should set focus to the appropriate element in your UI to ensure a seamless navigation experience. It's important to note that it releases the focus management from the SDK, allowing your application to take control of focus transitions.

Methods​

MethodDescription
onOverlayEvent(event)Delivers overlay lifecycle events to the host application for handling.
onPanelEvent(event)Send panel events to the Client App to be handle.
onSDKEvent(event)Receives general SDK-to-host events, including rendered:channels with the available panel list. Optional.
startFocusManagement()Handles focus transfer from the SDK UI back to your application.
trackAction(action)Send User actions.
trackImpression(impression)Send Impression Events.

IMaestroEventDelegate also declares deprecated methods that only ESPN panels use: getBettingAPIBaseURL(), getStatsAPIBaseURL(), getUserSWID(), getUserToken(), playClip(), userIsAuthenticated() and userRequestedNewKeyPlaysData(). The TypeScript interface still requires them, so if your pages have no ESPN panels, implement them as no-ops.