Is this a bug? .destroy() never resolves if called inside left-meeting event handler
(originally posted by frankie567 on Github)
Expected behavior
Inside a left-meeting
event handler, I want to be able to call .destroy()
so that the resources and the iframe are destroyed after the participant has left.
Describe the bug (unexpected behavior)
When calling .destroy()
, the promise is never resolved, and the resources and iframe are not destroyed.
Steps to reproduce
CodeSandbox reproducing the issue
const callIFrame = DailyIframe.createFrame({ iframeStyle: { position: "fixed", top: "0px", left: "0px", width: "100%", height: "100%" }, showLeaveButton: true, activeSpeakerMode: false }); callIFrame.join({ url: "XXX" }); callIFrame.on("left-meeting", () => { console.log("Call destroy..."); callIFrame.destroy().then(() => { console.log("Destroyed!"); // Never reached }); });
Screenshots
N/A
System information
- Device: MacBook Pro M1
- OS, version: macOS 12.4
- Browser, version: Google Chrome 101
@daily-co/daily-js
: 0.26.0
Additional context
- It was working well in version
@daily-co/daily-js 0.22.0
. - I suspect it was introduced by this change:
dff9d8259d819e90c49be398b6edd02f2fa0ddef
Tagged:
0
Comments
-
Here's some new info on this issue:
- Our engineers have confirmed that it is a bug and have added it to their queue to address.
- Once it is fixed, I will post another update here.
If you have any questions about this in the meantime, let me know!
0