Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(recording): return true to close stop recording modal on cancel (#2776)

virtuacoplennyf34686afeeae
diff --git a/react/features/recording/components/LiveStream/StopLiveStreamDialog.web.js b/react/features/recording/components/LiveStream/StopLiveStreamDialog.web.js
index 4aaba87ecb..f54dee4a3e 100644
--- a/react/features/recording/components/LiveStream/StopLiveStreamDialog.web.js
+++ b/react/features/recording/components/LiveStream/StopLiveStreamDialog.web.js
@@ -44,6 +44,7 @@ class StopLiveStreamDialog extends Component {
super(props);
// Bind event handler so it is only bound once for every instance.
+ this._onCancel = this._onCancel.bind(this);
this._onSubmit = this._onSubmit.bind(this);
}
@@ -57,7 +58,7 @@ class StopLiveStreamDialog extends Component {
return (
<Dialog
okTitleKey = 'dialog.stopLiveStreaming'
- onCancel = { this.props.onCancel }
+ onCancel = { this._onCancel }
onSubmit = { this._onSubmit }
titleKey = 'dialog.liveStreaming'
width = 'small'>
@@ -66,6 +67,18 @@ class StopLiveStreamDialog extends Component {
);
}
+ /**
+ * Callback invoked when stopping of live streaming is canceled.
+ *
+ * @private
+ * @returns {boolean} True to close the modal.
+ */
+ _onCancel() {
+ this.props.onCancel();
+
+ return true;
+ }
+
/**
* Callback invoked when stopping of live streaming is confirmed.
*