Commit Graph

295 Commits

Author SHA1 Message Date
David Zhao b9ee0b5800 Skip loading of participant before writing messages to them. (#654)
In some implementations of the Store interface, it's possible that the
media node has not yet persisted the participant when we are trying to
send it messages. In which case we should not error on loading of the
participant.
2022-04-24 23:09:06 -07:00
David Zhao b7d22c4f34 Fix MessageChannel leaks (#646) 2022-04-22 10:53:20 -07:00
cnderrauber 3f9d6c11bc add log info for client closed websocket (#640) 2022-04-21 12:44:43 +08:00
David Zhao b821a0997d Use common logging init functions (#633)
* Use common logging init functions

* update protocol commit

* fix tests
2022-04-20 00:15:11 -07:00
David Zhao 282e2aed49 Increase frequency of status updates and longer availability threshold (#628)
* Increase frequency of status updates and longer avail. threshold.

* better fix.

* fix room close test failure due to slow peer connection Close

* Perform avg computation more frequently if data has changed
2022-04-19 22:18:00 -07:00
Raja Subramanian cf627d8bbe Send adaptive stream param in join (#626) 2022-04-19 16:45:35 +05:30
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
Raja Subramanian 92009b6428 Consistently stop tickers (#593) 2022-04-05 20:42:06 +05:30
Raja Subramanian 4696503790 Include region in ParticipantInfo (#585) 2022-03-31 14:57:55 +05:30
David Colburn 7dc90e805c Update protocol (#582) 2022-03-30 16:38:38 -07:00
David Colburn 0b8a180554 Code inspection (#581)
* Code inspection

* fix [4]int64 conversiong
2022-03-30 13:49:53 -07:00
David Colburn 26f7bb498a Identity cannot be empty (#580) 2022-03-30 12:53:32 -07:00
David Zhao f2556483a3 Re-issue tokens when clients initially connect. (#569)
This ensures if they are disconnected before token is refreshed, they
could reconnect back with a valid token.
2022-03-25 23:55:19 -07:00
cnderrauber 3352ee6b79 add size limit to metadata of room & participant (#566)
* add size limit to metadata of room & participant

* description in config-sample

* solve comments
2022-03-25 12:48:11 +08:00
cnderrauber b98b828618 throttle quality come down (#556) 2022-03-23 15:27:00 +08:00
David Colburn 13c91678bf Remove egress store (#552)
* Remove egress store

* fix imports
2022-03-22 12:37:31 -07: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
shishirng 4fb5076807 Check cloudflare headers for real client ip first, default to X-Forwarder-For (#523)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-03-17 08:10:44 -04:00
David Colburn c0d9937125 use egress results channel (#512) 2022-03-15 08:49:46 -07:00
cnderrauber 61ac44e5f7 Revert data track change (#513)
* Revert data track change

* clean code
2022-03-15 19:30:10 +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
b20132367 e5ffd38054 Remove race for creating rtc room (#485) 2022-03-05 00:08:13 -08:00
David Colburn 67848a1dcb fix panic for StartEgress 2022-03-03 12:43:08 -08:00
cnderrauber 4bc03d8435 Client configuration (#452)
* client configuration

* fix init roommanager
2022-03-03 18:26:14 +08:00
Alex Beattie 96654e164a support Redis TLS Connection (#482)
* Add TLS for Redis connection

* Update to add tls flag
2022-03-02 22:17:29 -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
David Colburn a1bef5b18d deadlock CI (#475)
* deadlock CI

* make sure the test fails

* remove fail check
2022-02-28 14:48:19 -08:00
Raja Subramanian 2706dc130f Replace sync/atomic usage with uber/atomic (#471) 2022-02-28 09:57:17 +05:30
David Zhao 130decbf1d CI step for static check (#467)
* CI step for static check

* fix staticcheck
2022-02-24 23:07:15 -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
Raja Subramanian 2959eebca8 Introducing OpsQueue (#463)
* Introducing OpsQueue

Creating a PR to get feedback on standardizing on this concept.

Can be used for callbacks.
Already a couple of places use this construct. Wondering if we
should standardize on this across the board.
Just changing one place to use the new struct. Another place
that I know of which uses this pattern is the telemetry package.

* atomic flag -> bool
2022-02-25 11:56:26 +05:30
David Colburn 20f21cce2b Egress (#455)
* egress updates

* pass egressInfo to delete

* update typefakes

* export StartEgress

* update protocol

* new rpc, rename stores

* add json tag

* update tests

* update protocol
2022-02-24 14:57:14 -08:00
David Zhao 7eb2fecadd Close websocket connection upon join failure (#458)
* Close websocket connection on join failure to avoid hang

* fix auto creation bug
2022-02-22 17:43:25 -08:00
Raja Subramanian 3f38172139 Types for ConnectionID, NodeID, ParticipantKey (#450)
* Types for ConnectionID, NodeID, ParticipantKey

* latest protocol version
2022-02-21 08:52:11 +05:30
shishirng 562546829b handle remote ip address in case of forwarding (#421)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-02-08 16:13:55 -05:00
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
David Zhao 81521f80db Support for custom TURN servers (#409)
Closes #271
2022-02-05 23:15:58 -08:00
David Zhao e6c236357a Option to disable ICE-Lite to improve compatibility (#408) 2022-02-05 22:57:47 -08:00
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
shishirng 7ac3631b6c Get clients remote address from request (#385)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-29 10:51:21 -05:00
David Zhao 3430650d3e Server-side parsing of UserAgent (#387) 2022-01-29 00:52:06 -08:00
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
shishirng 1e156025b4 Store client meta on participant join (#380)
* Store client meta on participant join

capture region, time_to_connect, ip, node

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

* Update proto dep

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-27 15:44:03 -05:00
David Colburn 32825d2666 clean up WriteRoomRTC (#378)
* clean up WriteRoomRTC

* regenerate
2022-01-26 19:12:39 -07:00
David Zhao 69116a57fc Correctly use writeParticipantMessage for APIs (#376) 2022-01-26 00:26:42 -08:00
David Colburn c92e0e38d5 Room closed fix (#370)
* Room closed fix

* switch to uber/atomic

* release after err check
2022-01-25 09:23:22 -07:00
David Zhao 52fc53d325 Issue updated tokens to clients. (#365)
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.
2022-01-23 23:15:49 -08:00