> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# meetingState()

> Returns the current meeting lifecycle state.

`meetingState()`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

This method is synchronous — it does not return a Promise.

## Return value

Returns a `DailyMeetingState` string:

* `'new'` — instance created, no activity yet
* `'loading'` — loading the Daily bundle
* `'loaded'` — bundle loaded, ready to join
* `'joining-meeting'` — [`join()`](/reference/daily-js/instance-methods/join) called, connection in progress
* `'joined-meeting'` — successfully joined the call
* `'left-meeting'` — left or ejected from the call
* `'error'` — a fatal error occurred; the connection is terminated but state is `'error'` rather than `'left-meeting'`

## Example

```javascript theme={null}
const state = call.meetingState();

if (state === 'joined-meeting') {
  console.log('In call');
} else if (state === 'error') {
  console.log('Fatal error — call terminated');
}
```

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [join()](/reference/daily-js/instance-methods/join)
    * [leave()](/reference/daily-js/instance-methods/leave)
    * [load()](/reference/daily-js/instance-methods/load)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [joining-meeting](/reference/daily-js/events/lifecycle-events#joining-meeting)
    * [joined-meeting](/reference/daily-js/events/lifecycle-events#joined-meeting)
    * [left-meeting](/reference/daily-js/events/lifecycle-events#left-meeting)
    * [error](/reference/daily-js/events/error-events#error)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Call lifecycle](/docs/daily-js/introduction#call-lifecycle)
  </Card>
</CardGroup>
