Add seek preview thumbnails

Learn how to show spritesheet-based thumbnail previews while scrubbing the seek bar in the FastPix iOS Player.

The FastPix iOS Player supports spritesheet-based thumbnail previews that appear when a user scrubs through the seek bar. If a thumbnail isn’t available, the SDK falls back to showing a timestamp.

Enable spritesheet preview

1let previewConfig = FastPixSeekPreviewConfig()
2
3playerViewController.loadSpritesheet(
4 url: nil,
5 previewEnable: true,
6 config: previewConfig
7)
8
9playerViewController.setFallbackMode(.timestamp)

Get the preview during scrubbing

Retrieve the thumbnail for a given time and pass it to the seek bar:

1let result = playerViewController.fastpixThumbnailForPreview(at: time)
2
3seekBar.updatePreviewThumbnail(
4 result.image,
5 time: time,
6 useTimestamp: result.useTimestamp
7)

Secured content support

Spritesheet previews work with both private (token-protected) and DRM-protected (FairPlay) streams. The SDK handles secure fetching and rendering of spritesheet assets without exposing protected URLs.

Note: The SDK automatically falls back to timestamp display if a thumbnail isn’t available for the current position. Spritesheet previews work with playlists and custom seek bars.