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:

ParameterRequiredTypeDescription
callObjectObjectPre-initialized call object instance (instantiated via createCallObject())

In call object creation mode:

ParameterRequiredType
urlstring
audioSourcestring | MediaStreamTrack | boolean
videoSourcestring | MediaStreamTrack | boolean
dailyConfigObject
receiveSettingsObject
subscribeToTracksAutomaticallyboolean
tokenstring
userNamestring

For full details on all the properties above, see the properties list

Optional props

ParameterTypeDescription
recoilRootPropsObjectRecoilRootProps to be passed to Daily React's internal <RecoilRoot>. More details in Recoil Docs

Sample code

Store Daily React's state in your own RecoilRoot