mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-24 23:32:32 +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;
|
||||
}
|
||||
}
|
||||
@@ -252,11 +252,13 @@ export { default as PageHeaderView } from './classes/PageHeaderView.js';
|
||||
export { default as PageIntroduction } from './classes/PageIntroduction.js';
|
||||
export { default as PlayerAnnotationsExpanded } from './classes/PlayerAnnotationsExpanded.js';
|
||||
export { default as PlayerCaptionsTracklist } from './classes/PlayerCaptionsTracklist.js';
|
||||
export { default as PlayerControlsOverlay } from './classes/PlayerControlsOverlay.js';
|
||||
export { default as PlayerErrorMessage } from './classes/PlayerErrorMessage.js';
|
||||
export { default as PlayerLegacyDesktopYpcOffer } from './classes/PlayerLegacyDesktopYpcOffer.js';
|
||||
export { default as PlayerLegacyDesktopYpcTrailer } from './classes/PlayerLegacyDesktopYpcTrailer.js';
|
||||
export { default as PlayerLiveStoryboardSpec } from './classes/PlayerLiveStoryboardSpec.js';
|
||||
export { default as PlayerMicroformat } from './classes/PlayerMicroformat.js';
|
||||
export { default as PlayerOverflow } from './classes/PlayerOverflow.js';
|
||||
export { default as PlayerOverlay } from './classes/PlayerOverlay.js';
|
||||
export { default as PlayerOverlayAutoplay } from './classes/PlayerOverlayAutoplay.js';
|
||||
export { default as PlayerStoryboardSpec } from './classes/PlayerStoryboardSpec.js';
|
||||
|
||||
Reference in New Issue
Block a user