mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-24 07:11:48 +00:00
feat(parser): Add PlayerOverflow and PlayerControlsOverlay
This commit is contained in:
14
src/parser/classes/PlayerControlsOverlay.ts
Normal file
14
src/parser/classes/PlayerControlsOverlay.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { YTNode } from '../helpers.js';
|
||||
import { Parser, type RawNode } from '../index.js';
|
||||
import PlayerOverflow from './PlayerOverflow.js';
|
||||
|
||||
export default class PlayerControlsOverlay extends YTNode {
|
||||
static type = 'PlayerControlsOverlay';
|
||||
|
||||
overflow: PlayerOverflow | null;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.overflow = Parser.parseItem(data.overflow, PlayerOverflow);
|
||||
}
|
||||
}
|
||||
16
src/parser/classes/PlayerOverflow.ts
Normal file
16
src/parser/classes/PlayerOverflow.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { YTNode } from '../helpers.js';
|
||||
import type { RawNode } from '../index.js';
|
||||
import NavigationEndpoint from './NavigationEndpoint.js';
|
||||
|
||||
export default class PlayerOverflow extends YTNode {
|
||||
static type = 'PlayerOverflow';
|
||||
|
||||
endpoint: NavigationEndpoint;
|
||||
enable_listen_first: boolean;
|
||||
|
||||
constructor(data: RawNode) {
|
||||
super();
|
||||
this.endpoint = new NavigationEndpoint(data.endpoint);
|
||||
this.enable_listen_first = data.enableListenFirst;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user