Skip to content

Commit

Permalink
added jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
isymchych committed Nov 5, 2015
1 parent 5be8c33 commit 05b3df0
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions modules/statistics/CallStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,16 @@ var CallStats = {
', "comment": "' + detailedFeedback + '"}';

var feedbackJSON = JSON.parse(feedbackString);

callStats.sendUserFeedback(
this.confID, feedbackJSON);
},

/**
* Notifies CallStats that getUserMedia failed.
*
* @param {Error} e error to send
*/
sendGetUserMediaFailed: function (e) {
if(!callStats) {
pendingUserMediaErrors.push(e);
Expand All @@ -122,6 +127,11 @@ var CallStats = {
callStats.webRTCFunctions.getUserMedia, e);
},

/**
* Notifies CallStats that peer connection failed to create offer.
*
* @param {Error} e error to send
*/
sendCreateOfferFailed: function (e) {
if(!callStats) {
return;
Expand All @@ -130,6 +140,11 @@ var CallStats = {
callStats.webRTCFunctions.createOffer, e);
},

/**
* Notifies CallStats that peer connection failed to create answer.
*
* @param {Error} e error to send
*/
sendCreateAnswerFailed: function (e) {
if(!callStats) {
return;
Expand All @@ -138,6 +153,11 @@ var CallStats = {
callStats.webRTCFunctions.createAnswer, e);
},

/**
* Notifies CallStats that peer connection failed to set local description.
*
* @param {Error} e error to send
*/
sendSetLocalDescFailed: function (e) {
if(!callStats) {
return;
Expand All @@ -146,21 +166,31 @@ var CallStats = {
callStats.webRTCFunctions.setLocalDescription, e);
},

/**
* Notifies CallStats that peer connection failed to set remote description.
*
* @param {Error} e error to send
*/
sendSetRemoteDescFailed: function (e) {
if(!callStats) {
return;
}
callStats.reportError(this.peerconnection, this.confID,
callStats.webRTCFunctions.setRemoteDescription, e);
callStats.reportError(
this.peerconnection, this.confID,
callStats.webRTCFunctions.setRemoteDescription, e);
},

/**
* Notifies CallStats that peer connection failed to add ICE candidate.
*
* @param {Error} e error to send
*/
sendAddIceCandidateFailed: function (e) {
if(!callStats) {
return;
}
callStats.reportError(this.peerconnection, this.confID,
callStats.webRTCFunctions.addIceCandidate, e);
},

}
};
module.exports = CallStats;
module.exports = CallStats;

0 comments on commit 05b3df0

Please sign in to comment.