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.
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 |
---|---|---|
recoilRootProps | Object | RecoilRootProps to be passed to Daily React's internal <RecoilRoot> . More details in Recoil Docs |