Language

ThumbnailUtils.CreateVideoThumbnailAsync Method

Definition

Overloads

Name Description
CreateVideoThumbnailAsync(File, Size, CancellationSignal)

Runs file-based video-thumbnail generation as a background task.

CreateVideoThumbnailAsync(String, ThumbnailKind)

Runs path-based video-thumbnail generation as a background task.

CreateVideoThumbnailAsync(File, Size, CancellationSignal)

Runs file-based video-thumbnail generation as a background task.

public static System.Threading.Tasks.Task<Android.Graphics.Bitmap> CreateVideoThumbnailAsync(Java.IO.File file, Android.Util.Size size, Android.OS.CancellationSignal? signal);
static member CreateVideoThumbnailAsync : Java.IO.File * Android.Util.Size * Android.OS.CancellationSignal -> System.Threading.Tasks.Task<Android.Graphics.Bitmap>

Parameters

file
File

The video file to pass to the synchronous thumbnail operation.

size
Size

The requested thumbnail dimensions.

signal
CancellationSignal

An optional cancellation signal forwarded to the thumbnail operation.

Returns

A task whose result is a thumbnail from embedded artwork or a representative video frame.

Remarks

The synchronous operation runs through Task.Run. The supplied Android cancellation signal is forwarded to that operation; it is not a cancellation token for scheduling the task.

Applies to

CreateVideoThumbnailAsync(String, ThumbnailKind)

Runs path-based video-thumbnail generation as a background task.

public static System.Threading.Tasks.Task<Android.Graphics.Bitmap?> CreateVideoThumbnailAsync(string filePath, Android.Provider.ThumbnailKind kind);
static member CreateVideoThumbnailAsync : string * Android.Provider.ThumbnailKind -> System.Threading.Tasks.Task<Android.Graphics.Bitmap>

Parameters

filePath
String

The path of the video file used to generate the thumbnail.

kind
ThumbnailKind

The legacy thumbnail-size selector.

Returns

A task whose result is the video thumbnail, or null when the synchronous operation encounters an I/O failure.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to