wrap()
wrap(iframe, {properties})
Compatibility:
Prebuilt
Custom
wrap() uses an already defined iframe DOM element for the DailyCall.
If you need complete control over the iframe, choose wrap() over createFrame().
You will need to set allow="microphone; camera; autoplay; display-capture"; on your iframe element to be able to turn on the camera and microphone, and to enable screen sharing.
Params
iframe: theiframeto be wrappedproperties: an object of iframe properties
The iframeStyle property cannot be passed to wrap(). It must be used with createFrame().
Return type
- An instance of the
DailyCall
Sample code
By default, only one call object instance is supported at a time and the constructor will throw an
Error if multiple are detected. Starting in daily-js 0.67.0, multiple instances are supported on an opt in basis. To opt-in, setallowMultipleCallInstances to true in your factory method's properties. and checkout this guide for more information.