Commit Graph

232 Commits

Author SHA1 Message Date
Raja Subramanian cf627d8bbe Send adaptive stream param in join (#626) 2022-04-19 16:45:35 +05:30
Raja Subramanian 50bd08e551 ICE restart - dynacast settings were lost (#620)
* Prevent stats update if the deltas are empty

* increase force interval

* static check

* Change max delay to 30 seconds

* Restart the max subscribed quality timer on ICE restart.

Force an update after a restart to let clients apply dynacast settings.
Also, set the max expected layer to HIGH on restart so that stream
tracker starts up fast on a restart.

* fix test
2022-04-18 22:58:11 +05:30
David Zhao 69d9cc19bc Switch back to reconnecting only on failure. (#604)
Sometimes peerconnection jumps to disconnected periodically even
when the underlying connection is ok. In these cases we are
triggering unnecessary connection restarts.

Given this, we'll leave the responsibility of early-detecting
disconnections to clients, where they have more control/knowledge
of networking conditions.
2022-04-07 23:11:11 -07:00
cnderrauber 665e53aba8 rename log and comment (#601) 2022-04-07 17:28:33 +08:00
cnderrauber f74144846b create new subscriber datatrack after migration (#600)
* use negotiated data channel in migration case

* create subscriber data track after migration

* fix participant state update

* add participant leave log

* update protocol
2022-04-07 15:43:24 +08:00
cnderrauber 1471830990 use negotiated data channel in migration case (#596) 2022-04-06 14:13:31 +08:00
Raja Subramanian b695376086 Avoid locking in callback (#588) 2022-04-04 21:37:10 +05:30
David Zhao 130aefa597 Use type-specific track prefixes. (#586)
* Use type-specific track prefixes.

Making it easier to identify track type from its ID

* also include track source
2022-03-31 12:35:15 -07:00
Raja Subramanian 4696503790 Include region in ParticipantInfo (#585) 2022-03-31 14:57:55 +05:30
cnderrauber ffb45f7fe2 change client resume condition to disconnected, not failed (#583) 2022-03-31 13:43:22 +08:00
David Colburn 0b8a180554 Code inspection (#581)
* Code inspection

* fix [4]int64 conversiong
2022-03-30 13:49:53 -07:00
cnderrauber 3f5d4df65d fix subscribe only client migrate with data channel (#579) 2022-03-30 18:45:03 +08:00
cnderrauber 61655c6ff0 fix firefox reconnect with ice-lite enabled (#565) 2022-03-24 17:38:44 +08:00
cnderrauber b98b828618 throttle quality come down (#556) 2022-03-23 15:27:00 +08:00
sibi adc20649ce limit speaker events to microhpone track (#553)
* limit speaker events to microhpone track

* PR suggestion
2022-03-22 13:55:06 -07:00
cnderrauber 779fe0f549 revert network cost change (#550) 2022-03-22 19:04:13 +08:00
David Zhao 825d3cdbea Cleanup after disconnected participants. Follow up to #537 (#548) 2022-03-21 20:48:06 -07:00
cnderrauber 63d6b49668 make migrated node has higher candidate priority (#546) 2022-03-22 09:47:43 +08:00
David Zhao 5920672802 feat: unpublish tracks after publish permissions are revoked. (#545)
* 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
2022-03-21 00:20:48 -07:00
David Zhao 2155405736 Handle non-primary peerconnection if/when it becomes disconnected (#537)
* Handle non-primary peerconnection if/when it becomes disconnected

* avoid storing nil
2022-03-19 00:31:45 -07:00
cnderrauber 832f3fd124 filter unused candidate and refine log (#528)
* filter unused candidate and refine log

* fix test
2022-03-18 12:57:33 +08:00
cnderrauber 82192f524e fix migration state (#520) 2022-03-16 17:58:25 +08:00
cnderrauber 37b76f41b7 set participant to active after subscriber data channel opened (#518) 2022-03-16 12:12:16 +08:00
cnderrauber 61ac44e5f7 Revert data track change (#513)
* Revert data track change

* clean code
2022-03-15 19:30:10 +08:00
Raja Subramanian be02611ab7 Locks around data track (#508)
* WIP commit

* Fix migration, thank you Jie
2022-03-12 20:10:46 +05:30
cnderrauber 184fc93c6a fix panic on close channel (#495) 2022-03-09 11:49:27 +08:00
cnderrauber 128199e634 don't send datatrack info to client (#492)
* don't send datatrack info to client
2022-03-08 17:05:26 +08:00
David Zhao d57f76fbef Use trackID consistently as log key (#491)
* Use trackID consistently as log key

* more useful logging for track published
2022-03-07 21:02:08 -08:00
cnderrauber 7c0f789316 move CanPublishData check to DataTrack (#490)
* move CanPublishData check to DataTrack

* fix test
2022-03-08 12:02:18 +08:00
cnderrauber 608da4ba4b stats for pli and bitrate (#487)
* stats for pli and bitrate

* solve comments

* return 0 if no pli sent
2022-03-07 14:59:01 +08:00
cnderrauber 4bc03d8435 Client configuration (#452)
* client configuration

* fix init roommanager
2022-03-03 18:26:14 +08:00
David Zhao 7a5b5dbc69 Pass back serverRegion in when participant's joining (#479)
* Pass back serverRegion in when participant's joining

* fix tests

* protocol update
2022-03-02 13:36:19 -08:00
David Zhao 7449175c8e Fix participant update version generation. (#477)
Previously it was stuck at 1
2022-03-01 09:36:11 -08:00
cnderrauber 913ef3a646 Datatrack for data channel (#476)
* data track
2022-03-01 15:48:20 +08:00
cnderrauber c2d3e6e33e create data channel from sync state (#469)
* create data channel from sync state

* fix fake type
2022-02-25 18:32:02 +08:00
Raja Subramanian 778d1aa141 utils.AtomicFlag -> atomic.Bool (#466)
* Replacing hand rolled ion-sfu atomic with uber/atomic

* Remove another hand rolled atomic

* utils.AtomicFlag -> atomic.Bool
2022-02-25 12:19:49 +05:30
Raja Subramanian 0170cc1cb6 Staticcheck (#464)
Using `go get -u honnef.co/go/tools/cmd/staticcheck`
Uneaarthed a couple of real bugs
2022-02-25 12:04:08 +05:30
shishirng b7aac6cb6b Set track_type to VIDEO for max subscriber video quality change explcitly (#461)
its defaulting to 0 -> AUDIO

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-02-24 12:45:07 -05:00
shishirng 3e7fae96ea Add telemetry method to capture max video_quality (#457)
* Add telemetry method to capture max video_quality

Signed-off-by: shishir gowda <shishir@livekit.io>

* Telemetry fakes

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update go mod dep

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-02-22 19:08:49 -05:00
David Zhao aadfc97b0b Minor cleanup, updated docs to reflect Swift (#428) 2022-02-10 00:31:09 -08:00
Raja Subramanian 222b02aa73 RTT (#420)
* Consolidating PLI throttle

Use the throttler in `sfu.WebRTCReceiver`.

Does change shape of config object.

* Move PLIThrottleConfig to sfu.WebRTCReceiver

* fix test compile

* Cleaning up unused stuff

* improve readability

* RTT

- Calculate down track RTT using RTCP Receiver report
- Surface it back to the participant
- Participant updates all its published trackes
  (throttled to limit update to once in 5 seconds)
- That propagates to all the upstream sfu.Buffer and the nacker.
  So, we will have RTT throttled NACKs.

* rtt callback
2022-02-09 09:34:40 +05:30
Raja Subramanian 3117547d60 Consolidating PLI throttle (#419)
* Consolidating PLI throttle

Use the throttler in `sfu.WebRTCReceiver`.

Does change shape of config object.

* Move PLIThrottleConfig to sfu.WebRTCReceiver

* fix test compile

* Cleaning up unused stuff

* readability improvement
2022-02-08 22:50:43 +05:30
Raja Subramanian d3ca4a37a8 Proper context for down track logger (#416)
It was having two participants (both publisher and subscriber).
Fix it by getting logger from susbcriber and adding track context.
2022-02-08 15:54:45 +05:30
Raja Subramanian 36289bbca7 FPS (#410)
* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* Clean up

* Clean up

* Store RTT in stats

* spelling mistake

* Make tests compile

* Fix test compilation error

* fix tests

* clone

* latest protocol
2022-02-08 12:53:14 +05:30
David Zhao 6f6d55345b Use ParticipantInfo version to ensure consistency (#399)
* Use ParticipantInfo version to ensure consistency

Deprecating time.Time and avoid locking unnecessarily

* properly adjust ulimit. update protocol

* Save initial version from params

* get rid of metadata field, use grants copy

* fix test
2022-02-03 17:10:52 -08:00
David Colburn 7bbd238188 clean up logs and imports (#400) 2022-02-03 14:20:19 -07:00
David Zhao a8d43aab67 Uses IceLite only for protocol 6 clients (#397)
* Update to Pion v3.1.20, with fixes DTLS role ambiguity

* Gate ice-lite on protocol version

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2022-02-02 21:16:08 -08:00
Raja Subramanian 5b57522c05 Refactoring connection stats (#384) 2022-01-29 00:55:00 +05:30
David Zhao 9747243ce2 Honor autoSubscribe when subscription permissions are granted later (#381)
* Ensure autosubscribe is honored when subscription permissions were granted later

* negotiate even if no media has been added

* don't double-negotiate
2022-01-28 09:55:10 -08:00
Raja Subramanian f962fef2c8 Apply subscribed track settsings on add (#379) 2022-01-28 08:34:13 +05:30