aboutsummaryrefslogtreecommitdiff
path: root/app/features
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <s@saghul.net>2023-11-24 09:38:42 +0100
committerSaúl Ibarra Corretgé <s@saghul.net>2023-11-24 09:59:42 +0100
commit5cbdc3238494524f7941045ff84816fbb5cfdbd2 (patch)
tree4a75c7073d8fae1a5b6d2cd2019924bdf1c63657 /app/features
parent22adc4b5890ff966e5136c09fb45cfca2d5817a5 (diff)
fix(conference) fix not loading with older server versions
Use an iframe event which is fired really early to detect if the iframe was loaded. Incidentally the logic to detect if the iframe was actually loaded gets simplified now, since the only way for the event to be received is for the iframe to be loaded. Fixes: https://github.com/jitsi/jitsi-meet-electron/issues/929
Diffstat (limited to 'app/features')
-rw-r--r--app/features/conference/components/Conference.js25
1 files changed, 5 insertions, 20 deletions
diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js
index df60e46..9e45d34 100644
--- a/app/features/conference/components/Conference.js
+++ b/app/features/conference/components/Conference.js
@@ -230,7 +230,6 @@ class Conference extends Component<Props, State> {
const options = {
configOverwrite,
- onload: this._onIframeLoad,
parentNode: this._ref.current,
roomName,
sandbox: 'allow-scripts allow-same-origin allow-popups allow-forms'
@@ -241,6 +240,11 @@ class Conference extends Component<Props, State> {
...urlParameters
});
+ // This event is fired really early, at the same time as 'ready', but has been
+ // around for longer.
+ // TODO: remove after a while. -saghul
+ this._api.on('browserSupport', this._onIframeLoad);
+
this._api.on('suspendDetected', this._onVideoConferenceEnded);
this._api.on('readyToClose', this._onVideoConferenceEnded);
this._api.on('videoConferenceJoined',
@@ -323,25 +327,6 @@ class Conference extends Component<Props, State> {
this._loadTimer = null;
}
- const frame = this._api.getIFrame();
- const mainApp = frame.contentWindow.document.getElementById('react');
-
- if (!mainApp) {
- console.warn('Main application not loaded');
-
- this._navigateToHome(
-
- // $FlowFixMe
- {
- error: 'Loading error',
- type: 'error'
- },
- this._conference.room,
- this._conference.serverURL);
-
- return;
- }
-
this.setState({
isLoading: false
});