VideoInfo

@JsonClass(generateAdapter = true)
data class VideoInfo(    @Json(name = "mimetype") val mimeType: String?,     @Json(name = "w") val width: Int = 0,     @Json(name = "h") val height: Int = 0,     @Json(name = "size") val size: Long = 0,     @Json(name = "duration") val duration: Int = 0,     @Json(name = "thumbnail_info") val thumbnailInfo: ThumbnailInfo? = null,     @Json(name = "thumbnail_url") val thumbnailUrl: String? = null,     @Json(name = "thumbnail_file") val thumbnailFile: EncryptedFileInfo? = null)

Constructors

Link copied to clipboard
fun VideoInfo(    @Json(name = "mimetype") mimeType: String?,     @Json(name = "w") width: Int = 0,     @Json(name = "h") height: Int = 0,     @Json(name = "size") size: Long = 0,     @Json(name = "duration") duration: Int = 0,     @Json(name = "thumbnail_info") thumbnailInfo: ThumbnailInfo? = null,     @Json(name = "thumbnail_url") thumbnailUrl: String? = null,     @Json(name = "thumbnail_file") thumbnailFile: EncryptedFileInfo? = null)

Properties

Link copied to clipboard
val duration: Int = 0

The duration of the video in milliseconds.

Link copied to clipboard
val height: Int = 0

The height of the video in pixels.

Link copied to clipboard
val mimeType: String?

The mimetype of the video e.g. "video/mp4".

Link copied to clipboard
val size: Long = 0

The size of the video in bytes.

Link copied to clipboard
val thumbnailFile: EncryptedFileInfo? = null

Information on the encrypted thumbnail file, as specified in End-to-end encryption. Only present if the thumbnail is encrypted.

Link copied to clipboard
val thumbnailInfo: ThumbnailInfo? = null

Metadata about the image referred to in thumbnail_url.

Link copied to clipboard
val thumbnailUrl: String? = null

The URL (typically MXC URI) to an image thumbnail of the video clip. Only present if the thumbnail is unencrypted.

Link copied to clipboard
val width: Int = 0

The width of the video in pixels.

Extensions

Link copied to clipboard
fun VideoInfo.getThumbnailUrl(): String?

Get the url of the encrypted thumbnail or of the thumbnail.