File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 513513 } , 300 ) ;
514514 } ) ;
515515
516- WidgetFeed . getThumbnail = function ( video ) {
517- var isTablet = $rootScope . deviceWidth >= 768 ;
518- if ( isTablet ) {
519- return video . snippet . thumbnails . maxres . url ;
520- } else {
521- return video . snippet . thumbnails . medium . url ;
522- }
523- } ;
516+ WidgetFeed . getThumbnail = function ( video ) {
517+ var isTablet = $rootScope . deviceWidth >= 768 ;
518+ const layoutName = WidgetFeed . data . design . itemListLayout ;
519+ const thumbnails = video . snippet . thumbnails ;
520+ const maxres = thumbnails . maxres ? thumbnails . maxres . url : null ;
521+ const standard = thumbnails . standard ? thumbnails . standard . url : null ;
522+ const high = thumbnails . high ? thumbnails . high . url : null ;
523+ const medium = thumbnails . medium ? thumbnails . medium . url : null ;
524+
525+ if ( isTablet ) {
526+ return maxres || standard || high || medium ;
527+ }
528+ if ( layoutName === "List_Layout_3" ) {
529+ return standard || high || medium ;
530+ }
531+ return medium ;
532+ } ;
524533
525534 WidgetFeed . bookmark = function ( $event , video ) {
526535 $event . stopImmediatePropagation ( ) ;
You can’t perform that action at this time.
0 commit comments