meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

janus.js: "connectionState" callback added #3343

Closed RSATom closed 7 months ago

RSATom commented 8 months ago

it can be useful since latest Chrome versions doesn't assign failed state to ICE connection state.

lminiero commented 8 months ago

Just an editorial note: maybe pcState would be a shorter and "better" name? We already shorten PeerConnection to pc in other places (e.g., pcStuff), and the other state related callbacks have a short name too. Or maybe let's just call it connectionState, since that's what the actual callback is?

RSATom commented 8 months ago

I've thought about using connectionState but worried it can be confusing for users since they can think it's related to http/WebSockets connection. But if you think it's ok - I'll change it.

And I don't like too significant abbreviation (I'm about pcState) but anyway it's up to you what exactly to choose - I'm ok with anything allowing me to fix issue :) - just tell me what you prefer...

RSATom commented 8 months ago

@lminiero FYI peerConnectionState -> connectionState (and the same for #3342 )