Skip to main content

userDidStartWatchingEvent

MaestroKit provides the userDidStartWatchingEvent function to notify the SDK when a user opens an event in the app's player. This function requires two parameters: an event identifier and a delegate that conforms to MaestroEventDelegate. It returns an instance of MaestroEventInterface, which allows your app to interact with the currently loaded event.

ParameterTypeDescriptionExample
eventIDStringThe unique identifier for the event opened in the app's player."event123"
delegateMaestroEventDelegateAn instance of your implementation of the MaestroEventDelegate protocol, enabling communication between the SDK and your app.myEventDelegateInstance

Code Example

Task {
let eventInterface = await MaestroManager.shared.userDidStartWatchingEvent(
eventID: "event123",
delegate: myEventDelegateInstance
)
// eventInterface now conforms to MaestroEventInterface, allowing you to interact with the currently-loaded event.
}