Upload an asset
Follow our previous guide on uploading an asset and get theplaybackId
.
Any assets uploaded after November 21st, 2023 will have thumbnails generated
for them. If the asset was uploaded before then, it will need to be
re-imported to create thumbnails.
Fetch playback info
Once the processing has completed for your asset, fetch the playback info using the playback info API endpoint. Example response:source
array with the type text/vtt
. This
file uses the WebVTT format to represent the
thumbnails associated with each time point in the video.
This format was chosen with the use case of thumbnail scrubbing in mind, to
allow a player to overlay thumbnail images as the user is seeking through a
video, but it allows more general usage of selecting a desired time in your
video and fetching a thumbnail for it.
This will always have a
hrn
of Thumbnails
and type
of text/vtt
.Download the VTT file
Fetch the VTT file from the URL above.Show a thumbnail
Use one of the JPG paths to download a thumbnail. As an example if your VTT URL is:Since these coincide with a “segment” (roughly every 3 seconds), the index (in
the example above,
keyframes_0.jpg
) can be varied depending on your apps
use-case. These can be used to form reliable preview images for an asset.