puppeteer-stream
Advanced tools
Comparing version 2.1.2 to 2.1.3
/// <reference types="node" /> | ||
import { LaunchOptions, Browser, Page, BrowserLaunchArgumentOptions, BrowserConnectOptions } from "puppeteer-core"; | ||
import { Readable, ReadableOptions } from "stream"; | ||
type PageWithExtension = Omit<Page, "browser"> & { | ||
browser(): BrowserWithExtension; | ||
}; | ||
export declare class Stream extends Readable { | ||
private page; | ||
constructor(page: Page, options?: ReadableOptions); | ||
constructor(page: PageWithExtension, options?: ReadableOptions); | ||
_read(): void; | ||
destroy(): Promise<void>; | ||
destroy(): Promise<this>; | ||
} | ||
@@ -16,4 +19,8 @@ declare module "puppeteer-core" { | ||
} | ||
type BrowserWithExtension = Browser & { | ||
encoders?: Map<number, Stream>; | ||
videoCaptureExtension?: Page; | ||
}; | ||
export declare function launch(arg1: (LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions) | any, opts?: LaunchOptions & BrowserLaunchArgumentOptions & BrowserConnectOptions): Promise<Browser>; | ||
export declare type BrowserMimeType = "video/webm" | "video/webm;codecs=vp8" | "video/webm;codecs=vp9" | "video/webm;codecs=vp8.0" | "video/webm;codecs=vp9.0" | "video/webm;codecs=vp8,opus" | "video/webm;codecs=vp8,pcm" | "video/WEBM;codecs=VP8,OPUS" | "video/webm;codecs=vp9,opus" | "video/webm;codecs=vp8,vp9,opus" | "audio/webm" | "audio/webm;codecs=opus" | "audio/webm;codecs=pcm"; | ||
export type BrowserMimeType = "video/webm" | "video/webm;codecs=vp8" | "video/webm;codecs=vp9" | "video/webm;codecs=vp8.0" | "video/webm;codecs=vp9.0" | "video/webm;codecs=vp8,opus" | "video/webm;codecs=vp8,pcm" | "video/WEBM;codecs=VP8,OPUS" | "video/webm;codecs=vp9,opus" | "video/webm;codecs=vp8,vp9,opus" | "audio/webm" | "audio/webm;codecs=opus" | "audio/webm;codecs=pcm"; | ||
export interface getStreamOptions { | ||
@@ -28,2 +35,3 @@ audio: boolean; | ||
} | ||
export declare function getStream(page: Page, opts: getStreamOptions): Promise<Stream>; | ||
export declare function getStream(page: PageWithExtension, opts: getStreamOptions): Promise<Stream>; | ||
export {}; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +34,8 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getStream = exports.launch = exports.Stream = void 0; | ||
const puppeteer_core_1 = __importDefault(require("puppeteer-core")); | ||
const puppeteer_core_1 = require("puppeteer-core"); | ||
const stream_1 = require("stream"); | ||
const path_1 = __importDefault(require("path")); | ||
const path = __importStar(require("path")); | ||
let currentIndex = 0; | ||
class Stream extends stream_1.Readable { | ||
@@ -31,11 +52,10 @@ constructor(page, options) { | ||
}); | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
_super.destroy.call(this); | ||
// @ts-ignore | ||
yield this.page.browser().videoCaptureExtension.evaluate((index) => { | ||
yield ((_a = this.page.browser().videoCaptureExtension) === null || _a === void 0 ? void 0 : _a.evaluate((index) => { | ||
// @ts-ignore | ||
STOP_RECORDING(index); | ||
}, | ||
// @ts-ignore | ||
this.page._id); | ||
}, this.page.index)); | ||
_super.destroy.call(this); | ||
return this; | ||
}); | ||
@@ -56,3 +76,3 @@ } | ||
opts.args = []; | ||
const extensionPath = path_1.default.join(__dirname, "..", "extension"); | ||
const extensionPath = path.join(__dirname, "..", "extension"); | ||
const extensionId = "jjndjgheafjngoipoacpjgeicjeomjli"; | ||
@@ -91,5 +111,4 @@ let loadExtension = false; | ||
else { | ||
browser = yield puppeteer_core_1.default.launch(opts); | ||
browser = yield (0, puppeteer_core_1.launch)(opts); | ||
} | ||
// @ts-ignore | ||
browser.encoders = new Map(); | ||
@@ -100,10 +119,18 @@ const extensionTarget = yield browser.waitForTarget( | ||
target.url() === `chrome-extension://${extensionId}/_generated_background_page.html`); | ||
// @ts-ignore | ||
browser.videoCaptureExtension = yield extensionTarget.page(); | ||
// @ts-ignore | ||
if (!extensionTarget) { | ||
throw new Error("cannot load extension"); | ||
} | ||
const videoCaptureExtension = yield extensionTarget.page(); | ||
if (!videoCaptureExtension) { | ||
throw new Error("cannot get page of extension"); | ||
} | ||
browser.videoCaptureExtension = videoCaptureExtension; | ||
yield browser.videoCaptureExtension.exposeFunction("sendData", (opts) => { | ||
var _a, _b; | ||
const data = Buffer.from(str2ab(opts.data)); | ||
// @ts-ignore | ||
browser.encoders.get(opts.id).push(data); | ||
(_b = (_a = browser.encoders) === null || _a === void 0 ? void 0 : _a.get(opts.id)) === null || _b === void 0 ? void 0 : _b.push(data); | ||
}); | ||
yield browser.videoCaptureExtension.exposeFunction("log", (...opts) => { | ||
console.log("videoCaptureExtension", ...opts); | ||
}); | ||
return browser; | ||
@@ -114,2 +141,3 @@ }); | ||
function getStream(page, opts) { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -128,9 +156,10 @@ const encoder = new Stream(page); | ||
yield page.bringToFront(); | ||
// @ts-ignore | ||
yield page.browser().videoCaptureExtension.evaluate((settings) => { | ||
if (page.index === undefined) { | ||
page.index = currentIndex++; | ||
} | ||
yield ((_a = page.browser().videoCaptureExtension) === null || _a === void 0 ? void 0 : _a.evaluate((settings) => { | ||
// @ts-ignore | ||
START_RECORDING(settings); | ||
}, Object.assign(Object.assign({}, opts), { index: page._id })); | ||
// @ts-ignore | ||
page.browser().encoders.set(page._id, encoder); | ||
}, Object.assign(Object.assign({}, opts), { index: page.index }))); | ||
(_b = page.browser().encoders) === null || _b === void 0 ? void 0 : _b.set(page.index, encoder); | ||
return encoder; | ||
@@ -149,2 +178,2 @@ }); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHVwcGV0ZWVyU3RyZWFtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1B1cHBldGVlclN0cmVhbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQSxvRUFNd0I7QUFDeEIsbUNBQW1EO0FBQ25ELGdEQUF3QjtBQUV4QixNQUFhLE1BQU8sU0FBUSxpQkFBUTtJQUNuQyxZQUFvQixJQUFVLEVBQUUsT0FBeUI7UUFDeEQsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBREksU0FBSSxHQUFKLElBQUksQ0FBTTtJQUU5QixDQUFDO0lBRUQsS0FBSyxLQUFJLENBQUM7SUFFVixhQUFhO0lBQ1AsT0FBTzs7Ozs7WUFDWixPQUFNLE9BQU8sWUFBRztZQUNoQixhQUFhO1lBQ2IsTUFBTSxJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDLHFCQUFxQixDQUFDLFFBQVEsQ0FDdkQs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MsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsdUJBQXVCO0lBQzlELElBQUksT0FBTyxHQUFHLElBQUksVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBRWxDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLE1BQU0sR0FBRyxHQUFHLENBQUMsTUFBTSxFQUFFLENBQUMsR0FBRyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUU7UUFDckQsT0FBTyxDQUFDLENBQUMsQ0FBQyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUM7S0FDL0I7SUFDRCxPQUFPLEdBQUcsQ0FBQztBQUNaLENBQUMifQ== |
@@ -30,3 +30,3 @@ // @ts-nocheck | ||
recorder = new MediaRecorder(stream, { | ||
const recorder = new MediaRecorder(stream, { | ||
ignoreMutedMedia: true, | ||
@@ -33,0 +33,0 @@ audioBitsPerSecond, |
{ | ||
"name": "puppeteer-stream", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/PuppeteerStream.js", |
@@ -46,2 +46,10 @@ # puppeteer-stream | ||
frameSize?: number = 20; // The number of milliseconds to record into each packet. | ||
videoConstraints: { | ||
mandatory: { | ||
minWidth?: number, | ||
minHeight?:number, | ||
maxWidth?:number, | ||
maxHeight?:number, | ||
}, | ||
}, | ||
} | ||
@@ -48,0 +56,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27583
361
100