voicebot-react-native-expo
Version:
This is a voicebot-react-native package of Kipps AI voice bot for React Native Expo
33 lines (31 loc) • 1.02 kB
JavaScript
import { LKFeatureContext, RoomContext, useLiveKitRoom } from '@livekit/components-react';
import * as React from 'react';
/** @public */
/**
* The `LiveKitRoom` component provides the room context to all its child components.
* It is generally the starting point of your LiveKit app and the root of the LiveKit component tree.
* It provides the room state as a React context to all child components, so you don't have to pass it yourself.
*
* @example
* ```tsx
* <LiveKitRoom
* token='<livekit-token>'
* serverUrl='<url-to-livekit-server>'
* connect={true}
* >
* ...
* </LiveKitRoom>
* ```
* @public
*/
export function LiveKitRoom(props) {
const {
room
} = useLiveKitRoom(props);
return /*#__PURE__*/React.createElement(React.Fragment, null, room && /*#__PURE__*/React.createElement(RoomContext.Provider, {
value: room
}, /*#__PURE__*/React.createElement(LKFeatureContext.Provider, {
value: props.featureFlags
}, props.children)));
}
//# sourceMappingURL=LiveKitRoom.js.map