Code was marked for review - isn't necessary anymore and was triggering a static
code analysis alert as well. Simplified it to a good extent.
Also removed some trailing whitespaces from the file so that my editor stops
bothering me.
Firefox doesnt fire the ended evt/onended callback for live video mediastreamtracks. That caused the stream storage to not run the cleanup procedure in some scenarios
Manually emit the ended event which works with the onended callback when a track is stopped
Back when Safari 11 was still a thing, there was an annoying bug where peer connectiocs COULD get stuck during it`s JSEP handshaking phase if, due to some unknown trigger, the SDP was generated BEFORE the ICE candidate gathering had run its course.
I dont believe this is the case anymore and this workaround is _very_ harmful to Safari endpoints, mainly when gathering might take a long time due to additional network interfaces or restricted network environments. So its being removed.
Ive tested this with the widest array of Safari endpoints I could get my hands on: iPhones 8-12, iPads 6-8 and Pro, macOS Safari 12-14
Added new SFU broker for screen sharing
Removed kurento-extension entirely
Added inbound and outbound reconnection procedures
Improve UI responsiveness when sharing
Add reconnection UI states
Redo error handling
Refactor actions-bar screen share components. Make it smarter with less prop drilling and less re-rendering. Also more readable. Still work to do in that I think
Add a connection retry procedure for screen presenters when they are sharing; try a configurable amount of times when failure is triggered, with configurable min and max reconn timeouts and timeout increase factor
Make local preview attachment smarter
ADD PARTIAL SUPPORT FOR AUDIO SHARING VIA SCREEN SHARING WITH GET DISPLAY MEDIA, RECORDING STILL NOT SUPPORTED!!!
This adds the possibility to configure the SIP Via header to plain WS to allow reverse proxying from WSS to WS, internally, to work around a bug in freeswitch where the WSS stack would get deadlocked due to a still unidentified bug in there that has to do with SSL termination
Current sessionDescriptionHandlerModifiers of SIP.js acts before ICE gathering is done. This means we are not able to modify/strip candidates in local SDP.
This modifier acts on local SDP, by allowing user to modify SDP before it is sent on INVITE message.
This considerably changes the way we process audio signaling and start audio elements in user's browser.
We now avoid using AudioContext element for both microphone and listenonly calls, once it is unstable for some iOS devices (cracky audio, user stops hearing audio after a while).
Increased default value for listenOnlyCallTimeout: this avoids activating FreeSWITCH's fallback when ICE negotiation takes longer than 15sec (tested on DO).
Increased listenonly logs.
This fixes#8133#10388
one of the most annoying things about breakout rooms is that the users have to do the echo test again. So they have to wait 7 to 12 seconds again (for most typical bbb configurations) just for the echo test to connect. This change reduces the iceCheckingTimeout from 5 seconds to 1 second, which is still way more than enough unless there is a configuration or network load issue. Depending on network of the used client, this change saves the user between 4 to 8 seconds for every time they activate audio playback or microphone.
The original 5 seconds timeout is not part of the official sip.js library but instead was added in #2877
This fixes a webkit quirk and should get rid of some of the screensharing/listen only problems with Safari
Also improved the extraInfo error logging in the script to log only the name instead of the whole object on browser errors
Addresses the error seen in
`"stackTrace":"TypeError: can't redefine non-configurable property \"userAgent\""`
Note, there are still definitions of `ua` in the code so ideally we need to extract this out.