TwitchClipInfo interface

Information about a Twitch clip

Signature:

export interface TwitchClipInfo 

Remarks

This is the same data as the Twitch API provides with the addition of:

isValid which you must check in the response to ensure the input was valid and Twitch was able to find the data

videoUrl which you can pass to VideoComponent.prepareVideo() to play the clip

Properties

PropertyModifiersTypeDescription
broadcasterIdreadonlystringId of the user who's stream the clip was created from
broadcasterNamereadonlystringDisplay name of the user who's stream the clip was created from
createdAtreadonlyDateThe time at which the clip was created
creatorIdreadonlystringId of the user who created the clip
creatorNamereadonlystringDisplay name of the user who created the clip
durationreadonlynumberDuration of the Clip in seconds (up to 0.1 precision)
embedUrlreadonlystringURL to embed the clip
gameIdreadonlystringId of the game featured in this clip
idreadonlystringTwitch id of the clip
isValidreadonlyboolean

False if the request failed

Could be a service / network outage but more likely the input was invalid

languagereadonlystringLanguage of the stream from which the clip was created. A language value is either the ISO 639-1 two-letter code for a supported stream language or “other”
thumbnailUrlreadonlystringURL of the clip thumbnail
titlereadonlystringTitle of the clip
urlreadonlystringURL where the clip can be viewed
videoUrlreadonlystringURL of the clip video
viewCountreadonlynumberNumber of times the clip has been viewed

TwitchClipInfo.broadcasterId property

Id of the user who's stream the clip was created from

Signature:

readonly broadcasterId: string;

TwitchClipInfo.broadcasterName property

Display name of the user who's stream the clip was created from

Signature:

readonly broadcasterName: string;

TwitchClipInfo.createdAt property

The time at which the clip was created

Signature:

readonly createdAt: Date;

TwitchClipInfo.creatorId property

Id of the user who created the clip

Signature:

readonly creatorId: string;

TwitchClipInfo.creatorName property

Display name of the user who created the clip

Signature:

readonly creatorName: string;

TwitchClipInfo.duration property

Duration of the Clip in seconds (up to 0.1 precision)

Signature:

readonly duration: number;

TwitchClipInfo.embedUrl property

URL to embed the clip

Signature:

readonly embedUrl: string;

TwitchClipInfo.gameId property

Id of the game featured in this clip

Signature:

readonly gameId: string;

TwitchClipInfo.id property

Twitch id of the clip

Signature:

readonly id: string;

TwitchClipInfo.isValid property

False if the request failed

Could be a service / network outage but more likely the input was invalid

Signature:

readonly isValid: boolean;

TwitchClipInfo.language property

Language of the stream from which the clip was created. A language value is either the ISO 639-1 two-letter code for a supported stream language or “other”

Signature:

readonly language: string;

TwitchClipInfo.thumbnailUrl property

URL of the clip thumbnail

Signature:

readonly thumbnailUrl: string;

TwitchClipInfo.title property

Title of the clip

Signature:

readonly title: string;

TwitchClipInfo.url property

URL where the clip can be viewed

Signature:

readonly url: string;

TwitchClipInfo.videoUrl property

URL of the clip video

Signature:

readonly videoUrl: string;

TwitchClipInfo.viewCount property

Number of times the clip has been viewed

Signature:

readonly viewCount: number;