SamuelScheit / puppeteer-stream

A Library for puppeteer to retrieve audio and/or video streams
MIT License
333 stars 105 forks source link

No audio stream #87

Closed eldhoz515 closed 1 year ago

eldhoz515 commented 1 year ago

Only video is getting recorded, no audio.

const { launch, getStream } = require("puppeteer-stream"); const fs = require("fs");

const file = fs.createWriteStream("test.webm");

async function test() { const browser = await launch({ defaultViewport: { width: 1920, height: 1080, }, executablePath: "C:/Program Files/Google/Chrome/Application/chrome.exe" });

const page = await browser.newPage();
await page.goto("https://localhost:5115");
const stream = await getStream(page, { audio: true, video: true});
console.log("recording");

stream.pipe(file);
setTimeout(async () => {
    await stream.destroy();
    file.close();
    browser.close();
    console.log("finished");
}, 1000 * 5);

}

test();

eldhoz515 commented 1 year ago

vs code player fooled me, audio was there... :(

shozabnadeem1 commented 1 year ago

@eldhoz515 us moment bro