Skip to content

Commit

Permalink
feat(parser): Add ShowMiniplayerCommand (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT authored Jul 16, 2023
1 parent b50d1ef commit a9cdbf7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/parser/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ export default class Parser {
return observe(actions.map((action: any) => {
if (action.navigateAction)
return new NavigateAction(action.navigateAction);
if (action.showMiniplayerCommand)
return new ShowMiniplayerCommand(action.showMiniplayerCommand);
if (action.reloadContinuationItemsCommand)
return new ReloadContinuationItemsCommand(action.reloadContinuationItemsCommand);
if (action.appendContinuationItemsAction)
Expand Down Expand Up @@ -574,6 +576,19 @@ export class NavigateAction extends YTNode {
}
}

export class ShowMiniplayerCommand extends YTNode {
static readonly type = 'showMiniplayerCommand';

miniplayer_command: NavigationEndpoint;
show_premium_branding: boolean;

constructor(data: RawNode) {
super();
this.miniplayer_command = new NavigationEndpoint(data.miniplayerCommand);
this.show_premium_branding = data.showPremiumBranding;
}
}

export class AppendContinuationItemsAction extends YTNode {
static readonly type = 'appendContinuationItemsAction';

Expand Down

0 comments on commit a9cdbf7

Please sign in to comment.