mirror of
https://github.com/plebbit/seedit.git
synced 2026-02-15 16:31:24 -05:00
fix(media utils): use 0.jpg instead of sddefault for youtube thumbnails, some wouldn't load the specific sd res
This commit is contained in:
@@ -41,7 +41,7 @@ const getCommentMediaInfo = (comment: Comment) => {
|
||||
|
||||
if (['youtube.com', 'www.youtube.com', 'youtu.be'].includes(host)) {
|
||||
const videoId = host === 'youtu.be' ? url.pathname.slice(1) : url.searchParams.get('v');
|
||||
patternThumbnailUrl = `https://img.youtube.com/vi/${videoId}/sddefault.jpg`;
|
||||
patternThumbnailUrl = `https://img.youtube.com/vi/${videoId}/0.jpg`;
|
||||
} else if (host.includes('streamable.com')) {
|
||||
const videoId = url.pathname.split('/')[1];
|
||||
patternThumbnailUrl = `https://cdn-cf-east.streamable.com/image/${videoId}.jpg`;
|
||||
|
||||
Reference in New Issue
Block a user