Skip to content

Conversation

@filipi87
Copy link
Contributor

@filipi87 filipi87 commented Oct 16, 2025

Pipecat client iOS SmallWebRTC 1.1.0 spec.

What is NOT included in this PR:

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

Both these items I will include in a follow up PR.

@filipi87 filipi87 marked this pull request as ready for review October 20, 2025 19:01
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 don't think any of my comments are blocking approval... i know that a lot of these changes were formatting, but even removing that, this was a surprisingly large PR! Nice work.


func showVideo() {
if self.localVideoTrack == nil {

Choose a reason for hiding this comment

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

this check not necessary since createLocalVideoTrack() also has it. If you want it to read less like "it will definitely make a track", you could rename it to maybeCreateLocalVideoTrack()

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 have pushed the fix for it in this follow up PR:

I don't think we need to release the version from this PR. We can wait to do a single release with the one I mentioned above.

public init(options: PipecatClientIOS.RTVIClientOptions, iceServers: [String]?) {
self.options = options

public init(iceServers: [String]?) {

Choose a reason for hiding this comment

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

in js, the constructor takes a set of params that are essentially the same as the connection params, but along with iceServers, but also waitForIceGathering and codecs. Should we replicate that 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.

I have pushed the fix for it in this follow up PR:

I don't think we need to release the version from this PR. We can wait to do a single release with the one I mentioned above.

// Enum for signalling messages
public enum SignallingMessage: String, Codable {
case renegotiate = "renegotiate"
/// Common protocol for all signalling messages

Choose a reason for hiding this comment

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

i'm going to have to trust you on this file, but out of curiosity... what drove these changes? Are these other messages all new since the last time we updated this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, we have changed it, but only the web SDK was handling these messages.

}

func handleTracksUpdated() {
guard let currentTracks = self.tracks() else {

Choose a reason for hiding this comment

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

doesn't self.tracks() always return something? or does this crazy syntax catch errors thrown?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the smallWebRTCConnection is not initialized yet, invoking self.tracks() may return nil.

The syntax above just makes sure that the method will only proceed if currentTracks is not nil.

return
}

if let previousTracks = self._tracks {

Choose a reason for hiding this comment

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

this line tells me i'll never be able to fluidly write swift syntax.

@filipi87 filipi87 merged commit ac76c99 into main Oct 22, 2025
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.

3 participants