diff --git a/src/helpers/media.ts b/src/helpers/media.ts index 811de64..a9b9c09 100644 --- a/src/helpers/media.ts +++ b/src/helpers/media.ts @@ -14,6 +14,7 @@ export const processMedia = (media: TweetMedia): APIPhoto | APIVideo | null => { ); return { url: bestVariant?.url || '', + variants: media.video_info?.variants || [], thumbnail_url: media.media_url_https, duration: (media.video_info?.duration_millis || 0) / 1000, width: media.original_info.width, diff --git a/src/types/types.d.ts b/src/types/types.d.ts index c89ea29..cfb3d34 100644 --- a/src/types/types.d.ts +++ b/src/types/types.d.ts @@ -97,6 +97,7 @@ interface APIMosaicPhoto { interface APIVideo { type: 'video' | 'gif'; url: string; + variants: TweetMediaFormat[]; thumbnail_url: string; width: number; height: number;