Closed pjebs closed 2 years ago
It works now:
p.on('stream', stream => {
var audio = document.querySelector('audio')
if ('srcObject' in audio) {
audio.srcObject = stream
} else {
audio.src = window.URL.createObjectURL(stream)
}
audio.play()
})
...
<audio controls>
</audio>
It appears and audio only connection doesn't transit audio.:
navigator.mediaDevices.getUserMedia({audio: true, video: false}).then(gotMedia).catch((err) => {console.log(err)});
The moment I make
video: true
and then add:Audio and Video then work.