aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <s@saghul.net>2020-06-04 10:53:32 +0200
committerSaúl Ibarra Corretgé <s@saghul.net>2020-06-04 10:53:32 +0200
commit328ff76016279813a087bc8e65a169b4b5dc7d4c (patch)
tree224beab80aae03aa46eeec94aeadf76bee182f0f /app
parenta1ec905ff3af1cae06b0947202736ce2f41c2454 (diff)
Attach external API listeners early
This avoids any problems caused by the initialization of any of the extra services initialization failures.
Diffstat (limited to 'app')
-rw-r--r--app/features/conference/components/Conference.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/app/features/conference/components/Conference.js b/app/features/conference/components/Conference.js
index 6e39cad..2639e11 100644
--- a/app/features/conference/components/Conference.js
+++ b/app/features/conference/components/Conference.js
@@ -270,6 +270,16 @@ class Conference extends Component<Props, State> {
...urlParameters
});
+
+ this._api.on('suspendDetected', this._onVideoConferenceEnded);
+ this._api.on('readyToClose', this._onVideoConferenceEnded);
+ this._api.on('videoConferenceJoined',
+ (conferenceInfo: Object) => {
+ this.props.dispatch(conferenceJoined(this._conference));
+ this._onVideoConferenceJoined(conferenceInfo);
+ }
+ );
+
const { RemoteControl,
setupScreenSharingRender,
setupAlwaysOnTopRender,
@@ -292,15 +302,6 @@ class Conference extends Component<Props, State> {
setupWiFiStats(iframe);
setupPowerMonitorRender(this._api);
-
- this._api.on('suspendDetected', this._onVideoConferenceEnded);
- this._api.on('readyToClose', this._onVideoConferenceEnded);
- this._api.on('videoConferenceJoined',
- (conferenceInfo: Object) => {
- this.props.dispatch(conferenceJoined(this._conference));
- this._onVideoConferenceJoined(conferenceInfo);
- }
- );
}
_onVideoConferenceEnded: (*) => void;