Skip to main content

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

ParameterTypeDescription
atIndexnumberThe 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:

  1. Start playing the clip in your video player
  2. Notify the SDK when playback starts by calling didStartPlayingClip()
  3. Periodically update the SDK on playback progress by calling didUpdatePlaybackProgressOfClip()
  4. Notify the SDK when playback completes by calling didStopPlayingClip()
  5. Handle error cases and notify the SDK of failures by calling didFailToPlayClip()