Skip to main content
You need a Daily account and a room URL to complete this guide. Create a free account at daily.co and create a room from the dashboard to get a URL in the format https://your-domain.daily.co/room-name.

Choose your integration mode

daily-js supports two integration modes. Pick the one that fits your use case:
  • Iframe mode — Daily renders a full-featured call UI (participant tiles, controls, chat) inside an <iframe>. Minimal code required.
  • Call object mode — Daily handles media with no built-in UI. You build the interface entirely yourself.
1

Install the package

Add @daily-co/daily-js to your project:
2

Create a call frame

Import DailyIframe and call createFrame(). This creates an <iframe> element and appends it to document.body by default.
To mount the iframe inside a specific container instead of document.body, pass the element as the first argument:
You can also pass style options:
3

Join a room

Call join() with your room URL. This returns a promise that resolves once you have entered the meeting.
4

Listen for events

Subscribe to call events using .on(). The joined-meeting event fires once you are connected and includes the current participants.
5

Leave the call

Call leave() to disconnect. Optionally call destroy() afterward to remove the iframe from the DOM and clean up all event listeners.

Complete example

A complete call object mode integration. Drop these three files into a project, open index.html, and you have a working video call.

Next steps

Installation

All install methods: npm, yarn, pnpm, and CDN script tag

Call modes

Deep-dive into iframe vs. call object mode trade-offs

Events reference

Full list of events and their payloads

API reference

Complete method and property reference