Video

@Serializable
data class Video(val id: String, val streamId: String? = null, val userId: String, val userLogin: String, val userName: String, val title: String, val description: String = "", val createdAt: Instant, val publishedAt: Instant, val url: String, val thumbnailUrl: String, val viewable: String = "public", val viewCount: Int = 0, val language: String = "", val type: String = "", val duration: String = "", val mutedSegments: List<MutedSegment>? = null)

Represents a published video on Twitch.

See also

Constructors

Link copied to clipboard
constructor(id: String, streamId: String? = null, userId: String, userLogin: String, userName: String, title: String, description: String = "", createdAt: Instant, publishedAt: Instant, url: String, thumbnailUrl: String, viewable: String = "public", viewCount: Int = 0, language: String = "", type: String = "", duration: String = "", mutedSegments: List<MutedSegment>? = null)

Properties

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Instant

the date and time, in UTC, of when the video was created.

Link copied to clipboard

the video's description.

Link copied to clipboard

the video's length in ISO 8601 duration format. For example, 3m21s represents 3 minutes, 21 seconds.

Link copied to clipboard
val id: String

an ID that identifies the video.

Link copied to clipboard

the ISO 639-1 two-letter language code that the video was broadcast in. The language value is other if the video was broadcast in a language not in the list of supported languages.

Link copied to clipboard
@SerialName(value = "muted_segments")
val mutedSegments: List<MutedSegment>?

the segments that Twitch Audio Recognition muted; otherwise, null.

Link copied to clipboard
@SerialName(value = "published_at")
val publishedAt: Instant

the date and time, in UTC, of when the video was published.

Link copied to clipboard
@SerialName(value = "stream_id")
val streamId: String?

the ID of the stream that the video originated from if the video's type is archive; otherwise, null.

Link copied to clipboard
@SerialName(value = "thumbnail_url")
val thumbnailUrl: String

a URL to a thumbnail image of the video. Before using the URL, you must replace the %{width} and %{height} placeholders with the width and height of the thumbnail you want returned.

Link copied to clipboard

the video's title.

Link copied to clipboard

the video's type. Possible values are: archive (VOD of a past stream), highlight (highlight reel of a past stream), upload (externally uploaded video).

Link copied to clipboard
val url: String

the video's URL.

Link copied to clipboard
@SerialName(value = "user_id")
val userId: String

the ID of the broadcaster that owns the video.

Link copied to clipboard
@SerialName(value = "user_login")
val userLogin: String

the broadcaster's login name.

Link copied to clipboard
@SerialName(value = "user_name")
val userName: String

the broadcaster's display name.

Link copied to clipboard

the video's viewable state. Always set to public.

Link copied to clipboard
@SerialName(value = "view_count")
val viewCount: Int

the number of times that users have watched the video.