mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 04:21:35 +00:00
feat(Parser): Add support for parsing subtitle for Shelf (#792)
This commit is contained in:
@@ -13,6 +13,7 @@ export default class Shelf extends YTNode {
|
||||
icon_type?: string;
|
||||
menu?: YTNode | null;
|
||||
play_all_button?: Button | null;
|
||||
subtitle?: Text;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
@@ -35,5 +36,9 @@ export default class Shelf extends YTNode {
|
||||
if (Reflect.has(data, 'playAllButton')) {
|
||||
this.play_all_button = Parser.parseItem(data.playAllButton, Button);
|
||||
}
|
||||
|
||||
if (Reflect.has(data, 'subtitle')) {
|
||||
this.subtitle = new Text(data.subtitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user