Skip to main content

stopPlayingClip(atIndex:)

Introduction

The stopPlayingClip(atIndex:) method allows the SDK to request that your app stop playing a specific key plays clip, identified by 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, disregarding any sectional subdivisions. Implementing this method ensures that your app can correctly halt playback when instructed by the SDK.

Parameters

ParameterTypeDescriptionExample
indexIntThe array index of the key plays clip that should be stopped. This index corresponds to a flattened list of clips.0

Code Example

// Request the app to stop playing the key plays clip at index 0.
delegate.stopPlayingClip(atIndex: 0)