otalk / rtcpeerconnection-shim

Implementation of the RTCPeerConnection API ontop of ORTC
BSD 3-Clause "New" or "Revised" License
15 stars 14 forks source link

Event target is set to DocumentFragment instead of peer connection itself #182

Open lyubovzvereva opened 5 years ago

lyubovzvereva commented 5 years ago

We started to use adapter in our calls and faced an issue with Edge where we would get a DocumentFragment as a target for onNegotiationNeeded event. After digging into adapter's logic we discovered that rtcpeerconnection-shim does this explicitly https://github.com/otalk/rtcpeerconnection-shim/blob/master/rtcpeerconnection.js#L41. We were wondering if there are reasons for such a thing? P.S. we use peer connection from event to check the current state (signalingState, iceConnectionState) and then create an offer. Thanks!

fippo commented 5 years ago

the reason was probably "this mimicks chrome behaviour" back in ... 2015. Do you have a jsfiddle or code snippet showing the difference in behaviour?