Skip to content

Instantly share code, notes, and snippets.


Murali K G muralikg

View GitHub Profile
muralikg / background.js
Last active Sep 29, 2020
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
View background.js
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {
You can’t perform that action at this time.