forked from SamuelScheit/puppeteer-stream
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not patch puppeteer but, export functions
- Loading branch information
1 parent
9777246
commit f26fe83
Showing
13 changed files
with
322 additions
and
98 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,25 @@ | ||
/// <reference types="node" /> | ||
import { Page } from "puppeteer/lib/cjs/puppeteer/common/Page"; | ||
import { Readable, ReadableOptions } from "stream"; | ||
export declare class Stream extends Readable { | ||
private page; | ||
constructor(page: Page, options?: ReadableOptions); | ||
_read(): void; | ||
destroy(): Promise<void>; | ||
} | ||
declare module "puppeteer" { | ||
interface Page { | ||
index: number; | ||
getStream(opts: getStreamOptions): Promise<Stream>; | ||
} | ||
} | ||
export declare type BrowserMimeType = "audio/webm" | "audio/webm;codecs=opus" | "audio/opus" | "audio/aac" | "audio/ogg" | "audio/mp3" | "audio/pcm" | "audio/wav" | "audio/vorbis" | "video/webm" | "video/mp4" | "image/gif"; | ||
export interface getStreamOptions { | ||
audio: boolean; | ||
video: boolean; | ||
mimeType?: BrowserMimeType; | ||
audioBitsPerSecond?: number; | ||
videoBitsPerSecond?: number; | ||
bitsPerSecond?: number; | ||
frameSize?: number; | ||
} |
Oops, something went wrong.