From 8bf92d84db0cc1843708f08d6eb57935d536d1c6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 16 Nov 2017 18:12:09 +0000 Subject: [PATCH] oops - didn't mean to remove that bit of doc --- src/webrtc/call.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/webrtc/call.js b/src/webrtc/call.js index 4a1c41b4d..71272f1d0 100644 --- a/src/webrtc/call.js +++ b/src/webrtc/call.js @@ -25,6 +25,22 @@ const DEBUG = true; // set true to enable console logging. // events: hangup, error(err), replaced(call), state(state, oldState) +/** + * Fires whenever an error occurs when call.js encounters an issue with setting up the call. + *

+ * The error given will have a code equal to either `MatrixCall.ERR_LOCAL_OFFER_FAILED` or + * `MatrixCall.ERR_NO_USER_MEDIA`. `ERR_LOCAL_OFFER_FAILED` is emitted when the local client + * fails to create an offer. `ERR_NO_USER_MEDIA` is emitted when the user has denied access + * to their audio/video hardware. + * + * @event module:webrtc/call~MatrixCall#"error" + * @param {Error} err The error raised by MatrixCall. + * @example + * matrixCall.on("error", function(err){ + * console.error(err.code, err); + * }); + */ + /** * Construct a new Matrix Call. * @constructor