Commit Graph

802 Commits

Author SHA1 Message Date
Raja Subramanian a1f4e88edb Update protocol to latest, got bit by tag (#3641) 2025-05-05 16:56:30 +05:30
Raja Subramanian 8d3902af36 Protocol to pick up cgroups v2 memory path fix (#3640) 2025-05-05 16:22:07 +05:30
Raja Subramanian 6d6393a6e0 Take AudioFeatures from AddTrack. (#3635)
* Take AudioFeatures from AddTrack.

* use slices.Compact

* feedback

* remove early bail
2025-05-01 13:53:09 +05:30
Raja Subramanian d0d212fd13 Fix WHIP ICE restart. (#3616)
* Fix WHIP ICE restart.

Need to wait for candidates to be gathered.

Also, resettig ICE connection details on ice restart.

* deps
2025-04-18 01:31:56 +05:30
cnderrauber 5e7f8a1278 Update mediatransportutil for max sctp message (65K) (#3611) 2025-04-16 14:34:33 +08:00
Benjamin Pracht 28dfac14e0 Use exported GetEgressNotifyOptions (#3604) 2025-04-11 09:45:27 -07:00
Raja Subramanian 75236befcf protocol update to fix IPv6 SDP fragment parsing (#3603) 2025-04-11 20:29:08 +05:30
Benjamin Pracht e5cbb22777 Allow specifying extra webhooks with egress requests (#3597) 2025-04-09 16:20:21 -07:00
cnderrauber 5c2d96b9d3 Check DestinationRoom of VideoGrant for participant forwarding (#3599) 2025-04-09 15:13:29 +08:00
Raja Subramanian 35ac5f561a Add support for WHIP ICE Trickle/Restart. (#3596)
* Add support for WHIP ICE Trickle/Restart.

Tested a bit using the WHIP client at https://github.com/Eyevinn/whip,
but needs a lot more testing. ICERestart is not tested yet.

* comment

* clean up
2025-04-09 00:20:58 +05:30
Denys Smirnov ec2dff96a3 Fix SIP updates when replacing slices. (#3592) 2025-04-08 17:39:16 +03:00
Raja Subramanian e24fe77bc7 map PEER_CONNECTION_DISCONNECTED -> CONNECTION_TIMEOUT (#3591) 2025-04-08 00:00:10 +05:30
Raja Subramanian d7c410910f Exclude RED from enabled codecs for Flutter + 2.4.2 + Android. (#3587)
* Exclude RED from enabled codecs for Flutter + 2.4.2 + Android.

That causes client to get confused and generate invalid SDP.

Also make SDK version rule check based on semantic versioning compare.

* deps
2025-04-07 14:47:03 +05:30
Raja Subramanian ac8082fffb Use older SDP module to accommodate bad SDP. (#3578) 2025-04-05 12:55:39 +05:30
Raja Subramanian 1c8307c72c Use cgroup for memstats. (#3573)
* Use cgroup for memstats.

* deps
2025-04-05 11:54:36 +05:30
Raja Subramanian e9be0fca54 log SDP offer on error (#3577)
* log SDP offer on error

* use util
2025-04-05 02:07:00 +05:30
Raja Subramanian 3238ab8d77 Calculate rates for memory used and total. (#3570)
Calculating rate for total does seem odd, but keeping it consitent/lined
up with used memory calculation.
2025-04-02 10:23:38 +05:30
Anunay Maheshwari 52ce18d56e fix: revert recent changes to determine simulcast from sdp (#3565)
* Revert "Audio uses signal SignalCid and SdpCid. (#3564)"

This reverts commit cdfbb106d1.

* Revert "Keep simulcast information tied to receiver. (#3563)"

This reverts commit ed5e2f16b2.

* Revert "chore(logs): log VLS type for VP9/AV1 (#3561)"

This reverts commit ad010cfc43.

* Revert "fix(video): determine svc/simulcast from SDP for advanced codecs (#3549)"

This reverts commit 15f565510c.

* chore(deps): update protocol
2025-03-31 23:15:44 +05:30
Raja Subramanian ed5e2f16b2 Keep simulcast information tied to receiver. (#3563)
* Keep simulcast information tied to receiver.

`simulcast` flag in `TrackInfo` is at track lavel. With codec simulcast,
the primary codec (in most cases) is SVC and the backup codec is
simulcast. Back up codec publish changing the track info setting to true
meant that the primary receiver was treated as simulcast if a subscriber
for primary codec joined after the backup codec was published.

Keep track of simulcast flag in receiver.

Also, TrackInfo Cids are from signal. So, keep track of SDP cids
separately. The `simulcastTrackIds` map uses SDP cid. Clean up by all
the SDP cids of a track

* clean up

* clean up

* clean up

* clean up

* test

* Store SdpCid and IsSimulcast in Trackinfo

* clean up

* mock
2025-03-31 19:25:57 +05:30
Raja Subramanian 8cc17f8f8b Rework node stats a bit. (#3555)
* Rework node stats a bit.

Related protocol PR - https://github.com/livekit/protocol/pull/1023

- Make a config for node stats measurements. Wanted to put the config in
  `routing` package, but a circular dependency forced me to put in
   config.go
- Make rate calculations explicit, i. e. requested via config.
  Previously, it had some odd checks to decide when to calculate rate
  and it would have been calculating over different windows.
- Report signal/data channel bytes every 5 seconds to stats collection
  module. Previously, it was doing it every 30 seconds and that meant
  some windows could have had a large spike
  NOTE: Still need to think about this for load calculations as a large
  number of participants leaving could flush in a small window and that
  could report a large spike in bytes/packets. Maybe need to ignore
  signal bytes for load calculation?

* deps

* use default node stats config if given config is nil

* split out node stats into a struct for re-use

* update config
2025-03-27 12:42:19 +05:30
cnderrauber 2b6a46f402 Handle prefer_regression for backup codec (#3554) 2025-03-26 16:27:50 +08:00
Soungmin Son (Eddy) 97fcb82a77 Fix: Return NotFoundErr instead of Unavailable when the participant does not exist in UpdateParticipant. (#3543)
* Check if Participant exists when update metadata

* Change Test cases

* type smuggle oss participant check into roomstore

* tidy

---------

Co-authored-by: Paul Wells <paulwe@gmail.com>
2025-03-20 23:56:34 -07:00
Denys Smirnov 75d0e18e4a Implement SIP update API. (#3141) 2025-03-20 18:37:33 +02:00
Denys Smirnov 7f4c4597f1 Stubs for SIP update API. (#3533) 2025-03-19 14:58:40 +02:00
Raja Subramanian b3779a9086 WebHookConfig (#3517)
* default webhook config

* WebHookConfig

* fix test

* protocol with yaml tags
2025-03-11 13:49:29 +05:30
Raja Subramanian 9a7c944252 mediatransportutil update (#3511) 2025-03-10 21:28:03 +05:30
cnderrauber 139d1b139c Add ForwardParticipant method to room service (#3507)
It returns unimplemented error now.
2025-03-10 14:08:38 +08:00
Denys Smirnov 47896f50e3 Update protocol and IO service. (#3499) 2025-03-08 01:19:42 +05:30
dependabot[bot] 1dc42eef9c Bump github.com/go-jose/go-jose/v3 from 3.0.3 to 3.0.4 (#3497)
Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v3.0.3...v3.0.4)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 19:33:03 +05:30
renovate[bot] 30786aef4d Update module github.com/livekit/protocol to v1.34.0 (#3460)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-01 01:51:19 -06:00
cnderrauber 900da73e6d Add ice candidates logs for failed peerconnection (#3473) 2025-02-27 14:47:28 +08:00
Denys Smirnov 60a09cb4be Implement SIP iterators. (#3332) 2025-02-20 13:13:21 +02:00
Paul Wells f49103a003 add participant job type (#3443)
* add participant job type

* cleanup

* deps
2025-02-18 00:40:56 -08:00
cnderrauber b2a54729f5 Don't drop message if calculate duration is too small (#3442)
* Don't drop message if calculate duration is too small

* fix test
2025-02-18 14:41:41 +08:00
Raja Subramanian 1ae2e48c2e Webhook analytics event. (#3423)
* Webhook analytics event.

* deps

* generate

* nil notifier
2025-02-13 10:39:45 +05:30
Raja Subramanian 99afbf587b Use a Twirp server hook to send API call details to telemetry. (#3401)
* Use a Twirp server hook to send API call details to telemetry.

* mage generate and clean up

* Add project_id

* deps

* - Redact requests
- Do not store responses
- Extract top level fields room_name, room_id, participant_identity,
  participant_id, track_id as appropriate
- Store status as int

* deps
2025-02-07 16:16:41 +05:30
renovate[bot] 7ebe528792 fix(deps): update go deps (#3341)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 01:42:05 -06:00
Denys Smirnov ccbc988824 Pass error details and timeouts. (#3402) 2025-02-06 13:53:44 +02:00
cnderrauber aeec75edeb H265 supoort and codec regression (#3358)
* H265 supoort and codec regression

Support H265 codec.
Add optional codec regression for subscribers don't
support advanced codecs like H265, AV1, VP9.

* restart forwarder on upstream codec change

* tests

* Reneogitate new codec if client doesn't support change

* Add option to disable codec regression

---------

Co-authored-by: boks1971 <raja.gobi@tutanota.com>
2025-02-06 11:56:49 +08:00
Raja Subramanian 14e65f1459 AnalyticsEvent for generic reports (#3400)
* AnalyticsEvent for generic reports

* deps
2025-02-05 10:13:43 +05:30
renovate[bot] eb2b7a2271 fix(deps): update livekit deps (#3392)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-02 22:54:36 -06:00
Raja Subramanian db75092aa6 Use nonce in data messages to de-dupe SendData API. (#3366)
* Use nonce in data messages to de-dupe SendData API.

With API retries, it is possible that some data messages are sent
multiple times. Check the nonce (if present) to de-dupe data messages
before forwarding it to the clients.

* add nonce to UserPacket

* defer unlock

* 128-bit UUID as nonce

* - UUID nonce
- make a UserPacketDeduper module for easier re-use.

* deps

* feedback
2025-01-27 15:35:37 +05:30
Raja Subramanian 524441446f Room creation time with ms resolution (#3362) 2025-01-23 09:42:30 +05:30
Raja Subramanian b4cf055c1c Resolve newer participant using higher precision join time. (#3360)
* Resolve newer participant using higher precision join time.

Also, keep it consistent based on participant SID if everything else is
the same.

* switch to compare semantics

* fix
2025-01-22 15:24:34 +05:30
Raja Subramanian eca6ffa9e2 Update pion/webrtc to pick up data channel detach unlock change. (#3342) 2025-01-17 10:22:56 +05:30
renovate[bot] 9c462aef08 Update pion deps (#3242)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 12:10:25 -06:00
renovate[bot] 24361768a1 Update module google.golang.org/protobuf to v1.36.3 (#3315)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 16:26:27 -06:00
renovate[bot] 8c62f9b2fa Update module github.com/livekit/protocol to v1.31.0 (#3314)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-15 00:54:29 -06:00
Raja Subramanian 53d300ba71 Use nano time for easier (and hopefully) faster checks/calculations. (#3323) 2025-01-12 00:56:46 +05:30
David Zhao ca767a988e bump to v1.8.2 (#3310) 2025-01-06 19:55:24 -08:00