Commit Graph

115 Commits

Author SHA1 Message Date
cnderrauber
3c907ed460 Add stats for data channel and signal (#1198)
* Add stats for data channel and signal

* Solve comment
2022-11-30 14:53:19 +08:00
Mathew Kamkar
caae389717 node type prometheus metric labels (#1197) 2022-11-29 20:36:35 -08:00
Mathew Kamkar
26fe910e88 Generated CLI Flags (#1112) 2022-10-25 22:24:08 -07:00
cnderrauber
8fd3e8fe2d Support track level stereo and red setting (#1086)
* Support track level stereo and red setting

* fix test client
2022-10-17 10:48:11 +08:00
Raja Subramanian
33f5dbc501 Make strict mode a param (#1054)
So, a wrapping config (like cloud) can skip the strict mode check.
2022-09-29 13:07:32 +05:30
cnderrauber
48588d7c3d code clean & fix h264 test fail (#1028) 2022-09-21 16:59:18 +08:00
Mathew Kamkar
767d660809 Use LocalNode ID in Prometheus metrics (#959) 2022-08-25 22:16:20 -07:00
Raja Subramanian
06a46d5de0 Replace Target with params to indicate direction (#955)
* Replace Target with params to indicate direction

* Add missed send answer call
2022-08-25 08:33:06 +05:30
Raja Subramanian
00b131da50 Wait for fully established to ensure data channel is ready (#949) 2022-08-24 16:51:43 +05:30
Raja Subramanian
aaa3a5b46e Transport restructure (#944)
* 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
2022-08-24 14:31:45 +05:30
David Zhao
ab1ccae0c7 Respond to signal ping / pong (#871)
* Respond to signal ping / pong

* Pass back 1 for pong for now, we don't need the timestamp

* update protocol
2022-08-05 09:24:47 -07:00
Raja Subramanian
e624604453 Revert "ListRooms using sid (#842)" (#845)
This reverts commit f2e1e67e58.
2022-07-21 14:49:41 +05:30
Raja Subramanian
f2e1e67e58 ListRooms using sid (#842)
* ListRooms using `sid`

* correct field name

* Remove contains and latest protocol
2022-07-21 11:05:33 +05:30
cnderrauber
6ba034feae shorten the time cost for subscriber get media tracks (#747)
* set DownTrack's initial codec to first codec of potential codecs

* faststart on subscribe
2022-06-02 10:00:42 +08:00
Dan McFaul
aa0df2813f deleting nonRtc rooms and fixing race when deleting rooms (#721) 2022-05-27 09:45:22 -06:00
David Zhao
a933f1513f Add pprof endpoint when running in dev mode (#708) 2022-05-23 00:34:16 -07:00
David Zhao
57e2321a18 Expose Participant.IsPublisher to differentiate pubs from subs (#643) 2022-04-21 22:15:01 -07: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 Colburn
0b8a180554 Code inspection (#581)
* Code inspection

* fix [4]int64 conversiong
2022-03-30 13:49:53 -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
David Zhao
f14c452f8c Telemetry and webhook improvements. (#535)
* Telemetry and webhook improvements.

* avoid blocking on telemetry channel - increase channel size and drop when full
* send ParticipantJoined webhook when fully joined (i.e. on ParticipantActive)
* send TrackPublished & TrackUnpublished webhooks
* increase number of parallel webhook workers to 50

* update protocol
2022-03-18 23:20:33 -07: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
913ef3a646 Datatrack for data channel (#476)
* data track
2022-03-01 15:48:20 +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
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
David Colburn
7bbd238188 clean up logs and imports (#400) 2022-02-03 14:20:19 -07:00
David Zhao
7297a57f3d Improve TestMultiNodeRefreshToken reliability 2022-02-02 21:29:57 -08:00
David Zhao
a5d779a8b2 Increase test client timeout 2022-01-28 21:43:57 -08:00
David Zhao
6af6eefb8c Improve readability of test failures (#386) 2022-01-28 21:34:21 -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
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
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
David Colburn
5bea9debb7 Code cleanup (#353) 2022-01-19 02:13:06 -08:00
David Zhao
c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00
David Zhao
cd9c125414 Also allow headers with CORS (#339) 2022-01-14 10:13:11 -08:00
David Zhao
f9b2af0cf9 Use CORS middleware to allow RoomService use (#335) 2022-01-13 09:29:48 -08:00
cnderrauber
54e13d20bb sfu node always pick ice controlled role(lite) (#322)
* sfu node always pick ice controlled role(lite)

* fix test case

Co-authored-by: cnderrauber <zengjie9004@gmail.com>
2022-01-10 12:58:10 +08:00
Raja Subramanian
995c1e8676 type aliases -> type definitions (#312)
* type alias -> type definition

* participantSid -> participantID in a comment

* Update protocol
2022-01-03 12:43:58 +05:30
David Zhao
3108ef22ad Ability to set name on Participant (#293) 2021-12-28 00:12:04 -08:00
David Zhao
b747cdb822 Pass along mime type with TrackInfo (#292) 2021-12-27 23:43:30 -08:00
David Zhao
87a799bae2 Include unique id and timestamp with webhook events (#291)
Resolves #230
2021-12-27 23:33:06 -08:00
David Zhao
15cd98be22 Enable Room.List to filter by specific names (#290) 2021-12-27 23:32:29 -08:00
Raja Subramanian
1dcc62b569 SubscribedQualityUpdate message (#270)
* WIP commit

* SubscribedQualityUpdate message to send list of currently subscribed
qualities for a simulcast video publisher

* Correct subscriberID

* goimports

* Do quality update on add/remove of subscribed track

* do not update quality when admin mute is active

* update quality on admin unmute

* Update protocol version

* Simplify max subscribed quality loop per David's suggestion
2021-12-19 12:41:40 +05:30
David Colburn
faa870de3d Move callbacks out of messageRouter (#269)
* move callbacks out of messageRouter

* OCD

* more OCD

* fix forwarder test

* even more OCD

* maximum OCD

* package name collision, copy lock by value
2021-12-17 13:19:23 -08:00
Raja Subramanian
e54ce4f674 Stream Allocator Try 3 (#257)
* Stream Allocator Try 3

Making an intermediate PR to do
- Special treatment for screen share tracks
- When allocating all tracks,
  o try to stream all tracks by starting with the lowest layer
  o multi-pass across tracks to get a more even distribution

Not yet done:
-------------
In deficient state,
o Allocate a specific track on a change
o Steal from other tracks

* Correct sense of managed track

* have to range to copy

* generate

* fix VideoLayers compare

* Use t.simulcasted
2021-12-14 12:48:09 +05:30
David Zhao
2d93ccd668 Updated protocol from protocol/proto -> protocol/livekit (#242)
* Updated protocol from protocol/proto -> protocol/livekit

* separate MediaTrack from PublishedTrack
2021-12-08 13:58:38 -08:00
shishirng
461f29c097 Allow participants to create new connection for publishing new tracks (#224)
* 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>
2021-12-07 16:23:16 -05:00