-
Couldn't load subscription status.
- Fork 2
Pipecat client iOS SmallWebRTC 1.1.0 spec. #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| func showVideo() { | ||
| if self.localVideoTrack == nil { |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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]?) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.

Pipecat client iOS SmallWebRTC 1.1.0 spec.
What is NOT included in this PR:
startBotAndConnectto work with Pipecat cloud and Pipecat runner.Both these items I will include in a follow up PR.