Commit Graph
2643 Commits
Author SHA1 Message Date
Paul WellsandGitHub 35dda8ea43 swap pub/sub track metrics (#3717) 2025-06-10 11:27:34 -07:00
Raja SubramanianandGitHub 1d9a43667a Do not require create permission for WHIP participant. (#3715) 2025-06-09 22:19:00 -07:00
Raja SubramanianandGitHub e0aea17a06 Flush stats on close (#3713) 2025-06-09 09:33:34 -07:00
Paul WellsandGitHub 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 WellsandGitHub 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
David ZhaoandGitHub 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 SubramanianandGitHub a72ce30f50 Small changes to add/use helper functions for length checks. (#3704) 2025-06-06 18:00:10 -07:00
Denys SmirnovandGitHub 425f6bb3a9 Allow passing extra attributes to RTC endpoint. (#3693) 2025-06-06 14:40:06 +03:00
Raja SubramanianandGitHub 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 SubramanianandGitHub fc867c5b8e Webhook prom stats (#3697) 2025-06-04 14:31:28 -07:00
Denys SmirnovandGitHub 0e17916f15 Do not use Redis pipeline for SIP delete. Fixes Redis clustering support. (#3694) 2025-06-03 18:25:50 +03:00
Raja SubramanianandGitHub 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
Paul WellsandGitHub e4f7d81bdd add client ip to agent worker registration (#3675) 2025-05-20 07:58:28 -07:00
cnderrauberandGitHub 83b189b0c5 Add ServerInfo to ReconnectResponse (#3671) 2025-05-19 10:32:39 +08:00
Raja SubramanianandGitHub 5f87a35b7e Prevent operating on swapped out map. (#3670)
* Prevent operating on swapped out map.

* test
2025-05-17 17:02:41 +05:30
Paul WellsandGitHub 13b55a80ad move agent token (#3669) 2025-05-15 10:30:14 -07:00
Paul WellsandGitHub c9385edd1e handle agent worker jwt (#3668)
* handle agent worker jwt

* test

* tidy

* tidy

* deps
2025-05-15 08:23:10 -07:00
Raja SubramanianandGitHub 3b359d8b74 Use logger resolver reset to reset contexts. (#3665)
* Use logger resolver reset to reset contexts.

Also, avoid multi-resolve.

* resolver logger values once

* simplify
2025-05-14 21:12:12 +05:30
cnderrauberandGitHub dbb70e0f06 Fix dynacast quality for moving out tracks (#3664)
* Make sure moving out track has been unsubscribed

Remove start time checking in subscription manager
as We always use new track ID for republished track at #3020
so there is no race condition now.

Also RemoveSubscriber for moving out tracks for safety,
the subscription manager will handle the removed event but
RemoveSubscriber again will not be bad.

* Clear subscriber node max quality for moving out tracks
2025-05-14 12:54:33 +08:00
cnderrauberandGitHub 0a5f3c2ae6 resolve new room name logger earlier when moving participant (#3662) 2025-05-13 20:29:07 +08:00
Raja SubramanianandGitHub 2df0551762 Revert unbound transceiver stop. (#3661)
This is causing duplicate a=msid in testing. Will chase condition that
caused the addition of code to stop transceiver later.
2025-05-13 16:33:09 +05:30
Raja SubramanianandGitHub 5172af1526 ~Send initial participant update only after a participant becomes active.~ - General clean up (#3655)
* Send initial participant update only after a participant becomes active.

There are cases where apps send data to remote participant as soon as
client emits `ParticipantConnected`. But, that time point would not have
a fully established client (i. e. the media connection + data channel
establishment is still in progress).

This PR changes the initial participant update to be sent from server
side only when a participant becomes `ACTIVE`, i.e fully connected
(media channel established and data channels open).

It is supported for clients using protocol version > 15.

@cnderrauber bumping up the protocol version in this PR. Move support is
also conditioned on protocol version > 15, but that PR did not ump
protocol version. Please let me know if there are issues bumping
protocol version.

* check for joining states in broadcast

* have to check on other participant

* test

* make helper for sending participant updates

* test

* make utility of pushAndDeque

* test

* consolidate getting other participants

* remove extra cast

* debug

* debug

* typo

* stop transceiver that is not bound

* logs

* log

* check for ever bound

* clean up

* clean up
2025-05-13 14:46:35 +05:30
Raja SubramanianandGitHub 7f8e632330 Send self participant update immediately. (#3656)
* Send self participant update immediately.

Match with cloud. Send immediately for non-hidden participants also

* comment
2025-05-11 03:08:30 +05:30
Raja SubramanianandGitHub 116308780e Use unordered for lossy data channel. (#3653) 2025-05-09 23:09:27 +05:30
Paul WellsandGitHub aee34ffefa log request for agent dispatch api (#3650) 2025-05-08 08:43:43 -07:00
793b383a52 Add Moving participant to another room (#3648)
* Add Moving participant to another room

it is implemented in cloud only since the destination
room can exist in different node with the source room

* Update pkg/service/errors.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* rename

* test panic

* fake LocalParticipantHelper

* revert delete line

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-08 12:58:24 +08:00
Raja SubramanianandGitHub 2fff36cb35 Stub MoveParticipant so that cloud can include the latest protocol. (#3646) 2025-05-07 22:36:39 +05:30
Raja SubramanianandGitHub d4ab1142cb Redact address (#3643) 2025-05-06 09:51:30 +05:30
Raja SubramanianandGitHub 2f002388b6 Use participant close reason in remove. (#3639) 2025-05-05 11:50:53 +05:30
Raja SubramanianandGitHub 58822c26ab Include clientInfo in connectivity logs. (#3638)
Makes it easier for log based filtering.
2025-05-05 10:44:17 +05:30
Raja SubramanianandGitHub 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 SubramanianandGitHub 086704128c Limit buffer queue before Bind. (#3634)
* Limit buffer queue before Bind.

* more generic
2025-05-01 13:49:06 +05:30
Raja SubramanianandGitHub 9f5bc9b9b5 Avoid synthesising duplicate feature. (#3632) 2025-04-30 17:52:26 +05:30
cnderrauberandGitHub 847239c3f2 Disable vp9 for safari 18.4 (#3631)
* Disable vp9 for safari 18.4

safari 18.4's svc encoding is broken

* more flex on test timeout
2025-04-29 13:17:39 +08:00
Raja SubramanianandGitHub f69ab68045 Populate the sender identity when translating to user packet. (#3628) 2025-04-25 23:44:43 +05:30
Raja SubramanianandGitHub e14905581c Forward data between WHIP client and non-WHIP client (#3627)
* Forward data between WHIP client and non-WHIP client

* fix test
2025-04-25 23:20:08 +05:30
Raja SubramanianandGitHub 6739e7bcc8 Broadcast inside lock (#3626) 2025-04-25 12:21:30 +05:30
Raja SubramanianandGitHub f24152b4c0 Call Broadcast in lock scope. (#3625)
* Call Broadcast in lock scope.

Seems like there is a possible window where things can hang forever
if a goroutine enters the Wait) after the lock is released but before
Broadcast gets called, it will never see that broadcast and will hang forever.

* RLock
2025-04-25 12:12:10 +05:30
Raja SubramanianandGitHub b760918a0d Use logger from request context. (#3623)
That will have projectID and can potentially be used for project level
logging if we are able to pass around the project logger more.
2025-04-24 11:34:16 +05:30
Raja SubramanianandGitHub 34a2e2c107 Check for multiple layers for managed track. (#3622)
The previous check was checking only for simulcast and would have made a
screen share track published with multiple layers using SVC as
unmanaged.
2025-04-24 10:02:38 +05:30
Andrea LovicuandGitHub 4955ebe423 Forward transfer headers to internal request (#3615)
This patch ensures that SIP headers provided in TransferSIPParticipantRequest requested by an agent are correctly forwarded to the internal SIP transfer request.

Previously, req.Headers was accepted but never passed along, causing headers from the initiating agent to be dropped.

This change adds a single line to include req.Headers in the internal request.
2025-04-22 11:43:23 -07:00
Raja SubramanianandGitHub d9ee921445 Set up RTX for WHIP publish (#3619)
* Set up RTX for WHIP publish

* bail early on error
2025-04-22 23:12:41 +05:30
Raja SubramanianandGitHub d8cf54399f Determine TURN connection type and no fallback for TURN/TLS. (#3612) 2025-04-22 11:42:05 +05:30
Raja SubramanianandGitHub 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
Benjamin PrachtandGitHub 28dfac14e0 Use exported GetEgressNotifyOptions (#3604) 2025-04-11 09:45:27 -07:00
Raja SubramanianandGitHub 2130980d17 Add basic video support to WHIP. (#3602)
Tested with eyevinn client.

There are a few issues to figure out still
1. Simulcast - how?
2. For simulcast, how to know width, height so that adaptive stream can
   work.
3. The layer added is dummy. It works, but connection quality scoring
   would be incorrect (will always say excellent) without bitrate.

Will need some dynamic update of `TrackInfo` based on actual stream for
all of this to fit well into our system, but the simple video support
works for now.
2025-04-11 13:07:47 +05:30
Benjamin PrachtandGitHub e5cbb22777 Allow specifying extra webhooks with egress requests (#3597) 2025-04-09 16:20:21 -07:00
Raja SubramanianandGitHub 7e16106a0e Add OnSubscirberReady callback on LocalParticipant. (#3600)
Was setting the state to ACTIVE prematurely to enable the subscription
inter-lock in one shot signalling mode. But, that is incorrectly
changing state.

Use a callback to indicate subscriber ready and let the participant
ACTIVE happen when the connection actually establishes.
2025-04-09 15:02:27 +05:30
cnderrauberandGitHub 5c2d96b9d3 Check DestinationRoom of VideoGrant for participant forwarding (#3599) 2025-04-09 15:13:29 +08:00
Raja SubramanianandGitHub 2e236a193e Revert participant state ACTIVE change. (#3598)
Had made the change to align `participant active` to after the ICE
connection is done and that log could list all candidates.

But, with one shot signalling, the state change has to be early to wait
on (auto) subscriptions of track of other participant. So, state has to
be changed early.
2025-04-09 12:12:56 +05:30