1const stream = await navigator. mediaDevices. getDisplayMedia({ video: { mediaSource: "screen" } });
2const recorder = new MediaRecorder(stream); const chunks = []; recorder. ondataavailable = e => chunks. push(e. ...
3recorder. onstop = e => { const completeBlob = new Blob(chunks, { type: chunks[0]. type }); video.