wrap()
wrap(iframe, {properties})
Compatibility:
Prebuilt
Custom
wrap()
uses an already defined iframe
DOM element for the DailyIframe
.
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 DailyIframe
to be able to turn on the camera and microphone, and to enable screen sharing.
Params
iframe
: theiframe
to 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
DailyIframe
Sample code
Only one call object instance is supported at a time. When re-joining a call, you can either re-use the existing call object instance or be sure to call
destroy()
on an existing one before creating a new one. Duplicate call object instances will result in a plethora of issues and loud warnings. Starting in daily-js
0.45.0, wrap()
throws an Error
if multiple call object instances are detected.