Commit Graph

539 Commits

Author SHA1 Message Date
Raja Subramanian
f962fef2c8 Apply subscribed track settsings on add (#379) 2022-01-28 08:34:13 +05:30
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
shishirng
26eea78b54 Telemetry connection scores (#377)
* octets - total bytes needs to be uint64

uint32 wraps at 4GB

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

* Cleanup stats handler to use connectionQuality stats

remove per packet rtcp handlers, buffer stats

* cleanup connection stats

* Update mediatrack to store rtcp stats in connection stats

* Update downstream handling of connection stats and telemetry

* Update telemetry tests

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

* Misc fixes

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

* Minor fix to avoid accessing buffer before its allocated

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

* start updateStats worker in AddReciever()

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

* Use previous score to calculate avg scores

* Restructure connectionStats

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-27 11:24:54 -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
Raja Subramanian
45b07e2b3f Add trackID to logger context (#375) 2022-01-26 13:23:38 +05:30
Raja Subramanian
44afa8bae1 Delete down track on close (#374)
Note that it is called from Unbind also (previous behaviour). It should
be fine as long as there is no new down track for the same peer added
between close calling it and unbind calling it.
2022-01-26 13:22:39 +05:30
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
Raja Subramanian
bb26109096 Add a method to clear receiver. (#372)
With remote media track receiver starting/stopping/restarting possibly,
receiver should be cleared when stopped and will be re-initialized when
it is restarted.
2022-01-25 18:08:41 +05:30
cnderrauber
b2cb93d9a4 fix concurrency problem (#369) 2022-01-25 16:13:52 +08:00
David Colburn
e7e3fcac43 remove duplicate IsRecorder 2022-01-24 20:51:57 -07:00
David Colburn
627a93298e IsRecorder (#368)
* IsRecorder

* regenerate fakes
2022-01-24 18:22:10 -07:00
shishirng
56ebd521f9 Telemetry capture published track updates (#367)
* Telemetry capture published track updates

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

* Updated OnVideoLayerUpdate to take slice of layers

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

* Update proto dep

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-24 14:38:04 -05:00
cnderrauber
90b97137c9 fix migrate state of subscribe only client (#366) 2022-01-24 17:03:24 +08: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
Raja Subramanian
6a46958870 Some receiver clean up (#364) 2022-01-23 08:22:39 +05:30
Raja Subramanian
d1848ab218 Rename UpdateSubscriptionPermissions -> SubscriptionPermission and other renaming (#363)
* Store subscription permission in DB

* Comment out subscription permission to DB

* WIP commit

* Clean up

* clean up

* Latest protocol
2022-01-22 12:16:15 +05:30
David Zhao
f9a1dd97c2 Ensure RoomService operation is complete prior to returning (#362)
* Ensure service doesn't return before operation is complete

* added integration tests for RoomService
2022-01-21 11:00:33 -08:00
David Zhao
126bb8867b Ability to disable auto-create (#361)
* setting to disable autocreate

* improve test reliability

* update comment

* update to address feedback
2022-01-21 09:57:36 -08:00
Raja Subramanian
7f4ead9b25 Fire onNoSubscribers callback in only one place. (#360)
While reworking some cloud code, this is getting fired multiple times
(in RemoveAllSubscriber and in the callback). So, it causes some
errors in the logs. Fire it only from one place.
2022-01-21 11:16:54 +05:30
cnderrauber
2886ab1e39 RemoveSubscriber through pariticipant (#359) 2022-01-21 12:32:26 +08:00
Raja Subramanian
3d56b7c7f3 Adjustments to allow permissions migration. (#356)
* Adjustments to allow permissions migration.

* Fix tests
2022-01-21 09:43:59 +05:30
shishirng
829e183863 pass client info object in participant joined request (#358)
* pass client info object in participant joined request

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

* Update tests

Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-20 15:29:34 -05:00
Raja Subramanian
4e4ad102f7 move stop timer in mediatracksubscriptions module where it belongs (#357)
* move stop timer in mediatracksubscriptions module where it belongs

* Correct my screw up
2022-01-21 00:50:48 +05:30
Raja Subramanian
e4e292d988 Do not send connection quality when participant is not active. (#354)
* Do not send connection quality when participant is not active.

Some times when the connection takes a while (in a long delay network
on Safari for example), connection quality arrives before connectivity.

* Do not calculate connection quality of unconnected participants
2022-01-19 23:18:55 +05:30
Raja Subramanian
0178a004dd Compile in send-side bandwidth estimation. (#351)
Still not using it. But, now that Pion has merged the initial
version of GCC (Google Congestion Control) for send side bandwidth
estimation, we can integrate it.

We will enable once we have tested and feel comfortable.
2022-01-19 22:36:41 +05:30
cnderrauber
0acb0a9d66 don't send black screen when Track be resumed (#352)
* don't send black screen when Track be resumed

* default flush
2022-01-19 18:14:38 +08:00
David Colburn
5bea9debb7 Code cleanup (#353) 2022-01-19 02:13:06 -08:00
Raja Subramanian
10714b3f6d Adjust interfaces to better work with cloud (#349)
* Adjust interfaces to better work with cloud

* force argument to quality update
2022-01-19 10:28:55 +05:30
cnderrauber
8a5f26b064 refine reuse transceiver (#348) 2022-01-19 10:24:29 +08:00
David Zhao
88cad8f093 Generate cleaner configs (#347)
Also upgrade to v1.17 for docker builds
2022-01-17 23:54:04 -08:00
Raja Subramanian
0e74ce89c5 Update pion/webrtc (#346)
Also use DTLSRoleServer in publisher peer connection to get around
potentially a Chrome browser issue in long latency links.
2022-01-18 11:26:57 +05:30
Raja Subramanian
f662119ca4 Add roomID to logger util (#345) 2022-01-17 16:36:10 +05:30
cnderrauber
629dae0f84 fix close on nil sink (#344) 2022-01-17 12:04:01 +08:00
David Zhao
c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00
Raja Subramanian
d45435ed3d Fix null dereference (#343) 2022-01-15 23:25:48 +05:30
Mathew Kamkar
416ca80a8b get all local ip addresses (#340) 2022-01-14 17:49:45 -08:00
David Zhao
f2f776931f Integrated logging with Pion (#341)
* Integrated logging with Pion

* handle nil logger
2022-01-14 17:44:28 -08:00
David Zhao
cd9c125414 Also allow headers with CORS (#339) 2022-01-14 10:13:11 -08:00
shishirng
cf830191e3 Add client info to participant_joined event (#337)
Signed-off-by: shishir gowda <shishir@livekit.io>
2022-01-13 17:45:21 -05:00
David Zhao
f9b2af0cf9 Use CORS middleware to allow RoomService use (#335) 2022-01-13 09:29:48 -08:00
David Zhao
29eb8d9dbf Parse additional info parameters clients could send (#336) 2022-01-13 08:40:29 -08:00
Raja Subramanian
017ed13338 Prevent multiple resume notifications on track (#334)
* Prevent multiple resume notifications on track

When returning previous allocation as is, reset change to none.
Ideally, would like to have change as a separate return and not in last
allocation. But, also prefer to have last allocation state. For now,
resetting change.

* log bandwidth estimate only on decrease
2022-01-12 23:19:56 +05:30
Artur Shellunts
5cdea4e15d Avoid per packet operation (#332) 2022-01-12 10:23:55 +01:00
David Zhao
b05d154d12 Handle simulated leave (#333) 2022-01-11 23:34:27 -08:00
Raja Subramanian
e67db84b3b Remove stubs (#331)
* WIP commit

* Use LocalParticipant interface

* Remove no-op local participant

* Remove localparticipant

* Remove no-op stubs

* Consolidate PublishedTrack into MediaTrack
2022-01-12 00:11:48 +05:30
David Zhao
c2ba26eee6 Handle SimulateScenario requests (#330)
* Handle SimulateScenario requests

* actually use sendLeave

* fix local test failures due to filehandle limit
2022-01-11 00:37:24 -08:00
Raja Subramanian
e82b8ea0a0 No op implementation to remove stubs in remote (#327)
* No op implementation to remove stubs in remote

* Place interface first
2022-01-10 19:17:58 +05:30
Raja Subramanian
d6deb6cfa4 Move UpdateTrackInfo into MediaTrackReceiver (#329) 2022-01-10 19:07:21 +05:30
Raja Subramanian
02eb21c2ce Move MediaTrack ToProto out of media track receiver as remote needs a (#328)
different implementation.
2022-01-10 18:34:54 +05:30