diff --git a/widget/controllers/widget.feed.controller.js b/widget/controllers/widget.feed.controller.js index 4034002..6bf104f 100644 --- a/widget/controllers/widget.feed.controller.js +++ b/widget/controllers/widget.feed.controller.js @@ -513,14 +513,23 @@ }, 300); }); - WidgetFeed.getThumbnail = function(video) { - var isTablet = $rootScope.deviceWidth >= 768; - if (isTablet) { - return video.snippet.thumbnails.maxres.url; - } else { - return video.snippet.thumbnails.medium.url; - } - }; + WidgetFeed.getThumbnail = function(video) { + var isTablet = $rootScope.deviceWidth >= 768; + const layoutName = WidgetFeed.data.design.itemListLayout; + const thumbnails = video.snippet.thumbnails; + const maxres = thumbnails.maxres ? thumbnails.maxres.url : null; + const standard = thumbnails.standard ? thumbnails.standard.url : null; + const high = thumbnails.high ? thumbnails.high.url : null; + const medium = thumbnails.medium ? thumbnails.medium.url : null; + + if (isTablet) { + return maxres || standard || high || medium; + } + if (layoutName === "List_Layout_3") { + return standard || high || medium; + } + return medium; +}; WidgetFeed.bookmark = function($event, video) { $event.stopImmediatePropagation();