mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 20:12:12 +00:00
feat(Thumbnail): Support sources in Thumbnail.fromResponse (#552)
This commit is contained in:
@@ -10,7 +10,7 @@ export default class ContentPreviewImageView extends YTNode {
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.image = data.image.sources.map((x: any) => new Thumbnail(x)).sort((a: Thumbnail, b: Thumbnail) => b.width - a.width);
|
||||
this.image = Thumbnail.fromResponse(data.image);
|
||||
this.style = data.style;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user