playClip(atIndex:)
Introduction
The playClip(atIndex:)
method allows the SDK to request that your app play a specific key plays clip based on its array index. Since the MaestroKeyPlaysResponse
organizes key plays data into sections, this method assumes that your app maintains a flattened list of key plays. Implementing this method ensures that when the SDK needs to trigger playback, your app can accurately map the provided index to the corresponding clip.
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
index | Int | The array index of the key plays clip that should be played. This index corresponds to a flattened list of clips. | 0 |
Code Example
// Request the app to play the key plays clip at index 0.
delegate.playClip(atIndex: 0)