I think by default this line navigator.mediaDevices.getUserMedia({ audio: true }) like fetches microphone audio , I do not actually know how to make it so that speakers audio is fetched , but ya the "issue" in ur code is this line .Hope it helps