-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(LockupView): Add overlay nodes used by
VIDEO
views
- Loading branch information
Showing
6 changed files
with
63 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { ObservedArray } from '../helpers.js'; | ||
import { YTNode } from '../helpers.js'; | ||
import { Parser, type RawNode } from '../index.js'; | ||
import ThumbnailBadgeView from './ThumbnailBadgeView.js'; | ||
import ThumbnailOverlayProgressBarView from './ThumbnailOverlayProgressBarView.js'; | ||
|
||
export default class ThumbnailBottomOverlayView extends YTNode { | ||
static type = 'ThumbnailBottomOverlayView'; | ||
|
||
public progress_bar: ThumbnailOverlayProgressBarView | null; | ||
public badges: ObservedArray<ThumbnailBadgeView>; | ||
|
||
constructor(data: RawNode) { | ||
super(); | ||
this.progress_bar = Parser.parseItem(data.progressBar, ThumbnailOverlayProgressBarView); | ||
this.badges = Parser.parseArray(data.badges, ThumbnailBadgeView); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/parser/classes/ThumbnailHoverOverlayToggleActionsView.ts
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,15 @@ | ||
import type { ObservedArray } from '../helpers.js'; | ||
import { YTNode } from '../helpers.js'; | ||
import { Parser, type RawNode } from '../index.js'; | ||
import ToggleButtonView from './ToggleButtonView.js'; | ||
|
||
export default class ThumbnailHoverOverlayToggleActionsView extends YTNode { | ||
static type = 'ThumbnailHoverOverlayToggleActionsView'; | ||
|
||
public buttons: ObservedArray<ToggleButtonView>; | ||
|
||
constructor(data: RawNode) { | ||
super(); | ||
this.buttons = Parser.parseArray(data.buttons, ToggleButtonView); | ||
} | ||
} |
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,13 @@ | ||
import { YTNode } from '../helpers.js'; | ||
import { type RawNode } from '../index.js'; | ||
|
||
export default class ThumbnailOverlayProgressBarView extends YTNode { | ||
static type = 'ThumbnailOverlayProgressBarView'; | ||
|
||
public start_percent: number; | ||
|
||
constructor(data: RawNode) { | ||
super(); | ||
this.start_percent = data.startPercent; | ||
} | ||
} |
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