-
Notifications
You must be signed in to change notification settings - Fork 2
Pipecat client iOS SmallWebRTC 1.1.1 #4
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.
} | ||
|
||
private func createLocalAudioTrack() { | ||
private func maybeLocalAudioTrack() { |
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.
private func maybeLocalAudioTrack() { | |
private func maybeCreateLocalAudioTrack() { |
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 could swear I had renamed it like this. 😅 Nice catch.
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.
Done.
return existingParams | ||
} | ||
|
||
guard let startBotResult = startBotResult as? SmallWebRTCStartBotResult 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.
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
?
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.
We already have that, right in the three lines above this code. 🙂
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.
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?
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.
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.
…nner, and adding trickle ice support.
Pipecat client iOS SmallWebRTC 1.1.1: