leave()

leave()

Compatibility:
Prebuilt
Custom

Leaves the meeting. If there is no meeting, this method does nothing.

Return type

  • Promise that resolves to an undefined

Error type

If leave() fails to emit, daily-js logs a message to the console "could not emit 'left-meeting'".

Sample code

Daily Prebuilt comes with a built-in UI for leaving calls. Set the showLeaveButton iframe property to true to use it.