fix(SignalingLayer) Update SSRC owners on leave. (#2184)
* fix(SignalingLayer) Update SSRC owners on leave.
Update the SSRC owners in the following cases:
1. When a remote endpoint leaves the call.
2. When a source-remove is received.
3. When a source is remapped (with ssrc-rewriting enabled).
Create the remote track even if presence is not yet received. The ssrc owner check prevents the client from creating a dummy track when the call switches over from p2p to jvb when the last remote endpoint leaves the call.
* ref(SignalingLayer) alpha sort methods.
Clean up unused methods, _findEndpointSourceInfoForMediaType is not used anymore.
* squash: Address review comments.
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.
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>
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).
feat(multi-stream-support) Add track streaming status (#1855)
* feat(multi-stream-support) Add TrackStreamingStatus class
update JitsiRemoteTrack to init and dispose TrackStreamingStatus
stop emitting LASTN_ENDPOINT_CHANGED event when source name signaling is enabled
convert TrackStreamingStatus class to typescript
* rename methods and use TrackStreamingStatus enum
* update jdocs for JitsiConferenceEvents.FORWARDED_SOURCES_CHANGED
* feat: Adds events for session-add, session-remove and session-accept.
* feat: Refactor updating presence for audio/video mute and video type.
This brings few changes and fixes. Thew initial presence will always miss audioMuted and videoMuted value, those will be added on session accept. All updates to presence are done on sessionAccept, on source-add or on source-remove and the only one not signalled when camera track is replaced by video track and vice versa.
This change brings more presence updates when number of participants are below startAudioMuted/startVideoMuted, but when participants are above those numbers we get less presence update. This is important for big meetings.
Fixes wrong videoMuted state, as replace track and mute are both executed in promise, sometimes the replace-track one finishes first and when the mute one is resolved there is no conference object in the track to be able to update the presence (hitting this when we pass the startAudioMuted threshold).
* squash: Put back the tracks for _setTrackMuteStatus and _setNewVideoType.
* squash: Fix line length.
* squash: Fix skip sending presence twice.
* squash: Adds the error to the error callback.
* squash: Fix newJingleErrorHandler.
* Save track source name to JitsiRemoteTrack
* add feature flag checks. code review adjustments.
* eslint cleanup1
* eslint cleanup2
* fix: move sourceName declaration outside of if block.
Co-authored-by: Dennis Dowhy <ddowhy@gmail.com>
Co-authored-by: William Liang <wliang67@bloomberg.net>
They are companion rooms created in a separate MUC. The room relationship is
maintained by a Prosody plugin.
All signalling happens through the breakout rooms MUC component.
Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
...to advertise track's muted state and the video type.
For now, if the source name signaling flag is enabled, both legacy and
new <SourceInfo> element will be used at the same time. This is to be
able to interoperate with legacy clients and start testing the new
format at the same time. Whenever possible <SourceInfo> will be used
as main source of truth with the fallback to legacy <audiomuted/>,
<videomuted/> and <videotype/> elements.
feat(BridgeChannel): Signal a new videoType for high fps screenshare.
This lets the bridge adjust the bitrate allocation for this source so that layers with higher fps are prioritized over layers with higher resolution.
As a result, endpoints with restricted downlink will receive a high fps low resolution share as opposed to a high resolution low fps screenshare.
* feat: Audio/Video moderation.
* squash: Fix docs.
* squash: Adds some warning logs when execution is rejected.
* squash: Changes a field name in the message for adding jid to whitelist.
* squash: Send to participants only message about approval.
Skips sending the whole list.
* squash: Fixes tests.
* squash: Adds more logs.
* feat: Separates enable/disable by media type.
Adds actor to the messages to inform who enabled it.
* squash: Fixes log line.
* squash: Fixes comments.
* squash: Fixes log messages.
* squash: Fixes comments.
feat(stats): Add a new bridge message "EndpointStats" for stats.
Use the new Colibri message "EndpointStats" for broadcasting the local stats. The bridge then will be able to filter the endpoint stats and send them only to the interested parties instead of broadcasting it to all the endpoints in the call.
* Added video mute participant
* Trigger mute event
* Optimized mute type checks
* Fixed event name
* Fixed some linter issues
* Fixed more linter issues
* And even more linter issues fixed
* And more linter fixes
* Added media type to analytics event
fix(ice-restart): Force client reloads when call is migrated.
Force the client to reload when the bridge that is handling the media goes down.
This mitigates issues seen on the bridge because of a client re-joining the call with the same endpointId, BWE issues, etc.
This behavior is configurable through 'enableForcedReload' setting in config.js.
feat: Skips using disco-info for features. (#1450)
* fix: Drops unused parameter of join and sendPresence.
* feat: Skips using disco-info for features.
Uses presence to publish features added externally.
Recognizes jigasi participants using a specific presence extension used by jigasi.
* squash: Fixes tests.
* squash: Adds e2ee to the features in presence.
* squash: Fix function name and docs.
* squash: Drops detecting jigasi from initiator.
Using the newly added presence features.
* squash: Drops unused var.
* squash: Fix comments.
* squash: Adds a constant and for E2EEE feature.