Skip to navigation

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

let previewConfig = FastPixSeekPreviewConfig()
playerViewController.loadSpritesheet(
url: nil,
previewEnable: true,
config: previewConfig
)
playerViewController.setFallbackMode(.timestamp)

Get the preview during scrubbing

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

let result = playerViewController.fastpixThumbnailForPreview(at: time)
seekBar.updatePreviewThumbnail(
result.image,
time: time,
useTimestamp: result.useTimestamp
)

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.