# VideoPreview

# VideoPreview

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/VideoPreview "View this page in Kotlin")\|Java  

<br />

```
public final class VideoPreview
```

<br />

*** ** * ** ***

An object representing a video preview content.

## Summary

|                                                                                                                                    ### Nested types                                                                                                                                    |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `public final class `[VideoPreview.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/VideoPreview.Builder) Builder class for[VideoPreview](https://developer.android.com/reference/com/google/android/engage/common/datamodel/VideoPreview). |

|                              ### Public fields                              |
|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| `final `[Long](https://developer.android.com/reference/java/lang/Long.html) | [durationMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/VideoPreview#durationMillis()) |

|                                                                                        ### Public methods                                                                                        |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                              | [getDurationMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/VideoPreview#getDurationMillis())`()` Sets the duration of the video in milliseconds. |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)`>` | [getImage](https://developer.android.com/reference/com/google/android/engage/common/datamodel/VideoPreview#getImage())`()` Sets the preview image for the video content.                     |

## Public fields

### durationMillis

```
public final Long durationMillis
```  

## Public methods

### getDurationMillis

```
public Long getDurationMillis()
```

Sets the duration of the video in milliseconds.  

### getImage

```
public Optional<Image> getImage()
```

Sets the preview image for the video content.