playClip
Plays a video clip at the specified index.
Overview
The playClip
method is called by the SDK when a user selects a clip to play from the key plays panel. Your implementation should handle playing the actual video clip in your video player and report progress back to the SDK.
Method Signature
playClip(atIndex: number): void
Parameters
Parameter | Type | Description |
---|---|---|
atIndex | number | The index of the clip to play, corresponding to its position in the flattened key plays array |
Return Value
This method does not return a value.
Implementation Requirements
Your implementation of this method should:
- Start playing the clip in your video player
- Notify the SDK when playback starts by calling
didStartPlayingClip()
- Periodically update the SDK on playback progress by calling
didUpdatePlaybackProgressOfClip()
- Notify the SDK when playback completes by calling
didStopPlayingClip()
- Handle error cases and notify the SDK of failures by calling
didFailToPlayClip()