Skip to content

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

Handles connection failed event details (passing them to analytics). (#2432)

Дамян Минковba94ba30c59d
diff --git a/connection.js b/connection.js
index f6aa3b6430..f76e643573 100644
--- a/connection.js
+++ b/connection.js
@@ -94,12 +94,15 @@ function connect(id, password, roomName) {
JitsiConnectionEvents.CONNECTION_FAILED,
connectionFailedHandler);
+ /* eslint-disable max-params */
/**
*
*/
- function connectionFailedHandler(error, message, credentials) {
+ function connectionFailedHandler(error, message, credentials, details) {
+ /* eslint-enable max-params */
APP.store.dispatch(
- connectionFailed(connection, error, message, credentials));
+ connectionFailed(
+ connection, error, message, credentials, details));
if (isFatalJitsiConnectionError(error)) {
connection.removeEventListener(
diff --git a/package-lock.json b/package-lock.json
index 8cd8581a7f..e60b13195a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7158,7 +7158,7 @@
}
},
"lib-jitsi-meet": {
- "version": "github:jitsi/lib-jitsi-meet#1c2c63e6568333a8360c618314bb792da2265215",
+ "version": "github:jitsi/lib-jitsi-meet#4daf8e7e958903bedcc265f435c08649f7a99c91",
"requires": {
"async": "0.9.0",
"current-executing-script": "0.1.3",
@@ -7167,7 +7167,7 @@
"sdp-interop": "0.1.12",
"sdp-simulcast": "0.2.1",
"sdp-transform": "2.3.0",
- "strophe.js": "1.2.14",
+ "strophe.js": "github:jitsi/strophejs#d05254fb28f4bbe6df5f905358582db3a12ee04c",
"strophejs-plugin-disco": "0.0.2",
"webrtc-adapter": "github:webrtc/adapter#1eec19782b4058d186341263e7d049cea3e3290a",
"yaeti": "1.0.1"
@@ -11271,9 +11271,7 @@
"dev": true
},
"strophe.js": {
- "version": "1.2.14",
- "resolved": "https://registry.npmjs.org/strophe.js/-/strophe.js-1.2.14.tgz",
- "integrity": "sha1-fO7sUbMnLMXGxq53R0eApYQPGqc="
+ "version": "github:jitsi/strophejs#d05254fb28f4bbe6df5f905358582db3a12ee04c"
},
"strophejs-plugin-disco": {
"version": "0.0.2",
diff --git a/package.json b/package.json
index 60cc442cbd..b7c7663c26 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
"jquery-i18next": "1.2.0",
"js-md5": "0.6.1",
"jwt-decode": "2.2.0",
- "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#1c2c63e6568333a8360c618314bb792da2265215",
+ "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#4daf8e7e958903bedcc265f435c08649f7a99c91",
"lodash": "4.17.4",
"moment": "2.19.4",
"nuclear-js": "1.4.0",
diff --git a/react/features/analytics/AnalyticsEvents.js b/react/features/analytics/AnalyticsEvents.js
index 2fe0c9aca8..e2b3937ebe 100644
--- a/react/features/analytics/AnalyticsEvents.js
+++ b/react/features/analytics/AnalyticsEvents.js
@@ -148,18 +148,21 @@ export const createInviteDialogClosedEvent = function() {
* @param {string} reason - The reason for the reload.
* @param {number} timeout - The timeout in seconds after which the page is
* scheduled to reload.
+ * @param {Object} details - The details for the error.
* @returns {Object} The event in a format suitable for sending via
* sendAnalytics.
*/
-export const createPageReloadScheduledEvent = function(reason, timeout) {
- return {
- action: 'page.reload.scheduled',
- attributes: {
- reason,
- timeout
- }
+export const createPageReloadScheduledEvent
+ = function(reason, timeout, details) {
+ return {
+ action: 'page.reload.scheduled',
+ attributes: {
+ reason,
+ timeout,
+ ...details
+ }
+ };
};
-};
/**
* Creates a "pinned" or "unpinned" event.
diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.js
index f67747b493..caca1b67f6 100644
--- a/react/features/base/connection/actions.native.js
+++ b/react/features/base/connection/actions.native.js
@@ -177,6 +177,7 @@ export function connectionEstablished(connection: Object) {
* @param {string} [message] - Error message.
* @param {Object} [credentials] - The invalid credentials that failed
* the authentication.
+ * @param {Object} [details] - The details about the connection failed event.
* @public
* @returns {{
* type: CONNECTION_FAILED,
@@ -188,7 +189,8 @@ export function connectionFailed(
connection: Object,
error: string,
message: ?string,
- credentials: ?Object) {
+ credentials: ?Object,
+ details: ?Object) {
return {
type: CONNECTION_FAILED,
connection,
@@ -201,7 +203,8 @@ export function connectionFailed(
? credentials
: undefined,
message,
- name: error
+ name: error,
+ details
}
};
}
diff --git a/react/features/overlay/components/AbstractPageReloadOverlay.js b/react/features/overlay/components/AbstractPageReloadOverlay.js
index c395cd879a..96bbabc73d 100644
--- a/react/features/overlay/components/AbstractPageReloadOverlay.js
+++ b/react/features/overlay/components/AbstractPageReloadOverlay.js
@@ -30,6 +30,16 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
* @static
*/
static propTypes = {
+ /**
+ * The details is an object containing more information
+ * about the connection failed(shard changes, was the computer
+ * suspended, etc.).
+ *
+ * @public
+ * @type {object}
+ */
+ details: PropTypes.object,
+
dispatch: PropTypes.func,
/**
@@ -172,7 +182,7 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
}
sendAnalytics(createPageReloadScheduledEvent(
- this.props.reason, this.state.timeoutSeconds));
+ this.props.reason, this.state.timeoutSeconds, this.props.details));
logger.info(
`The conference will be reloaded after ${
@@ -259,7 +269,8 @@ export default class AbstractPageReloadOverlay extends Component<*, *> {
* @protected
* @returns {{
* isNetworkFailure: boolean,
- * reason: string
+ * reason: string,
+ * details: Object
* }}
*/
export function abstractMapStateToProps(state: Object) {
@@ -269,6 +280,7 @@ export function abstractMapStateToProps(state: Object) {
return {
isNetworkFailure: Boolean(configError || connectionError),
- reason: (configError || connectionError || conferenceError).message
+ reason: (configError || connectionError || conferenceError).message,
+ details: connectionError ? connectionError.details : undefined
};
}