When using screen sharing by Google Chrome, this software will still be captured.

Here’s the reproduction code.


async function startCapture() {

let mediaRecorder;

let recordedChunks = [];

try {

const stream = await navigator.mediaDevices.getDisplayMedia({

video: { cursor: "always" },

audio: true

});

mediaRecorder = new MediaRecorder(stream, {

mimeType: 'video/webm'

});

mediaRecorder.ondataavailable = (event) => {

if (event.data.size > 0) {

recordedChunks.push(event.data);

}

};

mediaRecorder.onstop = () => {

const blob = new Blob(recordedChunks, { type: 'video/webm' });

const url = URL.createObjectURL(blob);

const a = document.createElement('a');

a.href = url;

a.download = recording-${Date.now()}.webm;

a.click();

URL.revokeObjectURL(url);

stream.getTracks().forEach(track => track.stop());

};

mediaRecorder.start();

console.log("recording started...");

} catch (err) {

console.error("Error: " + err);

}

}

startCapture();

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
🚨

Bug Report

Date

21 days ago

Subscribe to post

Get notified by email when there are changes.