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.
Parameter | Type | Description | Example |
---|---|---|---|
eventID | String | The unique identifier for the event opened in the app's player. | "event123" |
delegate | MaestroEventDelegate | An instance of your implementation of the MaestroEventDelegate protocol, enabling communication between the SDK and your app. | myEventDelegateInstance |
hideBetsPanel | Boolean | A flag to determime whether to hide the bets panel | false |
hideBetsWagers | Boolean | A flag to determime whether to hide wagers on the bets panel | false |
disableBetsOverlays | Boolean | A flag to determime whether to disable overlays for bets | false |
disableFantasyOverlays | Boolean | A flag to determime whether to disable overlays for fantasy | false |
Code Example
Task {
let eventInterface = await MaestroManager.shared.userDidStartWatchingEvent(
eventID: "event123",
delegate: myEventDelegateInstance,
hideBetsPanel: false,
hideBetsWagers: false,
disableBetsOverlays: false,
disableFantasyOverlays: false
)
// eventInterface now conforms to MaestroEventInterface, allowing you to interact with the currently-loaded event.
}