Closed Sed9yDataBank closed 1 year ago
You could expose a function from node inside the browser process and then stop the stream on invocation:
page.exposeFunction("buttonSubmit", () => {
stream.destroy()
})
and inside the page you have a button
<button onclick="buttonSubmit()" />
Puppeteer navigates to a certain web page and starts recording it. I want to be able to stop the recording when an external user click on a button on that certain webpage. Is This possible? (I tried setting an Event Listener but it doesn't work)
Currentley in README there is this but it is not what I want / stopping the recording with
setTimeout