Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add event to know when RTCPeerConnection has been created #421

Closed
lopezdonaque opened this issue Jan 24, 2017 · 7 comments
Closed

Add event to know when RTCPeerConnection has been created #421

lopezdonaque opened this issue Jan 24, 2017 · 7 comments

Comments

@lopezdonaque
Copy link

It's necessary to listen events like "iceconnectionstatechange", "addstream", etc. just after created.
The current "peerconnection" event is fired after call to "self.connection.addStream(stream);" so "addstream" event is already fired.

You could move "self.emit('peerconnection', { peerconnection: self.connection });" into "createRTCConnection" method.

@ibc
Copy link
Member

ibc commented Apr 14, 2017

Makes sense. However, my personal preference is moving to a complete SIP-WebRTC decoupled design, as noted in #427.

Anyhow, after the peerconnection event you can check the current pc.iceConnectionState and pc.getRemoteStreams() via the session.connection member (which points to the underlying RTCPeerConnection. In addition you can set your listeners in that moment.

@jmillan
Copy link
Member

jmillan commented Jun 10, 2017

Hi,

@ibc, I would also add the 'peerconnection' event inside 'RTCSession::createRTCConnection', just for code cleanliness. Do you think this would have any side effect on any implementation? I can make the change in a minute.

@ibc
Copy link
Member

ibc commented Jun 11, 2017

It makes sense

@jmillan
Copy link
Member

jmillan commented Aug 21, 2017

Working on es6 branch. Will add this once it's merged.

@omidkh68
Copy link

Working on es6 branch. Will add this once it's merged.

where is es6 branch?
I can't find it.

@ibc
Copy link
Member

ibc commented Apr 11, 2021

Working on es6 branch. Will add this once it's merged.

where is es6 branch?

I can't find it.

It was done 4 years ago and merged into master branch.

@omidkh68
Copy link

Working on es6 branch. Will add this once it's merged.

where is es6 branch?
I can't find it.

It was done 4 years ago and merged into master branch.

🤦🏻‍♂️ 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants