Created
October 28, 2021 15:59
-
-
Save GaetanoPiazzolla/205bccb49ac0cbc7801c53ade24b2ac6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let btn = document.querySelector("#record-button") | |
| btn.addEventListener("click", async function () { | |
| let stream = await navigator.mediaDevices.getDisplayMedia({ | |
| video: true | |
| }) | |
| let mediaRecorder = new MediaRecorder(stream, { | |
| mimeType: "video/webm" | |
| }) | |
| // ... | |
| mediaRecorder.start() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment