Remove support for legacy endpoint based signaling. (#2147)
* Remove support for legacy endpoint based signaling and make source-name signaling as the only signaling mode. The legacy screensharing mode will no longer be supported. The client will still be able to process remote presence sent in the old format to support interop with very old mobile clients and jigasi that do not support source-name signaling.
* remove code related to presenter mode.
fix(RTPStatsCollector) fix extracting codec information
Use the participant ID as the key to codecs, etc, instead of the source
name. The object is further indexed by SSRC.
Don't wait for both codecs to be set before propagating codec
information.
Sample data model for codecs:
codec: {
participant1: {
ssrc1: {
audio: 'opus',
video: undefined
},
ssrc2: {
audio: undefined,
video: 'VP8'
},
...
}
,...
}
feat(ScreenObtainer) Allow seamless switching of tab capture.
Allow users to seamlessly switch which tab they are sharing without having to stop the current share and select a new tab again. This is supported on Chrome 107 onwards.
Instead of Jicofo signaling all the remote sources available in the call, the bridge now signals only a limited set of SSRCs and then rewrites the SSRC on the outgoing media streams. The SSRC mapping is done based on the sources requested by the clients through the receiver constraints. This limits the number of m-lines in the remote/local SDPs on the client and therefore results in better performance in large calls.
* Handle source remapping messages from bridge
* Added track_owner_changed events
* don't process an invalid rtx ssrc.
* keep track of remote ssrcs, only renegotiate on new ones.
* Change source name on remote track on ssrc remapping.
* Don't remove tracks on member leave.
* Remove (orphaned) tracks on session terminated.
* Use serial number (per media type) to create msid attribute.
* Update videoType on remapping.
Co-authored-by: James A <jqdrqgnq@users.noreply.github.com>
Fix codec negotiation and other multi-stream issues (#2133)
* fix(codec-selection) Munge all related m-lines for multi-stream.
Munge all the video m-lines to apply the preferred codec settings in multi-stream mode.
* fix(TPC) Cache transceiver mids for all local video tracks.
There will be multiple video tracks in multi-stream, we need to cache the mids for all the the associated transceivers.
* fix(sender-constraints) Do not apply sender constraints if value hasn't changed for a given source.
* fix(TPC) Configure the direction correctly for all m-lines.
Ignore negotiationneeded events for p2p to avoid going into a renegotiation loop.
* squash: Address review comments.
Adds a helper function getSourceIndexFromSourceName to
have track index parsing in one place.
In _processLocalSSRCsMap there was an assumption that a track
index can be a single digit only.
Use "last index of" or search from the end of the collection to
make parsing a bit more universal (does not matter as much for
Jitsi endpoint IDs, but if fixes issues if someone has
a customization there).
fix(TPC): Ignore stopped transceivers on FF during new track addition.
Firefox lists stopped transceivers when getTranceivers is called, ignore these when picking a trancceiver for a screenshare track. Fixes an issue when starting screenshare fails if there are stopped tranceivers in the peerconnection (i.e., if some remote users with sources have left the call).
fix(TPC) Do not force immediate O/A cycles after track replace operations.
In Unified-plan mode, we rely on the browser to fire 'negotiationneeded' event to start a O/A cycle. Also add muted tracks to PC. Fixes issues where the streams are not being signaled when call switches over from p2p to jvb in multi-stream mode.
fix(stats): Skip bandwidth calc if there is no uplink/downlink bitrate.
This fixes an error that gets logged when no media is being sent/received by the endpoint.
Logger.js:154 2022-09-12T14:40:53.476Z [modules/statistics/AvgRTPStatsReporter.js] <xl.addNext>: bandwidth_upload - invalid value for idx: 0