How to implement preview thumbnails on Android
This article describes how you can enable preview thumbnails, which THEOplayer implements through the TextTrack API. The thumbnails are loaded as a separate text track, by side-loading them as a text track in your source description.
A demo of the preview thumbnails on the THEOplayer Web SDK is available at https://demo.theoplayer.com/preview-thumbnails.
Usage
You can add or edit your source description as follows.
val sourceWithThumbnails =
SourceDescription.Builder("https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny.m3u8")
.textTracks(
TextTrackDescription.Builder("https://cdn.theoplayer.com/dash/theoplayer/thumbnails/big_buck_bunny_thumbnails.vtt")
.isDefault(true)
.kind(TextTrackKind.METADATA)
.srclang("en")
.label("thumbnails")
.build()
)
.build()