question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AddStream to the peers in the on('Connect') event ?

See original GitHub issue

@nazar-pc Hello, i want to connect the two peers as well without adding the stream attribute when i defined them. i make sure the connexion has been established in the on('connect') event. at that moment i want to add the stream with the navigator.getUserMedia as you mentioned in the documentation and let the peers share the video. but that doesn’t work !!

is that possible?

what if just one of the two peers want to add a stream somewhere and not both ? i mean one of them already defined the peer with stream attribute and the other doesn’t.

is that possible?

Thank you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
nazar-pccommented, Jul 13, 2020

It is possible, I’ve done that successfully numerous times. Hijacking data channel is unlikely because it is encrypted.

1reaction
nazar-pccommented, May 3, 2020

the signaling data appears more than one time

This always happen if trickle: true and is expected. Moreover, that is also happening when you add/remove streams/tracks in runtime as that triggers renegotiation. Which is why I said your signaling should work all the time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RTCPeerConnection.addStream() - Web APIs - MDN Web Docs
A MediaStream object indicating the stream to add to the WebRTC peer connection. Return value. None. Example. This simple example adds the audio ......
Read more >
webrtc - Can I call peerconnection->addStream(stream) in ...
I try to make peer to peer connection between ...
Read more >
RTCPeerConnection.addStream() - Web APIs
A MediaStream object indicating the stream to add to the WebRTC peer connection. Return value. None. Example. This simple example adds the audio...
Read more >
AddStream on remote peer connection to stream an audio file
The file loads into the buffer fine, I tested this by attaching a MediaRecorder and monitoring its ondataavailable() event, data is definitely going...
Read more >
Peer Connection fires negotiationneeded event on adding ...
log(e,"224")); // } // }; const desc = new RTCSessionDescription(offer.sdp); peer?.setRemoteDescription(desc).then(() => { peer.addStream( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found