mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-17 03:22:15 +00:00
Things were getting a bit complicated and slow with the old parser so I decided to continue #44's work on the main codebase.
19 lines
381 B
JavaScript
19 lines
381 B
JavaScript
'use strict';
|
|
|
|
const Thumbnail = require('./Thumbnail');
|
|
|
|
class MovingThumbnail {
|
|
type = 'movingThumbnailRenderer';
|
|
|
|
#data;
|
|
|
|
constructor(data) {
|
|
this.#data = data;
|
|
}
|
|
|
|
get thumbnails() {
|
|
return this.#data.movingThumbnailDetails.thumbnails.map((thumbnail) => new Thumbnail(thumbnail)).sort((a, b) => b.width - a.width);
|
|
}
|
|
}
|
|
|
|
module.exports = MovingThumbnail; |