Commit Graph

854 Commits

Author SHA1 Message Date
Anunay Maheshwari
990c5fafbb feat: server rpc apis (#3904)
* feat: server rpc apis

* fix: cleanup

* fix: move rpc impl to participant

* cleanup

* cleanup, psrpc errors

* remove TODO comment

* update protocol, handle participant disconnect case

* add ephemeral participant identity to rpc data packet

* fix: panic

* chore(deps): bump proto
2025-09-24 13:16:27 +05:30
Raja Subramanian
856e0871bc mediatransportutil to log local address when validating external IP (#3942) 2025-09-22 23:52:16 +05:30
Alex
40101cf7dd Update protocol for SipCreateParticipant (#3939) 2025-09-19 10:47:11 -07:00
Raja Subramanian
dc6825c010 mediatransportutil crash fix for logging local address (#3930) 2025-09-16 19:15:49 +05:30
Raja Subramanian
d6f0588fb2 Update mediatransportutil to log external IP found via STUN. (#3929) 2025-09-16 16:34:23 +05:30
Raja Subramanian
798fa76110 Support simulcasting of audio (#3920)
* WIP

* WIP

* new files

* clean up

* test

* Deps

* clean up

* clean up

* goimports latest
2025-09-12 10:20:04 +05:30
Paul Wells
782a35e801 update protocol for psrpc (#3915) 2025-09-10 21:01:28 -07:00
cnderrauber
76645fad5e Rpcs for ingress proxy WHIP (#3911)
See https://github.com/livekit/protocol/pull/1194
2025-09-09 22:49:42 +08:00
Paul Wells
17c349210d update protocol for sip api change (#3902) 2025-09-06 12:00:22 -07:00
Raja Subramanian
07c40cf349 Use RequestResponse to report protocol handling errors (#3895)
* Send errors as necessary

* WIP

* WIP

* WIP

* WIP

* deps

* static check

* fix test

* test

* test

* logs
2025-09-04 11:27:07 +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
cnderrauber
b4e146c5cb update mediatransport util for ice port 3478 (#3877) 2025-08-26 10:35:10 +08:00
renovate[bot]
98d577eed9 Update module github.com/livekit/protocol to v1.40.0 (#3865)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-17 20:41:35 -07:00
renovate[bot]
afbf541ee2 Update pion deps (#3863)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-17 20:34:44 -07:00
Raja Subramanian
eed27885e5 Send participant_connection_aborted when participant session is closed (#3848)
* Send `participant_connection_aborted` when participant session is closed
without becoming `ACTIVE`.

There is one sticky case. If there is a migration and the migration
fails, this will send `participant_connection_aborted` even though the
participant may have connected properly on the previous node.

* depsg
2025-08-13 10:36:31 +05:30
renovate[bot]
61e59346ef Update go deps (#3439)
* Update go deps

Generated by renovateBot

* update go version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Zhao <dz@livekit.io>
2025-08-11 15:07:42 -07:00
Raja Subramanian
1b2289137d Support video layer mode from client and make most of the code mime aware (#3843) 2025-08-09 21:26:11 +05:30
Raja Subramanian
f2da4444b4 Support per simulcast codec layers. (#3840)
* different layers

* deps
2025-08-08 19:53:38 +05:30
Raja Subramanian
f275f592ed handle SyncState in join request (#3839)
* handle SyncState in join request

* check for nil in function
2025-08-08 10:14:02 +05:30
Raja Subramanian
5d44cf6d57 Use wrapped join request to be able to support compressed and uncompressed. (#3838)
* Do no gzip join request

* wrapped join request

* deps
2025-08-07 22:37:08 +05:30
Raja Subramanian
5ca1626439 Support join request as proto + base64 encoded query param (#3836)
* Support join request as proto + base64 encoded query param

* joinPublish

* staticcheck

* deps

* tests

* gzip

* test

* deps

* clean up
2025-08-07 11:13:27 +05:30
Raja Subramanian
34a491309f Delete v2 signalling (#3835)
* Delete v2 signalling

* deps

* mage generate

* deelte unused file
2025-08-06 09:08:09 +05:30
Raja Subramanian
5751692a2f deps (#3829) 2025-08-03 04:00:38 +05:30
Raja Subramanian
e3155b146b Get to the point of establishing subscriber peer connection. (#3821)
Proper message id checks.

Some refactoring for common code in rtcv2service handlers.

Instantiate signalling based on synchronous local candidates flag, but
needs better defined code.
2025-07-25 14:49:04 +05:30
Raja Subramanian
a7ce138239 HTTP DELETE of participant session (#3819) 2025-07-24 23:02:45 +05:30
Raja Subramanian
a75295fcd5 More v2 signalling changes (#3814)
* More v2 signalling changes

- Use wire message in relay signal
- Generate offerId for SDP for sync mode also
- more checks for SDP offer/answer state to see if there are cases of
  missed/duplicate messages

* clean up
2025-07-24 10:14:01 +05:30
Raja Subramanian
fffc2ac090 Use signalling utils from protocol (#3807)
* Use signalling utils from protocol

* staticcheck
2025-07-21 18:15:06 +05:30
Raja Subramanian
f5fc82d344 Filling out messages unlikely to change in v2. (#3806)
* Filling out messages unlikely to change in v2.

* deps

* remove defensive nil checks
2025-07-21 12:33:52 +05:30
Raja Subramanian
0a1bfd3092 Signal handling interfaces and participant specific HTTP PATCH. (#3804)
* HTTP PATCH on participant sid

* rename

* signal handler

* new files

* clean up

* clean up reassembly

* handle messages on server side

* deps

* staticcheck

* clean up
2025-07-20 22:47:36 +05:30
Raja Subramanian
078c01fad3 Signal v2: envelope and fragments as wire message format. (#3800)
* Signal v2: envelope and fragments as wire message format.

Please see details in https://github.com/livekit/protocol/pull/1133

* log connect response
2025-07-18 15:24:32 +05:30
Raja Subramanian
b9a44c3fbf Signalling V2 protocol implementation start (#3794)
* WIP

* name

* refactor validate

* WIP

* WIP

* signal cache initial impl

* HandleConnect in room manager

* generate subscriber offer

* handle ConnectRequest as stand alone

* segmentation, reassembly

* clean up

* rearrange

* lock scope

* support metadata in connect request

* prom

* add SifTrailer to ConnectResponse

* prom for get offer error counter

* RtcInit counter

* Jie feedback

* signal client

* consolidate v1 and v2 into SignalClient

* clean up

* comment

* deps

* mage generate

* fix tests

* pass around roomName and participantIdentity

* mage generate
2025-07-18 00:01:21 +05:30
Paul Wells
ba702a5323 forward agent id to job state (#3786)
* forward agent id to job state

* deps
2025-07-16 14:17:13 -07:00
Paul Wells
8197438e5f bounds check layer index (#3768)
* bounds check layer index

* tidy
2025-06-29 18:37:26 -07:00
renovate[bot]
cb4da5333a fix(deps): update module github.com/livekit/protocol to v1.39.3 (#3733)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-26 23:06:51 -07:00
Anunay Maheshwari
3783ebb320 feat(cli): update to urfave/cli/v3 (#3745)
* feat(cli): update to urfave/cli/v3

* fix(cli/v3): int/uint handling with reflection

* fix(cli/v3): better type convertion handling
2025-06-20 16:58:44 +05:30
Tobias Fried
8077426312 chore: set workerid on job creation (#3737)
* chore: set workerid on job creation

* chore: bump deps
2025-06-16 15:30:06 -06:00
Raja Subramanian
670f927ff6 Set and use rid/spatial layer in TrackInfo. (#3724)
* Set and use rid/spatial layer in TrackInfo.

* test
2025-06-12 23:22:11 -07:00
Raja Subramanian
a9e2911645 Add Id to SDP signalling messages. (#3722)
* Add Id to SDP signalling messages.

Allows matching up offer/answer.
For now, the subscriber answer just logs if there is a mismatch.

* correct variable name

* test

* fixing rid

* revert

* clean up
2025-06-12 14:39:25 -07:00
Raja Subramanian
ce07740e11 Add simulcast support for WHIP. (#3719)
* Add simulcast support for WHIP.

- General change to have rids be anything.
- One issue is rid ordering not matching quality ordering, will need
  some dynamic layer quality determination for that.

* clean up

* deps

* test
2025-06-11 19:40:38 -07:00
cnderrauber
fdf9b85290 e2e reliability for data channel (#3716)
* e2e reliability for data channel

* solve comments
2025-06-11 11:14:30 +08:00
Paul Wells
630aa7d970 implement observability for room metrics (#3712)
* implement observability for room metrics

* deps

* test

* test

* Raja feedback

* cleanup
2025-06-09 09:32:58 -07:00
Raja Subramanian
77f70b180b for real, pick up protocol change for webhooks queue length bucnkets (#3707) 2025-06-07 23:34:58 -07:00
Raja Subramanian
7b180646ec protocol dep for webhook stats buckets (#3706) 2025-06-07 10:10:45 -07:00
David Zhao
b0ab95baf7 warn about credentials when used in tokens (#3705)
* warn about credentials when used in tokens

* go mod update
2025-06-06 22:46:23 -07:00
Raja Subramanian
758e176250 Add a trend check before declaring joint queuing region. (#3701)
* Add a trend check before declaring joint queuing region.

Seeing cases where the propagated queuing delay drops from one group to
next. Both groups are above threhold. It also recovers majority of the
time. So, introducing a trend check before declaring that queuing delay
is in joint queuing region. It is set 0.8 by default which means the
queueing delay should be trending up strongly before being declared
joint queuing region.

* deps
2025-06-05 18:51:23 -07:00
Raja Subramanian
fc867c5b8e Webhook prom stats (#3697) 2025-06-04 14:31:28 -07:00
Raja Subramanian
1b760393bc WHIP support. (#3692)
* WHIP support.

WHIP like signalling with added support for data channels.

* clean up

* Paul feedback

* deps
2025-06-03 08:23:37 -07:00
cnderrauber
6b849a87e8 update mediatransportutil for sctp congestion control (#3673) 2025-05-19 21:19:46 +08:00
cnderrauber
83b189b0c5 Add ServerInfo to ReconnectResponse (#3671) 2025-05-19 10:32:39 +08:00
Paul Wells
13b55a80ad move agent token (#3669) 2025-05-15 10:30:14 -07:00