Commit Graph

1472 Commits

Author SHA1 Message Date
David Chen 5edf2ce93f rename for clarity 2026-03-12 15:48:10 -07:00
David Chen ad864ba015 add stripping of user timestamp trailer in SFU for older subscriber SDK versions 2026-03-12 15:48:08 -07:00
Raja Subramanian 7323ad02b7 Sample data send error logging. (#4358)
There are cases where data channel is not created potentially and
logging on every one of those errors is verbose.
2026-03-12 12:02:18 +05:30
Raja Subramanian 0d34e45572 Add option to not re-use transceiver in e2ee. (#4356) 2026-03-11 17:41:13 +05:30
cnderrauber 95225ff2e1 don't require media section for dual peerconnection mode (#4354) 2026-03-09 20:56:55 +08:00
Milos Pesic b34b047247 Add StopEgress function to the EgressLauncher interface (#4353)
This allows for abstracting away how the stop is implemented - default implementation stays the same - the existing OSS egress launcher just calls the existing Stop method on the client.
2026-03-09 13:17:05 +01:00
Raja Subramanian db1a804696 defensive check for peer connection instance (#4350) 2026-03-08 08:34:53 +05:30
cnderrauber caa47522fb Add option to require media sections when participant joining (#4347)
Negotiate media tracks at first sdp round
2026-03-06 03:59:00 +08:00
Raja Subramanian 516aeabf45 Use ParticipantTelemetryListener of LocalParticipant. (#4342)
Had made a change in remote participant case to not have telemetry
listener as telemetry does not apply to remote participant. But, that
listener ended up getting used for subscriber and became a null
listener. Use the listener of the subscriber participant for subscribed
tracks.
2026-03-05 11:24:48 +05:30
cnderrauber b35105656c Exclude ice restart case from offer answer id mismatch warning (#4341) 2026-03-05 13:05:37 +08:00
cnderrauber 9d418689c6 Send participant left event after track unpublished for moved (#4334)
participant
2026-02-25 13:22:33 +08:00
Raja Subramanian b81bac0ec3 Key telemetry stats worker using combination of roomID, participantID (#4323)
Test / test (push) Failing after 17s
Release to Docker / docker (push) Failing after 3m42s
* Key telemetry stats work using combination of roomID, participantID

With forwarded participant, the same participantID can existing in two
rooms.

NOTE: This does not yet allow a participant session to report its
events/track stats into multiple rooms. That would require regitering
multiple listeners (from rooms a participant is forwarded to).

* missed file

* data channel stats

* PR comments + pass in room name so that telemetry events have proper room name also
2026-02-16 13:56:13 +05:30
Raja Subramanian a9b8d40de4 Publish is always on publisher peer connection. (#4307) 2026-02-10 13:43:30 +05:30
Raja Subramanian 195b17f62f Populate client_protocol field in ParticipantInfo (#4293) 2026-02-06 00:34:56 +05:30
Raja Subramanian f3e9b68854 Do not increase max expected layer on track info update. (#4285)
* Do not increase max expected layer on track info update.

When max expected layer increases, the corresponding trackers are reset
so that first packets from those layers can trigger a layer detected
change enabling quick detection of layer start.

A track info update changing max to what is in track info could set the
max expected to be higher without resetting the tracker. And that would
cause dynacast induced max layer change to miss tracker reset too.

Sequence
- dynacast sets max expected to 0
- track info update sets it to 2
- dynacast sets it to 1 --> this should have reset tracker on layer 1,
  but because it is less than current max (2), it is skipped.

* thank you CodeRabbit

* force update on start
2026-02-04 12:19:41 +05:30
Raja Subramanian d2bae34d53 refresh telemetry guard on participant move (#4280) 2026-02-03 15:34:16 +05:30
Raja Subramanian d1bab17b76 Add session duration and participant kind to closing log. (#4277)
To allow using "participant closing" log entry for calculating things
like session duration by paricipant kind or some other client SDK based
attribute.
2026-02-03 07:07:24 +05:30
Raja Subramanian 1e689e1a24 Reducing some info level logs. (#4274)
* Reducing some info level logs.

Also, relaxing the check for runaway RTCP receiver report to allow for
rollover to catch up if it is not too far away.

* set logger
2026-02-02 10:54:03 +05:30
Paul Wells 700e1788f2 require participant broadcast when metadata/attributes are set in token (#4266) 2026-01-26 14:22:30 -08:00
cnderrauber b61799ecd8 Ignore parse addr error when add remote candidate (#4264) 2026-01-26 14:37:02 +08:00
Anunay Maheshwari 0c33b8c671 chore: move codecs/mime stuff to protocol (#4255) 2026-01-20 20:54:32 +05:30
Raja Subramanian f867550716 Do not remove participant from cache on disconnect. (#4241)
Resuming participants need to know about participants disconnected
during resume.

Reverts https://github.com/livekit/livekit/pull/4234
2026-01-14 20:18:58 +05:30
Raja Subramanian a35a6ae751 Add participant option for data track auto-subscribe. (#4240)
* Add participant option for data track auto-subscribe.

Default disabled.

* protocol update to use data track auto subscribe setting

* deps
2026-01-14 13:22:43 +05:30
Raja Subramanian a05690d2b2 Changing field naming of data track packet (#4235)
S, F -> Start, Final of frame

changed from

F, L -> First, Last of frame as `F` could be interpreted as `Final`
also.
2026-01-13 09:42:53 +05:30
Raja Subramanian c40150085a Clear participant version cache on disconnect (#4234)
* debug participant update

* more debug

* context logger

* log participant info

* more logging

* clear participant cache on disconnect

* clean up

* clean up
2026-01-13 09:36:09 +05:30
Raja Subramanian ac20ccda53 Log timeout in API. (#4231)
* Log timeout in API.

* make a reset function
2026-01-12 11:22:39 +05:30
Raja Subramanian 541a7d6c5b Change some logs to debugw (#4229) 2026-01-09 16:11:54 +05:30
Raja Subramanian dafdc36e3e Add option to force simuclast codec. (#4226) 2026-01-08 02:13:03 +05:30
Raja Subramanian 335f4c33fb Swap result sink atomically rather than closing and setting. (#4216)
To prevent WriteMessage after Close potentially.
2026-01-03 03:17:58 +05:30
Raja Subramanian 08ac4ecdc5 Support preserving external supplied time. (#4212)
In some paths, it is better to preserve pre-recorded time. So, make the
base implementations preserve the RTCP Sender Report receive time.

Also, add a method to enable forwarding packet arrival time. Could be
used across relay.
2025-12-31 14:41:59 +05:30
cnderrauber f6efccce25 report video size from media data for whip (#4211) 2025-12-31 15:52:10 +08:00
Raja Subramanian 08793bea89 Use active at time to check for track not bound timeout. (#4206) 2025-12-29 20:32:08 +05:30
Raja Subramanian 3606ce542f Do not warn about track not bound if participant is not ready. (#4205)
Analysed half a dozen cases and all of them were due to participant is
not active yet.

Also, some misc logging changes.
2025-12-29 18:16:11 +05:30
Raja Subramanian b8ddd0f98c Taking interface{} -> any modernize bits (#4204) 2025-12-28 05:22:12 +05:30
Raja Subramanian bb00c86489 Restart API on receiver. (#4200)
Can be used when track moves forward/backward.
2025-12-27 03:42:23 +05:30
Raja Subramanian 2510b9462e Taking a bunch of go modernize suggestions. (#4194)
This is not all of it as it is not possible (or at least I do not know
of a way) to get all suggestions for a repo/project. Did this via loop
searching mainly and taking the modernize suggestions.
2025-12-25 16:55:58 +05:30
Raja Subramanian ed8e6afcd7 Handle repair SSRC of simulcast tracks during migration. (#4193)
* Handle repair SSRC of simulcast tracks during migration.

* fix

* fix comment
2025-12-25 14:45:48 +05:30
Raja Subramanian 8b0efb8c89 Resolve RTX pair via OnTrack also. (#4190)
* Resolve RTX pair via OnTrack also.

In simulcast probing path, the interceptor chain is not invoked
for primary stream. Not sure if this is a recent change. Due to this,
the RTX pair does not get resolved.

Use the onTrack callback to resolve the pair.

* remove debug
2025-12-24 15:27:13 +05:30
Raja Subramanian 7c8ea11505 Refactor receiver and buffer into Base and higher layer. (#4185)
* Refactor receiver and buffer into Base and higher layer.

To be able to share code/functionality with relay.

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* clean up

* deps

* fix test

* fix test
2025-12-23 21:35:48 +05:30
Raja Subramanian 1df1316b85 Move OnDataTrackMessage to participant listener to support replay. (#4178) 2025-12-19 13:08:44 +05:30
Raja Subramanian e7601251bc Make data message naming a bit more consistent. (#4177)
* Make data message naming a bit more consistent.

OnDataPacket and OnDataMessage half-way in the chain made it confusing
(for me at least). Use same name throughout.
API still uses SendDataPacket, but that is not harder to read.

* test
2025-12-19 12:09:16 +05:30
Raja Subramanian a04e566dbf Use published track for model access in data down track. (#4176)
* Use published track for model access in data down track.

No need to pass in the model.

* implementation type assertion

* remove redundant log key

* one more type

* Close interface method

* clean up redundant log key

* remove unused method

* some interface changes to support data tracks in replay

* correct mock signature
2025-12-19 11:00:18 +05:30
Raja Subramanian cbb2c61787 Publish/Unpublish counter match. (#4173)
Published counter was bumped up only when not migrating in, but it was
decremented when a migrating participant leaves without expectation to
resume. That could have resulted in negative counts.

Always change counters irrespective of migration or expected to resume
on leave. Control events send based on migration/resume.
2025-12-18 10:16:27 +05:30
Raja Subramanian 5c841b8ea1 Some logging changes. (#4168)
* Some logging changes.

Trying to chase a case of large sequence number gap on subscriber side
where packets are sent after a long time.

* return values instead of logging
2025-12-17 18:05:29 +05:30
Raja Subramanian 5964efbba5 Ensure subscribe data track handles are unique (#4162) 2025-12-16 13:52:05 +05:30
Raja Subramanian a26c48304a Add support for RTP stream restart. (#4161)
* Add support for RTP stream restart.

When an unhandled packet is encountered, try a restart sequence.
Restart happens when 5 packets with contiguous sequence numbers and same
or increasing time stamps are received. Note that this does not work for
B-frame type of scenarios, but that is true for receive path handling
even before this. As WebRTC does not use B-frames, it is fine. But,
needs to be looked at again if B-frames are necessary.

It is controlled by a config that is disabled by default.

* clean up

* debug log
2025-12-16 13:21:39 +05:30
Raja Subramanian 386f0b3822 fix typo in clearing index when removing track from room track manager (#4158) 2025-12-14 19:57:39 +05:30
Paul Wells 0abfb2515c deregister observability function when participant is closed (#4157)
* deregister observability function when participant is closed

* tidy
2025-12-14 04:21:07 -08:00
Raja Subramanian 2317c29531 Fix panic while removing track from room track manager. (#4153)
Cannot range and use `slices.Delete` in the loop.
2025-12-12 14:19:18 +05:30
Raja Subramanian a0a28ac5e3 Avoid duplicate track add to room track manager. (#4152)
* Avoid duplicate track add to room track manager.

Don't have proof that this happens, but in the leak chase, this is
another component at room level and holds references to tracks. Guessing
this is not cleaning tracks till room is closed.

* add a report
2025-12-12 12:42:04 +05:30