fix(BridgeChannel): Attempt conn retries when there are remote endpoints.
Currently, the client doesn't attempt to re-establish bridge WS when the connection is closed by the remote end with a code 1001. We have noticed that Cloudflare terminates the WS with the same error code when it recycles its proxies. When that happens, client ends up not having a bridge channel which can result quality issues.
Client now tries to re-establish connection when there are remote endpoints in the call.
fix(qualitycontrol): Cleanup old receiver constraints.
Endpoint based receiver constraints and other endpoint based bridge signaling messages are no longer supported by latest JVB after the switch to source-name signaling.
Rename method names 'sendNewReceiverVideoConstraintsMessage'->'sendReceiverVideoConstraintsMessage', 'setNewReceiverVideoConstraints'->'setReceiverVideoConstraints'
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>
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
fix(qualitycontrol) SenderVideoConstraintsV2 changed to SenderSourceConstraints.
The colibri class name for the source name sender constraints changed from SenderVideoConstraintsV2 to SenderSourceConstraints.
The new format is {colibriClass: 'SenderSourceConstraints', sourceName: 'b6746083-v0', maxHeight: 180}
feat(multi-stream-support) Configure the senders based on SenderVideoConstraintsV2.
The encodings for local video tracks are confiugured based on the SenderVideoConstraintsV2 constraints received from the bridge. The constraints are sourceName based. Also ignore enableLayerSuspension flag since it has been deprecated and layer suspension has been enabled by default. Also having it off makes screensharing on Chrome in unified plan not work as expected.
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.
Translate the 'LastNChangedEvent', 'SelectedEndpointsChangedEvent' and 'ReceiverVideoConstraint' messages into the new 'ReceiverVideoConstraints' message that invokes the new bandwidth allocation algorithm in the bridge that is described here - https://github.com/jitsi/jitsi-videobridge/blob/master/doc/allocation.md. useNewBandwidthAllocationStrategy=true in config.js will invoke the translation in the client.
ref(QualityController): Split send and receive video constraints handling.
All the send video constraints for the client, i.e., what simulcast streams will be enabled based on constraints received on the bridge channel, will be handled by the SendVideoController class.
The receive video constraints like lastN, selectEndpoints and receive video resolution will be handled by the ReceiveVideoController class.
They contain no information about the failure (this is available in the onclose
event) and the event references the WS object itself, which causes hangs on
mobile.
Changes the behavior to actively open new WebRTC Data Channel instead
of waiting for the JVB to do it.
Adds ICE_RESTART_SUCCESS event used to re-initialize the data channel in
case of ICE restart where the conference could have been moved to
another bridge.
* Support layer suspension
Add support for a message which notifies the endpoint whether or not it
is selected (meaning its HD stream is in use). If it is not
selected and enableLayerSuspension is set to true then it will impose a
bandwidth limit in the SDP to suspend sending the higher layers.
* only add the IS_SELECTED_CHANGED listener in JingleSessionPC if layer
suspension is enabled
this prevents doing a local o/a when we don't need it