-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add `VideoAttributeView` * fix: remove `logging_directives` See #531 (comment) * fix: Update src/parser/classes/VideoAttributeView.ts --------- Co-authored-by: absidue <[email protected]> Co-authored-by: Luan <[email protected]>
- Loading branch information
1 parent
9007b65
commit ff4ab16
Showing
4 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { YTNode } from '../helpers.js'; | ||
import NavigationEndpoint from './NavigationEndpoint.js'; | ||
|
||
import ContentPreviewImageView from './ContentPreviewImageView.js'; | ||
import { Parser } from '../index.js'; | ||
|
||
import type { RawNode } from '../types/index.js'; | ||
|
||
export default class VideoAttributeView extends YTNode { | ||
static type = 'VideoAttributeView'; | ||
|
||
image: ContentPreviewImageView | null; | ||
image_style: string; | ||
title: string; | ||
subtitle: string; | ||
secondary_subtitle: { | ||
content: string | ||
}; | ||
orientation: string; | ||
sizing_rule: string; | ||
overflow_menu_on_tap: { | ||
innertube_command: NavigationEndpoint | ||
}; | ||
overflow_menu_a11y_label: string; | ||
|
||
constructor(data: RawNode) { | ||
super(); | ||
this.image = Parser.parseItem(data.image, ContentPreviewImageView); | ||
this.image_style = data.imageStyle; | ||
this.title = data.title; | ||
this.subtitle = data.subtitle; | ||
this.secondary_subtitle = { | ||
content: data.secondarySubtitle.content | ||
}; | ||
this.orientation = data.orientation; | ||
this.sizing_rule = data.sizingRule; | ||
this.overflow_menu_on_tap = { | ||
innertube_command: new NavigationEndpoint(data.overflowMenuOnTap.innertubeCommand) | ||
}; | ||
this.overflow_menu_a11y_label = data.overflowMenuA11yLabel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters