feat(Parser): Add ThumbnailOverlayTitleView and PageIndicatorView classes (#1120)

Add two missing parser classes that were being JIT-generated at runtime:

- ThumbnailOverlayTitleView: Displays title/subtitle overlays on thumbnails
- PageIndicatorView: Tracks pagination state in carousels (indicator count and selected index)

These are encountered when parsing Mix/Playlist responses.
This commit is contained in:
Ian Brown
2026-03-16 12:44:35 -07:00
committed by GitHub
parent 5cc278fe6d
commit 2a33fbc85f
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
export default class PageIndicatorView extends YTNode {
static type = 'PageIndicatorView';
public indicator_count: number;
public selected_index: number;
constructor(data: RawNode) {
super();
this.indicator_count = data.indicatorCount ?? 0;
this.selected_index = data.selectedIndex ?? 0;
}
}

View File

@@ -0,0 +1,15 @@
import { YTNode } from '../helpers.js';
import type { RawNode } from '../index.js';
export default class ThumbnailOverlayTitleView extends YTNode {
static type = 'ThumbnailOverlayTitleView';
public title: string;
public subtitle: string;
constructor(data: RawNode) {
super();
this.title = data.title?.content ?? '';
this.subtitle = data.subtitle?.content ?? '';
}
}

View File

@@ -360,6 +360,7 @@ export { default as NotificationAction } from './classes/NotificationAction.js';
export { default as OpenOnePickAddVideoModalCommand } from './classes/OpenOnePickAddVideoModalCommand.js';
export { default as PageHeader } from './classes/PageHeader.js';
export { default as PageHeaderView } from './classes/PageHeaderView.js';
export { default as PageIndicatorView } from './classes/PageIndicatorView.js';
export { default as PageIntroduction } from './classes/PageIntroduction.js';
export { default as PanelFooterView } from './classes/PanelFooterView.js';
export { default as PivotButton } from './classes/PivotButton.js';
@@ -489,6 +490,7 @@ export { default as ThumbnailOverlayProgressBarView } from './classes/ThumbnailO
export { default as ThumbnailOverlayResumePlayback } from './classes/ThumbnailOverlayResumePlayback.js';
export { default as ThumbnailOverlaySidePanel } from './classes/ThumbnailOverlaySidePanel.js';
export { default as ThumbnailOverlayTimeStatus } from './classes/ThumbnailOverlayTimeStatus.js';
export { default as ThumbnailOverlayTitleView } from './classes/ThumbnailOverlayTitleView.js';
export { default as ThumbnailOverlayToggleButton } from './classes/ThumbnailOverlayToggleButton.js';
export { default as ThumbnailView } from './classes/ThumbnailView.js';
export { default as TimedMarkerDecoration } from './classes/TimedMarkerDecoration.js';