Files
YouTube.js/src/parser/classes/SlimVideoMetadata.ts
LuanRT 2bbefefbb7 feat: add support for YouTube Kids (#291)
* dev: add `WEB_KIDS` innertube client

* refactor: move DASH manifest stuff out of `VideoInfo`
This makes it easier to use these functions elsewhere.

* feat(ytkids): add `Kids#getInfo()` & `Kids#search()`

* feat: add `Innertube#kids.getHomeFeed()`

* docs: add YouTube Kids API ref

* docs: fix typo

* docs: fix yet another typo

* docs: update YouTube Music API ref
Unrelated but required to reflect changes made to the DASH manifest generation functions

* chore: lint

* chore: add tests

* feat: include `captions` in `VideoInfo`

* chore: fix tests
2023-01-23 03:39:51 -03:00

28 lines
732 B
TypeScript

import Parser from '..';
import Text from './misc/Text';
import { YTNode } from '../helpers';
class SlimVideoMetadata extends YTNode {
static type = 'SlimVideoMetadata';
title: Text;
collapsed_subtitle: Text;
expanded_subtitle: Text;
owner: any;
description: Text;
video_id: string;
date: Text;
constructor(data: any) {
super();
this.title = new Text(data.title);
this.collapsed_subtitle = new Text(data.collapsedSubtitle);
this.expanded_subtitle = new Text(data.expandedSubtitle);
this.owner = Parser.parseItem(data.owner);
this.description = new Text(data.description);
this.video_id = data.videoId;
this.date = new Text(data.dateText);
}
}
export default SlimVideoMetadata;