mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-16 19:12:24 +00:00
20 lines
486 B
JavaScript
20 lines
486 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; |