How to get the IFrame from dailycall?
# support
b
Is it possible to get access to the dailyCall iframe? Right now its being set to null I'm wondering if its a daily.co issue or related to vapi
I tried this but the call fails
Copy code
this.call = await DailyIframe.createFrame({
                layoutConfig: {
                    grid: {
                        minTilesPerPage: 3, // default: 1, minimum required: 1
                        maxTilesPerPage: 36, // default: 25, maximum allowable: 49
                    },
                },
                iframeStyle: {
                    position: 'fixed',
                    border: '1px solid black',
                    width: '100%',
                    height: '100%',
                    right: '1em',
                    bottom: '1em',
                },
                showFullscreenButton: true,
                showLeaveButton: true,
                startVideoOff: true,
                audioSource: this.dailyCallObject.audioSource ?? true,
                videoSource: this.dailyCallObject.videoSource ?? isVideoRecordingEnabled,
                dailyConfig: this.dailyCallConfig,
            });
v
@buytslacalls_ To assist you with the issue regarding the
dailyCall
iframe being set to
null
, I would need a bit more information about how you're integrating with daily.co and VAPI. It's possible that the issue could be on either side or even related to how they are being used together. If you're encountering this issue during the integration process, it could be due to a variety of reasons such as cross-origin restrictions, incorrect setup, or a bug in the implementation. To better understand the problem, could you please provide more details on the following: 1. The specific steps you're taking when you encounter the
null
iframe. 2. Any error messages or console logs that you're receiving. 3. The context in which the
dailyCall
iframe is being used within your application. With more context, I can provide more targeted assistance or guide you on how to resolve the issue. If this is a technical issue that requires immediate support, you might want to reach out to daily.co's support or VAPI's support for more detailed troubleshooting.
You can continue this conversation by mentioning me in the message.
b
just trying to use vapi.tsx and access the iframe
@User i tried to click "ask for help" but it says "This interaction failed"
@Shubham Bajaj
s
@buytslacalls_ The Vapi Web SDK abstracts the underlying Daily iframe, so direct access isn't provided. For more control over the daily iframe, consider using the daily javaScript library directly.
example
1. Install the Daily JS Library Add the Daily javaScript library to your project using npm:
Copy code
bash
npm install @daily-co/daily-js
2. Import and Initialize Daily In your JavaScript file, import the Daily.co library and create a call frame:
Copy code
javascript
import DailyIframe from '@daily-co/daily-js';
const callFrame = DailyIframe.createFrame({
  // Configuration options
});
3. Manage the Call Frame Use the
callFrame
object to control the video call, such as joining a room:
Copy code
javascript
callFrame.join({ url: 'https://your-domain.daily.co/your-room' });
Do let me know if you require anything else.
b
@Shubham Bajaj thanks! I appreciate this a lot. How would i ensure the vapi listener is in the call frame and stuff though? cuz if i use the VAPI sdk and i create my own call frame - wouldnt it put the same person in the room twice?
s
@buytslacalls_ Honestly, I haven't tried it out myself, so you'll need to use trial and error to get as close as possible to the solution. If you need help with anything specific, feel free to ping me.