-
-
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(parser): Add
VideoAttributesSectionView
node (#732)
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Parser, type RawNode } from '../index.js'; | ||
import { YTNode, type ObservedArray } from '../helpers.js'; | ||
|
||
import ButtonView from './ButtonView.js'; | ||
import VideoAttributeView from './VideoAttributeView.js'; | ||
|
||
export default class VideoAttributesSectionView extends YTNode { | ||
static type = 'VideoAttributesSectionView'; | ||
|
||
header_title: string; | ||
header_subtitle: string; | ||
video_attributes: ObservedArray<VideoAttributeView>; | ||
previous_button: ButtonView | null; | ||
next_button: ButtonView | null; | ||
|
||
constructor(data: RawNode) { | ||
super(); | ||
this.header_title = data.headerTitle; | ||
this.header_subtitle = data.headerSubtitle; | ||
this.video_attributes = Parser.parseArray(data.videoAttributeViewModels, VideoAttributeView); | ||
this.previous_button = Parser.parseItem(data.previousButton, ButtonView); | ||
this.next_button = Parser.parseItem(data.nextButton, ButtonView); | ||
} | ||
} |
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