You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to display the og:title on top of the URL? Instead of showing YouTube Video, the video title may show up. And instead of displaying the full link, just the hostname would be really nice.
The text was updated successfully, but these errors were encountered:
Okay, I will try if I got the time to do but in the meantime if someone is not able to fetch the youtube title you just need to remove the below code and the else condition code will be outside the else branch. so that means jsoup will fetch the title and image from the youtube URL as well as the normal URL. That is work for me.
LinkPreview.Kt if (url.let { it.contains("youtube") && it.contains("v=") }) { val id = url.split("v=")[1].split(" ")[0] val imageUrl = "https://img.youtube.com/vi/$id/hqdefault.jpg" imageType = ImageType.YOUTUBE context.addLink(url, imageUrl) setPreviewData(PreviewData("Youtube Video",imageUrl,url)) }
Is it possible to display the og:title on top of the URL? Instead of showing YouTube Video, the video title may show up. And instead of displaying the full link, just the hostname would be really nice.
The text was updated successfully, but these errors were encountered: