跳到主要内容

Thumbnail Seeking

Thumbnail seeking allows users to quickly navigate through longer videos by displaying preview images associated with specific timestamps as they hover over the progress bar or seek through the video.

To enable thumbnail seeking, add a VTT file with thumbnail image URLs to the MediaConfig:

// Step1. set the vtt with MediaConfig, and load it into player
val mediaConfig = MediaConfig(
...
thumbnailSeekingUrl = "$THUMBNAIL_URL",
)
player.load(mediaConfig)

// Step2. get the specified position's thumbnail bitmap
val bitmap = player.getThumbnail(positionMs)