Commit Graph
3272 Commits
Author SHA1 Message Date
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
Benjamin Pracht 1f31d430b0 Map ErrNoResponse to ErrRequestTimedOut in StopEgress to avoid returning 503 (#3788) 2025-07-14 13:30:24 -07:00
cnderrauber 51bbe8c52b Set participant active when peerconnection connected (#3790)
Don't wait datachannel ready (sctp handshake)
2025-07-14 10:59:59 +08:00
Raja Subramanian 40028dc33c Normalize known rids. (#3779)
Normalize the rids in SDP to known patterns.
Currently,
- LK protocol uses q;h;f
- Sean's OBS WHIP uses 0;1;2

As the ordering in SDP could be different, normalize to known order.

For RIDs not in the known set, just use it as is.
2025-07-06 13:32:21 +05:30
Raja Subramanian ddd923296b Return default layer for invalid rid + track info combination. (#3778) 2025-07-05 14:43:26 +05:30
cnderrauber 8c033ce9fe Enable H265 by default (#3773) 2025-07-01 14:58:09 +08:00
Raja Subramanian 7678e08701 Set rids for all codecs. (#3772)
Back up codecs will not have pending track. The update needs to happen
on published track.

Have added a note about updating in published track. Can happen when we
have separate layers for primary and backup.
2025-07-01 11:27:03 +05:30
Raja Subramanian 5d636acffb Limit taking rids from SDP only in WHIP path. (#3771)
Some clients are not sending q;h;f; ordering which affects layer/quality
mapping.
2025-07-01 08:20:20 +05:30
Raja Subramanian 4d09e5b564 Log SDP rids to understand the mapping better. (#3770)
* Log SDP rids to understand the mapping better.

* return early when layer is invalid
2025-06-30 09:21:44 +05:30
Raja Subramanian c69f1aae87 Revert "Temporary change: use pre-defined rids" (#3769)
* Revert "Temporary change: use pre-defined rids (#3767)"

This reverts commit d11da5f5fa.

* clean up

* add test and simplify

* clean up
2025-06-30 07:34:58 +05:30
Paul Wells 8197438e5f bounds check layer index (#3768)
* bounds check layer index

* tidy
2025-06-29 18:37:26 -07:00
Raja Subramanian d11da5f5fa Temporary change: use pre-defined rids (#3767)
To address a compatibility issue across relay. Will revert this once the
compatibility is addressed.
2025-06-29 20:00:21 +05:30
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 d6d2b6d833 feat(cli-flags): add option for cpu profiling (#3765) 2025-06-26 23:49:55 +05:30
Raja Subramanian 9fc4ddbe47 ClearAllReceivers interface is used to pause relay tracks. (#3761)
Restore interface.
2025-06-24 16:27:14 -07:00
Raja Subramanian 1216113b35 Do not need to just clean up receivers. Remove that interface. (#3760)
The tracks are always closed.
2025-06-24 12:54:34 -07:00
Raja Subramanian ef6c38cee5 Log previous allocation to see changes. (#3759) 2025-06-24 12:51:42 -07:00
Raja Subramanian 01bf96855d SVC with RID -> spatial layer mapping (#3754)
* SVC with RID -> spatial layer mapping

There are cases where an SVC track comes in with a RID.
As there is no RID announced in SDP, it maps to invalid layer.
Seems to happen with older browsers.

* test
2025-06-23 12:45:13 -07:00
Raja Subramanian c481396f5b offer could be nil when migrating. (#3752) 2025-06-23 09:04:16 -07:00
cnderrauber 8c2fc0bcd9 Fix svc encoding for chrome mobile on iOS (#3751)
The browser could send rtp packets of svc encoding without
DD extension while the sdp negotiates it, sfu detects extension
in rtp packet for this case.
2025-06-23 22:39:12 +08:00
David Colburn e467daa0d4 move egress roomID load to launcher (#3748)
* move egress roomID load to launcher

* regenerate
2025-06-20 16:22:19 -04: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
Pablo Fuente PérezandDavid Zhao 03d3fcab43 Fix data packet ParticipantIdentity override logic in participant.go (#3735)
* Fix data packet ParticipantIdentity override logic in participant.go

https://github.com/livekit/agents/issues/2554

* Update pkg/rtc/participant.go

---------

Co-authored-by: David Zhao <david@davidzhao.com>
2025-06-19 22:58:31 -07:00
Paul Wells 068b43660b reuse compiled client config scripts (#3743) 2025-06-19 14:31:59 -07:00
cnderrauber e754a86068 return error when moving egree/agent participant (#3741) 2025-06-18 15:10:08 +08:00
cnderrauber 7542cf0723 remove unused code (#3740) 2025-06-18 10:09:30 +08:00
Raja Subramanian 9d569e2fef Take ClientInfo from request. (#3738)
This will allow WHIP client to pass in client info which can provide
more information about WHIP clients for telemetry.
2025-06-16 21:01:15 -07:00
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 5549ab5562 Revert clearing RIDs. (#3732) 2025-06-13 23:34:01 -07:00
Raja Subramanian ae9673130f Clear rids if not present in SDP. (#3731) 2025-06-13 21:02:01 -07:00
Raja Subramanian 0e03390744 Return highest available layer if requested quality is higher than (#3729)
highest available quality.
2025-06-13 08:44:45 -07:00
cnderrauber 9ce737db31 Add log for dropping out of order reliable message (#3728) 2025-06-13 22:08:56 +08:00
cnderrauber 1b95e818c9 Don't check bindState on downtrack.Bind (#3726)
receiver can be ready before bind
2025-06-13 16:13:15 +08: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 4ec828ce00 Fix bug with SDP rid, clear only overflow. (#3723) 2025-06-12 14:04:13 -07:00
Raja Subramanian 8f6c3a9b4e Clear rids from default for layers not published. (#3721) 2025-06-12 08:59:16 -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
Raja Subramanian e98fb94fd2 Create client config manager in room manager constructor. (#3718)
* Create client config manager in room manager constructor.

Remove it from wire to be consistent with cloud which does hot reload.

* disable advanced codecs on iOS when using JS SDK
2025-06-10 21:06:49 -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 35dda8ea43 swap pub/sub track metrics (#3717) 2025-06-10 11:27:34 -07:00
Raja Subramanian 1d9a43667a Do not require create permission for WHIP participant. (#3715) 2025-06-09 22:19:00 -07:00
Raja Subramanian e0aea17a06 Flush stats on close (#3713) 2025-06-09 09:33:34 -07: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
Paul Wells e7f0294e3f remove unused ws signal read loop (#3709)
* remove unused ws signal read loop

fixes #3708

* tidy
2025-06-08 20:07:55 -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 a72ce30f50 Small changes to add/use helper functions for length checks. (#3704) 2025-06-06 18:00:10 -07:00