Files
YouTube.js/lib/parser/contents/classes/WatchCardCompactVideo.js
2022-06-15 16:49:25 -03:00

20 lines
491 B
JavaScript

'use strict';
const Text = require('./Text');
const { timeToSeconds } = require('../../../utils/Utils');
class WatchCardCompactVideo {
type = 'WatchCardCompactVideo';
constructor(data) {
this.title = new Text(data.title);
this.subtitle = new Text(data.subtitle);
this.duration = {
text: new Text(data.lengthText).toString(),
seconds: timeToSeconds(data.lengthText.simpleText)
}
this.style = data.style;
}
}
module.exports = WatchCardCompactVideo;