Hi @awsss,
You can do it editing youtube-api-interface.php, replacing each occurence of:
$newResult['thumb_url'] = $searchResult['snippet']['thumbnails']['high']['url'];
by:
$newResult['thumb_url'] = $searchResult['snippet']['thumbnails']['maxres']['url'];
But note that Youtube API v3 reference describes maxres format as “available for some videos”. What I understand here is that this resolution isn’t available for all videos, that’s why I set it to high.
Thread Starter
awsss
(@awsss)
Hi Thanks for answering, I’ve tried same to edit and the result is null in media_url post field
$newResult['thumb_url'] = $searchResult['snippet']['thumbnails']['maxres']['url'];
when the thumbnail is maxres then nothing coming only works when its default or high then it’s max 640 whatever if video HD or not so when video in HD the maxres can import 1200 and more.
Hi @awsss,
again, maxres doesn’t seem to be available for all videos. That’s why it’s returning as null sometimes.
You can simply perform a check: if $searchResult['snippet']['thumbnails']['maxres']['url'];is null, then pick $searchResult['snippet']['thumbnails']['high']['url'];.
However, that’s not an issue related to the plugin, but it’s mostly related to the Youtube API v3.