DailyProvider
<DailyProvider callObject={callObject}>
The DailyProvider
gives every component in your application access to the Daily call object. It stores call state and initiates a call object instance.
This component allows for two modes: It can take either an existing call object or props to instantiate its own callObject instance.
We recommend utilizing useCallObject
to create your own call object instance.
Props
In existing call object mode:
Parameter | Required | Type | Description |
---|---|---|---|
callObject | ✓ | Object | Pre-initialized call object instance (instantiated via createCallObject() ) |
In call object creation mode:
Parameter | Required | Type |
---|---|---|
url | ✓ | string |
audioSource | string | MediaStreamTrack | boolean | |
videoSource | string | MediaStreamTrack | boolean | |
dailyConfig | Object | |
receiveSettings | Object | |
subscribeToTracksAutomatically | boolean | |
token | string | |
userName | string |
For full details on all the properties above, see the properties list.
Changing any of the props in call object creation mode will destroy the current instance and create a new one with the updated props.
Optional props
Parameter | Type | Description |
---|---|---|
jotaiStore | Object | store to be passed to Daily React's internal Jotai <Provider> . If you use Jotai in your app, this will store Daily React's internal state atoms in your Jotai store. |