Created
March 13, 2021 20:06
-
-
Save Mosquid/a3eab50d3018c6ee6042632cb9364ff3 to your computer and use it in GitHub Desktop.
demorse-user-media.js
This file contains 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
const initDecoder = (stream) => { | |
const decoder = new Demorse({ | |
stream, | |
render: (str) => { | |
document.querySelector("#message").innerText = str; | |
}, | |
}); | |
}; | |
navigator.getUserMedia({ audio: true }, initDecoder, console.error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment