The problem is that I have success connection when I'm making call but there is no audio, I can't here anything. Here is my code:
Function to call:
private makeCall() {
let self = this;
var options = {
'constraints': {
'mandatory': {
'OfferToReceiveAudio': true,
'OfferToReceiveVideo': true
}
}
}
navigator.getUserMedia({audio: true, video: true}, function(stream){
var call = self.peer.call(self.idToConnect, stream, options);
call.on('stream', function(stream) {
console.log('STREAM');
console.log(stream);
})
},
err => console.log(err));
}This is how I answer the call:
this.peer.on('call', function(call) {
navigator.getUserMedia({
audio: true,
video: true
}, function(stream) {
call.answer(stream);
call.on('stream', function(stream) {
console.log('RESPONED CALL');
console.log(stream)
});
}, function(error) {
//...
});
});Have I missed something?