40 Commits

Author SHA1 Message Date
cnderrauber
4104b8270b update protocol (#4183)
* update protocol

* fix test
2025-12-22 12:54:11 +08:00
Raja Subramanian
cd99fec2e7 Make new path for signalling v1.5 support. (#4180)
* Make new path for signalling v1.5 support.

To be able to support newer clients to interact with older servers, move
signalling v1.5 to new path (`/rtc1`). On the new path, `join_request`
is required and single peer connection is used.

With the existing path `/rtc`, single peer connection is still supported
if `join_request` is used.

Newer clients connecting to old server should follow
1. Try new path WebSocket
2. If that fails, try new path validate at `/rtc1/validate`.
3. If the above gets a 404 which will happen with older server, revert
   back to old path and signalling 1.0.

Open to suggestions on path name.

* test on both paths

* change path from /rtc1 -> /rtc/v1

* test all rtc service path combinations
2025-12-20 01:02:22 +05:30
Raja Subramanian
7954748d7a Data tracks (#4089)
* WIP

* WIP

* Starting to add some signalling integration testing.

* Working tests.

* fix tests

* Forward data packets (#4096)

* WIP commit

* WIP

* WIP

* fix forwarding

* address PR comments

* move some methods from LocalParticipant to Participant interface

* handle subscription update

* add extensions and tests

* more packet tests

* add test for replace extension and fix a bug

* update protocol and add config
2025-12-04 10:44:34 +05:30
Raja Subramanian
890fd94249 Single peer connection mode (#3873)
* WIP

* check using protocol version

* revert

* clean up

* sdp cid argument

* WIP

* WIP

* test

* clean up

* clean up

* fixes

* clean up

* clean up

* clean up

* conditional checks

* tests for both dual and single peer connection

* test

* test

* test

* type check

* test

* todo

* munges

* combined config

* populate mid

* limit to receive only

* clean up

* clean up

* clean up

* older test

* clean up

* alternative audio codec

* dtx

* don't need to copy

* Anunay feedback

* use the available peer connection

* publisher check

* WIP

* WIP

* WIP

* no mid

* media sections requirement

* mage generate

* WIP

* WIP

* set data channel receive size for test

* handle early media better

* WIP

* do not do ICERestart if no subscriber

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* start up subscriber RTCP worker

* WIP

* WIP

* clean up

* clean up

* flag to indicate use of single peer connection

* remove unused interface method

* clean up

* clean up

* Jie feedback #1

* deps

* do not access subscriber in one shot mode

* more places for one shot mode

* more one shot fixes

* deps

* deps

* test
2025-08-28 12:16:18 +05:30
Raja Subramanian
d08487bf83 Unlabeled (pass through) data channels. (#3567)
* Unlabeled (pass through) data channels.

Support data channels than can pass through raw data without any LK
protocol marshaling/unmarshaling.

* statischeck

* test

* error -> warn

* reset data message callback
2025-04-01 21:59:31 +05:30
David Zhao
7a774cc82a Support for participant attributes (#2806)
* Support for participant attributes

* move metadata setters to LocalParticipant

* address feedback

* forward error

* update go mod

* update attributes first
2024-06-19 23:14:19 -07:00
David Zhao
981fb7cac7 Adding license notices (#1913)
* Adding license notices

* remove from config
2023-07-27 16:43:19 -07:00
Paul Wells
6c20c7eb15 add test for removing disconnected participants on signal close (#1896)
* add test for removing disconnected participants on signal close

* cleanup
2023-07-20 21:21:40 -07:00
Dan McFaul
aa0df2813f deleting nonRtc rooms and fixing race when deleting rooms (#721) 2022-05-27 09:45:22 -06: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
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
7297a57f3d Improve TestMultiNodeRefreshToken reliability 2022-02-02 21:29:57 -08:00
David Zhao
6af6eefb8c Improve readability of test failures (#386) 2022-01-28 21:34:21 -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 Zhao
3108ef22ad Ability to set name on Participant (#293) 2021-12-28 00:12:04 -08:00
David Zhao
15cd98be22 Enable Room.List to filter by specific names (#290) 2021-12-27 23:32:29 -08:00
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
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
Mathew Kamkar
700a879c0b Redis Router graceful stop (#116)
* prestop and hasparticipants in interface

* add prestop function to existing routers

* fakerouter prestop

* update protocol version

* read lock

* redis router graceful stop

* test fix

* force stop
2021-09-15 13:07:44 -07:00
David Zhao
e99ec0b339 Add tests to data publishing with protocol 3 2021-09-11 22:27:17 -07:00
David Zhao
1bcaf9d0ea update test client to use protocol 3 2021-09-10 20:58:33 -07:00
David Colburn
8a44fad307 protocol 0.8 (#95)
* protocol 0.8

* merge new selector
2021-08-27 13:16:33 -05:00
David Zhao
c510ea2e1a Fix race condition with Transport negotiations 2021-06-04 12:26:23 -07:00
David Zhao
bf281b1994 Simplify test helpers, cleanup redis between tests 2021-06-04 11:22:08 -07:00
David Zhao
0900054c24 ability to disable auto subscribe per participant 2021-05-22 22:54:47 -07:00
David Zhao
93d10b2640 Manual negotiation and plan-b support 2021-04-16 00:56:25 -07:00
David Zhao
7d02c01fd8 refactor - moved common code to livekit/protocol 2021-03-13 22:01:51 -08:00
David Zhao
a010b618af re-assign node for room if existing node for room is no longer available 2021-02-20 21:09:04 -08:00
David Zhao
99baeb38e4 fix bugs with websocket reconnection, don't re-use redis sinks (#22) 2021-02-15 17:57:01 -08:00
David Zhao
090f8d0664 use dedicated PeerConnections for sending and receiving (#19)
* protobuf updates to support new protocol

* use dedicated publish & subscribe peerconnections

* update client to work with dedicated PCs

* fix Go client negotiation, reduced length of UUID
2021-02-12 22:30:31 -08:00
David Zhao
c012c742bd fix allowing client negotiations prematurely. 2021-02-05 17:46:52 -08:00
David Zhao
d117cce37b integration test around receive before publish 2021-02-02 22:53:48 -08:00
David Zhao
70574deaf7 better debug logs around negotiations 2021-02-02 00:40:55 -08:00
David Zhao
76b0dc62a7 close rooms after delay instead of immediately after participant departure, to allow reconnects 2021-01-31 14:19:16 -08:00
David Zhao
61db4f5b66 fixed multi-node so signal node can start sessions 2021-01-26 23:52:55 -08:00
David Zhao
f004aa2952 auto-create rooms upon creation 2021-01-24 23:47:24 -08:00
David Zhao
c04fd86f9c multi-node integration tests 2021-01-19 20:34:11 -08:00