The "options" in "peer.call(id, stream, options) " should be documented.
See original GitHub issueI saw the #126 before, but i think there is something meaningful in the peerconnection’s options. Because some problem confuses me when i tried to call the other peer with the audio only, i cannot received the video from that peer. After I search the google, I found that this situation happened because I don’t set the OfferToReceiveVideo to true, in webrtc constraints, it means if a caller only has the audio stream, the OfferToReceiveVideo is setting to false, even if the the callee answer a video stream, we won’t received it.
As soon as I set it like this:
var options = {
'constraints': {
'mandatory': {
'OfferToReceiveAudio': true,
'OfferToReceiveVideo': true
}
}
}
var call = peer.call(otherPeer, callStream, options);
It finally works.
So I suggest that maybe we could document it in the Docs, or just set it as the default in the source code.
Issue Analytics
- State:
- Created 10 years ago
- Reactions:5
- Comments:11 (2 by maintainers)
Top Results From Across the Web
PeerJS Documentation
PeerJS docs. PeerJS simplifies peer-to-peer data, video, and audio calls. This guide will show you the basic concepts of the PeerJS API.
Read more >How do I set metadata in the PeerJs peer.call(id, stream ...
for calling a remote peer + attaching some metadata to the call: options = {metadata: {"type":"screensharing"}}; peer.call(remotePeerId, ...
Read more >Answering a Call - Web APIs | MDN
Click call, submit the peer ID for the other browser and then answer the call. The final page should look like this: Two...
Read more >JavaScript SDK | API Reference - SkyWay
The Peer class is a entry point for P2P connection and room connection. In order to use ECLWebRTC, Peer instance is necessary. #...
Read more >Getting started with PeerJS - LogRocket Blog
Above, we've created an instance using the default settings. ... const call = peer.call("other-peer-id", stream); call.on("stream", ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You shoud name your object like “constraints” and then: var call = peer.call(otherPeer, callStream, constraints);
@afrokick Do you have an example of using
RTCRtpTransceiverfor this? I’m confused as to how it would be implemented with Peer.JS. I’m having a fairly common issue – Users with video disabled should still be able to participate – but when I connect that media stream, the users who only have audio can also only recieve audio.