* Initial plumbing for metrics.
This implements
- metrics received from participant.
- callback to room.
- room distributes it to all other participants (excluding the sending
participant).
- other participants forward to client.
- counting metrics bytes in data channel stats
TODO:
- recording/processing/batching
- should recording/processing/batching happen on publisher side or
subscriber side?
- should metrics be echoed back to publisher?
- grants to publish/subscribe metrics.
* mage generate
* clear OnMetrics on close
* - CanSubscribeMetrics permission.
- Echo back to sender.
* update deps
* No destination identities for metrics
* WIP
* use normalized timestamp for server injected timestamps
* compile
* debug log metrics batch
* correct comment
* add baseTime to wire
* protocol dep
* Scope metrics forwarding to only participants that a participant is
subscribed to.
Also remove the participant_metrics.go file as it was not doing anything
useful.
* update comment
* utils.ErrorIsOneOf
* couple of more utils.CloneProto
* Support for participant attributes
* move metadata setters to LocalParticipant
* address feedback
* forward error
* update go mod
* update attributes first
* Augment LeaveRequest with alternate regions to connect.
* update protocol and issue resume action on close if expected to resume
* use current protocol in tests
* address feedback
* Avoid reconnect loop for unsupported downtrack
If the client subscribes to a track which codec is unsupported by the
client, sfu will trigger negotiation failed and issue a full reconnect
after received client answer. If the client try to subscribe that track
then it will got full reconnect again. That will cause a infinite
reconnect loop until the client don't subscribe that track. This PR
will unsubscribe the error track for the client and send a
SubscriptionResponse that contain the reason to indicates the track's
codec is not supported to avoid the reconnect loop.
* WIP commit
* WIP commit
* fix copy pasta
* setting PC with previous answer has to happen synchronously
* static check
* WIP commit
* WIP commit
* fixing transport tests
* fix tests and clean up
* minor renaming
* FIx test race
* log event when channel is full
* feat: unpublish tracks after publish permissions are revoked.
Uses protocol 7 to indicate client support, otherwise it attempts to
mute the tracks.
Also sends back permissions objects of all participants, and cleaned up
our handling of various permissions attributes.
* fix static check
* Ensure autosubscribe is honored when subscription permissions were granted later
* negotiate even if no media has been added
* don't double-negotiate
This ensures client reconnect attempts would be successful for long running rooms. It also fixes inaccurate permissions that were set incorrectly when full reconnections take place.
* Allow participants to create new connection for publishing new tracks
new param 'publish=<name>' enables publishing new connection with publish
only grants. Also, identity is appended with '#<name>'
* Add integration test to duplicate publish only connection
Signed-off-by: shishir gowda <shishir@livekit.io>
* Reuse token in test and set subscribeGrant to false on publish param
Signed-off-by: shishir gowda <shishir@livekit.io>
* create auth token with grants
Signed-off-by: shishir gowda <shishir@livekit.io>
* Signal ice on negotiate in test client
Signed-off-by: shishir gowda <shishir@livekit.io>
* Update pkg/service/rtcservice.go
Co-authored-by: David Zhao <david@davidzhao.com>
Co-authored-by: David Zhao <david@davidzhao.com>
* Handle multiple codecs in renegotiation
update pion to v3.1.9 for answer same order of codec as publisher.
register enable codecs in subscriber peerconnectin created.
add codec parameter to buffer.bind
buffer should use the codec of TrackRemote as it's codec mime.
sent h264blankframe when DownTrack closing
* Disallow AddTrack from participants that don't have the permission
* Support protocol 3 speaker updates, client info
* update protocol
* Disallow AddTrack from participants that don't have the permission
* increase wait time for GH to pass