Sources:https://upload.wikimedia.org/wikipedia/commons/f/f4/Microphone_%2889660%29_-_The_Noun_Project.svg
https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Build_a_phone_with_peerjs/Connect_peers/Get_microphone_permission
https://stackoverflow.com/questions/69738724/is-window-localaudio-a-thing
So add the missing <audio id="localAudio"> element. or change window.localAudio to the id of your audio element or change it to use document.querySelector or document.getElementById. The description text below the code in the tutorial explains what it is. The answer is copying info from the dupe and copying text from the tutorial. –
~ epascarello - Oct 27, 2021 at 12:54