PipecatClient
in a React Native application. The new client introduces simplified configuration and improved client-server messaging. For an overview of the changes, see the top-level RTVIClient Migration Guide.
Key Changes
As primarily a wrapper around the JavaScript SDK with a unique Transport, the
changes are the same as those in the JavaScript migration
guide with only the following transport-specific
updates. PLEASE REFER TO THE JAVASCRIPT MIGRATION GUIDE FOR FULL DETAILS.
1. Transport Configuration
Same as with the JavaScript transports, theRNDailyTransport
now accepts a constructor argument, allowing for providing a Daily configuration.
Old
2. Connection Methods
Again, same as with the JavaScript transport, you can provide a Daily configuration via one of the connection methods (connect()
or startBotAndConnect()
) on the PipecatClient
.
Old
startBotAndConnect()
):
- Direct Connection: Provide the connection details directly to
connect()
.
- Using startBot(): Fetch connection details from an API endpoint and pass them to
connect()
.
- Using startBotAndConnect(): Fetch connection details and connect in one step.
When using
startBotAndConnect()
, the response from your endpoint is passed directly to the transport and should match the Daily configuration type.