/** * Video Manager * * Manages Video Overview generation in NotebookLM notebooks. * Video overviews are AI-generated visual summaries of notebook content, * available through the Studio panel in NotebookLM. * * Selectors derived from live NotebookLM DOM inspection (Feb 2026): * - Studio panel is visible by default (toggle: .toggle-studio-panel-button) * - Tiles are DIVs with role="button" and class="create-artifact-button-container" * - Video tile: aria-label="Video Overview", class includes "green" * - Clicking tile opens a mat-dialog-container with format/style radio groups * - Generate button: mat-dialog-actions button.button-color--primary * - Artifacts appear in .artifact-library-container with .artifact-item-button * - Generating state: .shimmer-blue class + .rotate icon + "Generating" title */ import { StudioManagerBase } from "./studio-manager-base.js"; /** * Visual styles for video overviews (matches actual NotebookLM UI) */ export type VideoStyle = "auto-select" | "custom" | "classic" | "whiteboard" | "kawaii" | "anime" | "watercolour" | "retro-print" | "heritage" | "paper-craft"; /** * Video format/length options */ export type VideoFormat = "explainer" | "brief"; export interface VideoStatus { status: "not_started" | "generating" | "ready" | "failed" | "unknown"; progress?: number; duration?: number; } export interface GenerateVideoResult { success: boolean; status: VideoStatus; error?: string; } export declare class VideoManager extends StudioManagerBase { protected readonly logName = "video-manager"; /** * Ensure the Studio panel is visible (expand if collapsed). * * Live DOM inspection (Feb 2026) confirms: * - Toggle button: .toggle-studio-panel-button * - Tiles container: .create-artifact-button-container (present only when panel is open) * * Locale-agnostic strategy — no aria-label text matching: * 1. Wait for either tiles or toggle button to appear in the DOM (guards timing issues) * 2. If tiles are visible the panel is open — return true immediately * 3. If tiles absent but toggle button found, click it to open — no aria-label check needed */ private ensureStudioPanelOpen; /** * Check video artifact status in the artifact library. * * Video artifacts can appear with different icons depending on state: * - Generating: "sync" icon (rotating), title contains "Generating Video Overview" * - Ready: "subscriptions" icon, title is the generated video name * We match by title text containing "video" to be robust across states. */ private checkVideoStatusInternal; /** * Click the Video Overview tile in the Studio panel */ private clickVideoTile; /** * Wait for the customise dialog to appear */ private waitForDialog; /** * Select a video format in the dialog (Explainer or Brief) */ private selectFormat; /** * Select a video style in the dialog carousel */ private selectStyle; /** * Click the Generate button in the dialog */ private clickDialogGenerate; /** * Generate a video overview for a notebook */ generateVideoOverview(notebookUrl: string, style?: VideoStyle, format?: VideoFormat): Promise; /** * Check the current video status for a notebook */ getVideoStatus(notebookUrl: string): Promise; }