generateVideoThumbnailSequence

abstract fun generateVideoThumbnailSequence(block: DesignBlock, thumbnailHeight: Int, timeBegin: Double, timeEnd: Double, numberOfFrames: Int): Flow<VideoThumbnailResult>

Generate a thumbnail sequence for the given video fill or design block. Note: Only one request per block runs at a time. A second request for the same block waits for the first to finish instead of failing. Note: For a video fill, cancelling has no effect once the first frame has been scheduled — the engine still produces the remaining frames. Cancelling the collecting coroutine stops your collector from seeing them. Design block sequences cancel at any time. Note: Collect on the main thread; collection throws otherwise.

Return

a flow of VideoThumbnailResult object which emits for every generated frame thumbnail. It emits exactly numberOfFrames times.

Parameters

block

the video fill or a design block.

thumbnailHeight

the height of a thumbnail. The width will be calculated from the video aspect ratio.

timeBegin

the time in seconds relative to the time offset of the design block at which the thumbnail sequence should start.

timeEnd

the time in seconds relative to the time offset of the design block at which the thumbnail sequence should end.

numberOfFrames

the number of frames to generate.