From aa818cdf85dcf59cee347307a7267b9ffcd11e84 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 10 Jul 2023 13:20:08 +0100 Subject: [PATCH] Add commented-out waitForIFrameLoad option to Element Call widget (#11208) As hopefully all explained in comment. --- src/models/Call.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/models/Call.ts b/src/models/Call.ts index f7b7fbb495..c87f0e6f8e 100644 --- a/src/models/Call.ts +++ b/src/models/Call.ts @@ -689,6 +689,13 @@ export class ElementCall extends Call { name: "Element Call", type: MatrixWidgetType.Custom, url: url.toString(), + // This option makes the widget API wait for the 'contentLoaded' event instead + // of waiting for a 'load' event from the iframe, which means the widget code isn't + // racing to set up its listener before the 'load' event is fired. EC sends this event + // of of https://github.com/matrix-org/matrix-js-sdk/pull/3556 so we should uncomment + // the line below once we've made both livekit and full-mesh releases that include that + // PR, and everything will be less racy. + //waitForIframeLoad: false, }, groupCall.room.roomId, ),