Skip to content

Conversation

filipi87
Copy link
Contributor

Pipecat client iOS SmallWebRTC 1.1.1:

  • Trickle ice support
  • Allowing startBotAndConnect to work with Pipecat cloud and Pipecat runner

@filipi87 filipi87 marked this pull request as ready for review October 21, 2025 20:45
Copy link

@mattieruth mattieruth left a comment

Choose a reason for hiding this comment

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

i think this looks good except for the one rename and one question about validating the start bot return. i have to trust you on the ice candidate code.

}

private func createLocalAudioTrack() {
private func maybeLocalAudioTrack() {

Choose a reason for hiding this comment

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

Suggested change
private func maybeLocalAudioTrack() {
private func maybeCreateLocalAudioTrack() {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could swear I had renamed it like this. 😅 Nice catch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

return existingParams
}

guard let startBotResult = startBotResult as? SmallWebRTCStartBotResult else {

Choose a reason for hiding this comment

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

before we assume the startBotResult is bad because it doesn't match our built-in pipecat runner's return, should we add a check to make sure the startBotResult isn't already of type SmallWebRTCTransportConnectionParams?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We already have that, right in the three lines above this code. 🙂

Choose a reason for hiding this comment

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

doh. i see that now. because of the name existingParams and my non-existent swift experience, i thought those lines were checking for if ConnectionParams had been provided prior to startBot (i.e. if there were existing params).

So that makes me now think: Do we consider THAT scenario? On web, you can provide connection options in the constructor. Is that possible on iOS? Could someone have provided the connection options ahead of time and used startBot simply to kick off the bot, not requiring any return data from the endpoint and then fail here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We only allow providing the connection options inside the connect method.

So, in this case, they would need to invoke startBot and then call connect right after.

I think it’s fine to use it that way, instead of also allowing the connection options to be passed to the constructor.

@filipi87 filipi87 changed the base branch from v1.1.0 to main October 22, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants