Skip to content

v2 api#1155

Merged
frostbyte73 merged 14 commits intomainfrom
v2
Mar 25, 2026
Merged

v2 api#1155
frostbyte73 merged 14 commits intomainfrom
v2

Conversation

@frostbyte73
Copy link
Copy Markdown
Member

@frostbyte73 frostbyte73 commented Mar 20, 2026

@frostbyte73 frostbyte73 marked this pull request as ready for review March 25, 2026 07:25
@frostbyte73 frostbyte73 requested a review from a team as a code owner March 25, 2026 07:25
@frostbyte73 frostbyte73 marked this pull request as draft March 25, 2026 07:34
@frostbyte73 frostbyte73 marked this pull request as ready for review March 25, 2026 12:12
@frostbyte73 frostbyte73 merged commit 759158f into main Mar 25, 2026
16 checks passed
@frostbyte73 frostbyte73 deleted the v2 branch March 25, 2026 17:43
Comment thread pkg/config/output.go
Comment thread pkg/config/pipeline.go

// TemplateUsesSDKSource reports whether a template source request will use
// the SDK source (no Chrome/Pulse) instead of Web.
// Same heuristic as RoomCompositeUsesSDKSource.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's worth reducing repetition by having something like:

  type sdkSourceCompatibilityChecker interface {
      GetLayout() string           
      GetAudioOnly() bool                                                                                           
      GetCustomBaseUrl() string
  }                                                                                                                 
                  
  func UsesSDKSource(req sdkSourceCompatibilityChecker) bool {
      return req.GetLayout() == "" && req.GetAudioOnly() && req.GetCustomBaseUrl() == ""                            
  }                                                                                     

Both proto types already have the generated Get methods, so this works with zero changes to the proto. ThenRoomCompositeUsesSDKSource and TemplateUsesSDKSource both become UsesSDKSource(req)?

Comment thread pkg/config/pipeline.go
Comment thread pkg/pipeline/source/sdk.go
alreadySubscribed++
continue // Already subscribed via onTrackPublished
}
if err := s.subscribe(pub); err != nil {
Copy link
Copy Markdown
Contributor

@milos-lk milos-lk Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a race possibility - we are subscribing to the track before the result channel is installed. If the subscription is fast enough and finishes the round trip (and gets onSubscribed callback) before we get to the startAwaitingTracks line - the result channel will be nil and the startup will silently miss both success or failure?

}
}

s.completeInit()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason awaitMediaTracks() doesn't wait for all currently matched initial subscriptions here (or the 3s soft timeout)? awaitExpected() keeps consuming results until it reaches the expected count, but this path completes init after a single receive, which seems to let startup proceed while other requested media tracks are still in flight. That would make later successes post-init dynamic adds and later failures non-startup-fatal. Looks like behavior change.

Comment thread pkg/config/pipeline.go
Comment thread pkg/info/io.go
logger.Infow("io connection restored", "egressID", u.info.EgressId)
}
requestType, outputType := egress.GetTypes(u.info.Request)
var typesInput interface{} = u.info.Request
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: any

next := b.nextChannel
b.nextChannel++
return next%2 + 1
if b.nextChannel == livekit.AudioChannel_AUDIO_CHANNEL_LEFT {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very simple and makes it much easier to read 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants