peers / peerjs

Simple peer-to-peer with WebRTC.
https://peerjs.com
MIT License
12.45k stars 1.43k forks source link

call options not working #679

Open skozgursk opened 4 years ago

skozgursk commented 4 years ago

I am trying to make peer connection between audio and video streaming users and trying to do it like this.

let op = {
            'constraints': {
                'mandatory': {
                    'OfferToReceiveAudio': true,
                    'OfferToReceiveVideo': true
                }
            }
        };

let call = peer.call(payload, context.getters.stream, op);

call.on('stream', function(remoteStream) {
           //v is my video dom
            v.srcObject = remoteStream;
            v.play();
        });

but it seems like not working.

I am using default heroku server if it is important.

Should I do something more.

charmi2011 commented 4 years ago

Same here,

For solving the issue : If I tried to call some peer with the only audio stream, I cannot receive the video from that peer.

I tried setting options while calling peer

'OfferToReceiveAudio': true,
'OfferToReceiveVideo': true

But options doesn't seem to work. Is there any other way to fix this?