Add linkPreviewTypeEmbeddedVideoPlayer.thumbnail.

This commit is contained in:
levlam 2024-07-10 10:45:05 +03:00
parent 33ad5b431f
commit a40f104470
2 changed files with 4 additions and 3 deletions

View File

@ -2604,11 +2604,12 @@ linkPreviewTypeEmbeddedAudioPlayer url:string duration:int32 author:string = Lin
//@description The link is a link to a video player
//@url URL of the external video player
//@thumbnail Thumbanil of the video; may be null if unknown
//@duration Duration of the video, in seconds
//@author Author of the video
//@width Expected width of the preview
//@height Expected height of the preview
linkPreviewTypeEmbeddedVideoPlayer url:string duration:int32 author:string width:int32 height:int32 = LinkPreviewType;
linkPreviewTypeEmbeddedVideoPlayer url:string thumbnail:photo duration:int32 author:string width:int32 height:int32 = LinkPreviewType;
//@description The link is a link to an invoice
linkPreviewTypeInvoice = LinkPreviewType;

View File

@ -1546,8 +1546,8 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
}
if (web_page->type_ == "video") {
return td_api::make_object<td_api::linkPreviewTypeEmbeddedVideoPlayer>(
web_page->embed_url_, web_page->duration_, web_page->author_, web_page->embed_dimensions_.width,
web_page->embed_dimensions_.height);
web_page->embed_url_, get_photo_object(td_->file_manager_.get(), web_page->photo_), web_page->duration_,
web_page->author_, web_page->embed_dimensions_.width, web_page->embed_dimensions_.height);
}
} else {
// ordinary audio/video