getThumbnail

open suspend fun getThumbnail(positionMs: Long, thumbnailHandler: (result: Bitmap?) -> Unit)

Provides video stream preview image that can be shown to the user when seeking (VOD content only).

Parameters

positionMs

The video stream position (in milliseconds).

thumbnailHandler

The handler for thumbnail fetching. The handler caller is passed the preview image Bitmap for a given video stream position or null if the image data is not available.


open fun getThumbnail(positionMs: Long, callback: Player.ThumbnailCallback)

Asynchronously provides a video stream preview image for Java callers by delivering the result via the provided callback.

Parameters

positionMs

The video stream position (in milliseconds).

callback

The ThumbnailCallback to be invoked with the result. The callback will be invoked on the main thread.